checkboxes can be made invisible

This commit is contained in:
Uwe Steinmann 2024-02-15 09:37:43 +01:00
parent 6f2300fdd7
commit 53812aa45d

View File

@ -59,7 +59,14 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
$class = 'input-medium';
else
$class = 'input-small';
$html .= '<div class="input-group'.($type=='password' ? ' show-hide-password' : '').'">';
$html .= '<input '.($type=='password' ? 'type="password"' : ($type=='number' ? 'type="number"' : ($type=='color' ? 'type="color"' : 'type="text"'))).' class="form-control '.$class.'" name="'.$name.'" value="'.$value.'" placeholder="'.$placeholder.'"/>';
if($this->getTheme() == 'bootstrap4' && $type == 'password') {
$html .= '<div class="input-group-addon">';
$html .= '<a href=""><i class="fa fa-eye-slash" style="position: absolute; right: 15px; top: 10px;" aria-hidden="true"></i></a>';
$html .= '</div>';
}
$html .= '</div>';
}
return $html;
} /* }}} */
@ -161,7 +168,14 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
?>
<tr title="<?= getMLText($title."_desc") ?>">
<td><?= getMLText($title) ?></td>
<td><input name="<?= $name ?>" type="checkbox" <?php if ($settings->{"_".$name}) echo "checked" ?> /></td>
<td>
<?php
if($this->isVisible($name))
echo '<input name="'.$name.'" type="checkbox" '.($settings->{"_".$name} ? "checked" : '').' />';
else
echo getMLText('settings_conf_field_not_editable');
echo "</td>\n";
?>
</tr>
<?php
} /* }}} */