mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 05:31:42 +00:00
add preset button for attributes
takes over attribute value from previous version
This commit is contained in:
parent
894466b102
commit
8cf4901a46
|
@ -37,6 +37,8 @@ class SeedDMS_View_UpdateDocument extends SeedDMS_Bootstrap_Style {
|
||||||
header('Content-Type: application/javascript');
|
header('Content-Type: application/javascript');
|
||||||
$this->printDropFolderChooserJs("form1");
|
$this->printDropFolderChooserJs("form1");
|
||||||
$this->printSelectPresetButtonJs();
|
$this->printSelectPresetButtonJs();
|
||||||
|
$this->printInputPresetButtonJs();
|
||||||
|
$this->printCheckboxPresetButtonJs();
|
||||||
?>
|
?>
|
||||||
function checkForm()
|
function checkForm()
|
||||||
{
|
{
|
||||||
|
@ -233,7 +235,23 @@ console.log(element);
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
|
<td><?php echo htmlspecialchars($attrdef->getName()); ?>:</td>
|
||||||
<td><?php $this->printAttributeEditField($attrdef, '') ?></td>
|
<td><?php $this->printAttributeEditField($attrdef, '') ?>
|
||||||
|
<?php
|
||||||
|
if($latestContent->getAttributeValue($attrdef)) {
|
||||||
|
switch($attrdef->getType()) {
|
||||||
|
case SeedDMS_Core_AttributeDefinition::type_string:
|
||||||
|
case SeedDMS_Core_AttributeDefinition::type_date:
|
||||||
|
case SeedDMS_Core_AttributeDefinition::type_int:
|
||||||
|
case SeedDMS_Core_AttributeDefinition::type_float:
|
||||||
|
$this->printInputPresetButtonHtml('attributes_'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef), $attrdef->getValueSetSeparator());
|
||||||
|
break;
|
||||||
|
case SeedDMS_Core_AttributeDefinition::type_boolean:
|
||||||
|
$this->printCheckboxPresetButtonHtml('attributes_'.$attrdef->getID(), $latestContent->getAttributeValue($attrdef));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// print_r($latestContent->getAttributeValue($attrdef));
|
||||||
|
}
|
||||||
|
?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user