NEW : Enabled feature hidden extrafeilds

This commit is contained in:
Florian HENRY 2016-04-21 17:55:25 +02:00
parent c7a9f26ee5
commit 8d91523619
3 changed files with 3 additions and 9 deletions

View File

@ -118,9 +118,7 @@
<!-- Always editable -->
<tr><td><?php echo $langs->trans("AlwaysEditable"); ?></td><td class="valeur"><input id="alwayseditable" type="checkbox" name="alwayseditable" <?php echo ((GETPOST('alwayseditable') || ! GETPOST('button'))?' checked':''); ?>></td></tr>
<!-- Is visible or not -->
<?php if (! empty($conf->global->MAIN_CAN_HIDE_EXTRAFIELDS)) { ?>
<tr><td><?php echo $langs->trans("Hidden"); ?></td><td class="valeur"><input id="ishidden" type="checkbox" name="ishidden" <?php echo (GETPOST('ishidden') ?' checked' : ''); ?>></td></tr>
<?php } ?>
<?php if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { ?>
<!-- By default visible into list -->
<tr><td><?php echo $langs->trans("ByDefaultInList"); ?>

View File

@ -110,7 +110,7 @@ elseif (($type== 'sellist') || ($type == 'chkbxlst') || ($type == 'link') )
<tr><td class="fieldrequired"><?php echo $langs->trans("AttributeCode"); ?></td><td class="valeur"><?php echo $attrname; ?></td></tr>
<!-- Type -->
<tr><td class="fieldrequired"><?php echo $langs->trans("Type"); ?></td><td class="valeur">
<?php
<?php
// Define list of possible type transition
$typewecanchangeinto=array(
'varchar'=>array('varchar', 'phone', 'mail', 'select'),
@ -135,7 +135,7 @@ else
{
print $type2label[$type];
print '<input type="hidden" name="type" id="type" value="'.$type.'">';
}
}
?>
</td></tr>
<!-- Size -->
@ -167,11 +167,7 @@ else
<!-- Always editable -->
<tr><td><?php echo $langs->trans("AlwaysEditable"); ?></td><td class="valeur"><input id="alwayseditable" type="checkbox" name="alwayseditable" <?php echo ($alwayseditable?' checked':''); ?>></td></tr>
<!-- Is visible or not -->
<?php if (! empty($conf->global->MAIN_CAN_HIDE_EXTRAFIELDS)) { ?>
<tr><td><?php echo $langs->trans("Hidden"); ?></td><td class="valeur"><input id="ishidden" type="checkbox" name="ishidden" <?php echo ($ishidden ?' checked':''); ?>></td></tr>
<?php } else {
print '<input id="ishidden" type="hidden" name="ishidden" value="'.($ishidden?1:0).'">';
}?>
<!-- By default visible into list -->
<?php if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { ?>
<tr><td><?php echo $langs->trans("ByDefaultInList"); ?>

View File

@ -61,7 +61,7 @@ foreach($extrafields->attribute_type as $key => $value)
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
print '<td align="center">'.yn($extrafields->attribute_alwayseditable[$key])."</td>\n";
if (! empty($conf->global->MAIN_CAN_HIDE_EXTRAFIELDS)) print '<td align="center">'.yn($extrafields->attribute_hidden[$key])."</td>\n"; // Add hidden option on not working feature. Why hide if user can't see it.
print '<td align="center">'.yn($extrafields->attribute_hidden[$key])."</td>\n"; // Add hidden option on not working feature. Why hide if user can't see it.
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
print "&nbsp; <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
print "</tr>";