mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-03-14 15:49:10 +00:00
show 'show' value when editing attributes
This commit is contained in:
parent
688d420adb
commit
9c59519526
|
|
@ -244,11 +244,6 @@ $(document).ready( function() {
|
|||
print "<td>" . htmlspecialchars($member->getName()) ." (".$ot.", ".$t.")"."</td>";
|
||||
print "<td>";
|
||||
$show = $group->getShow($member);
|
||||
$shows = array();
|
||||
for($j=0; $j<4; $j++) {
|
||||
if(1 << $j & $show)
|
||||
$shows[] = 1 << $j;
|
||||
}
|
||||
print "<form action=\"../op/op.AttributeGroupMgr.php\" method=\"post\" class=\"form-inline\" style=\"display: inline-block; margin-bottom: 0px;\"><input type=\"hidden\" name=\"attrdefgroupid\" value=\"".$group->getID()."\" /><input type=\"hidden\" name=\"action\" value=\"setshow\" /><input type=\"hidden\" name=\"attrdefid\" value=\"".$member->getID()."\" />".createHiddenFieldWithKey('setshow');
|
||||
echo "<select class=\"chzn-select\" multiple=\"multiple\" name=\"shows[]\" data-placeholder=\"".getMLText('select_attrdefgrp_show')."\">";
|
||||
foreach(SeedDMS_Core_AttributeDefinitionGroup::getShowValues() as $j=>$k)
|
||||
|
|
|
|||
|
|
@ -61,6 +61,12 @@ class SeedDMS_View_EditAttributes extends SeedDMS_Bootstrap_Style {
|
|||
echo "<tr><td colspan=\"2\"><b>".htmlspecialchars($attrdefgrp['group']->getName())."</b></td></tr>";
|
||||
foreach($attrdefs as $attrdefarr) {
|
||||
$attrdef = $attrdefarr['attrdef'];
|
||||
$show = $attrdefarr['show'];
|
||||
$shows = array();
|
||||
foreach(SeedDMS_Core_AttributeDefinitionGroup::getShowValues() as $j=>$k) {
|
||||
if($show & $j)
|
||||
$shows[] = getMLText('attrdefgrp_show_'.$k);
|
||||
}
|
||||
if(!in_array($attrdef->getID(), $attrdefids)) {
|
||||
$arr = $this->callHook('folderEditAttribute', $folder, $attrdef);
|
||||
if(is_array($arr)) {
|
||||
|
|
@ -72,7 +78,7 @@ class SeedDMS_View_EditAttributes extends SeedDMS_Bootstrap_Style {
|
|||
} else {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
|
||||
<td><?php echo htmlspecialchars($attrdef->getName()); ?><?php echo $shows ? " (".implode(", ", $shows).")" : ''; ?>:</td>
|
||||
<td><?php $this->printAttributeEditField($attrdef, $version->getAttribute($attrdef)) ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
|
|
|||
|
|
@ -181,6 +181,12 @@ $(document).ready( function() {
|
|||
echo "<tr><td colspan=\"2\"><b>".htmlspecialchars($attrdefgrp['group']->getName())."</b></td></tr>";
|
||||
foreach($attrdefs as $attrdefarr) {
|
||||
$attrdef = $attrdefarr['attrdef'];
|
||||
$show = $attrdefarr['show'];
|
||||
$shows = array();
|
||||
foreach(SeedDMS_Core_AttributeDefinitionGroup::getShowValues() as $j=>$k) {
|
||||
if($show & $j)
|
||||
$shows[] = getMLText('attrdefgrp_show_'.$k);
|
||||
}
|
||||
if(!in_array($attrdef->getID(), $attrdefids)) {
|
||||
$arr = $this->callHook('editDocumentAttribute', $document, $attrdef);
|
||||
if(is_array($arr)) {
|
||||
|
|
@ -192,7 +198,7 @@ $(document).ready( function() {
|
|||
} else {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
|
||||
<td><?php echo htmlspecialchars($attrdef->getName()); ?><?php echo $shows ? " (".implode(", ", $shows).")" : ''; ?>:</td>
|
||||
<td><?php $this->printAttributeEditField($attrdef, $document->getAttribute($attrdef)) ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
|
|
|||
|
|
@ -135,6 +135,12 @@ $(document).ready(function() {
|
|||
echo "<tr><td colspan=\"2\"><b>".htmlspecialchars($attrdefgrp['group']->getName())."</b></td></tr>";
|
||||
foreach($attrdefs as $attrdefarr) {
|
||||
$attrdef = $attrdefarr['attrdef'];
|
||||
$show = $attrdefarr['show'];
|
||||
$shows = array();
|
||||
foreach(SeedDMS_Core_AttributeDefinitionGroup::getShowValues() as $j=>$k) {
|
||||
if($show & $j)
|
||||
$shows[] = getMLText('attrdefgrp_show_'.$k);
|
||||
}
|
||||
if(!in_array($attrdef->getID(), $attrdefids)) {
|
||||
$arr = $this->callHook('folderEditAttribute', $folder, $attrdef);
|
||||
if(is_array($arr)) {
|
||||
|
|
@ -146,7 +152,7 @@ $(document).ready(function() {
|
|||
} else {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
|
||||
<td><?php echo htmlspecialchars($attrdef->getName()); ?><?php echo $shows ? " (".implode(", ", $shows).")" : ''; ?>:</td>
|
||||
<td><?php $this->printAttributeEditField($attrdef, $folder->getAttribute($attrdef)) ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user