www: missing bits for previous; closes #2175

This commit is contained in:
Franco Fichtner 2018-03-17 16:19:14 +01:00
parent 9d96bdcbc7
commit 2caa7fae6a
4 changed files with 16 additions and 30 deletions

View File

@ -276,7 +276,6 @@ function addMultiSelectClearUI() {
function initFormHelpUI() {
// handle help messages show/hide
$("a[class='showhelp']").click(function (event) {
$("*[for='" + $(this).attr('id') + "']").toggleClass("hidden show");
$("*[data-for='" + $(this).attr('id') + "']").toggleClass("hidden show");
event.preventDefault();
});
@ -289,13 +288,9 @@ function initFormHelpUI() {
if (window.sessionStorage) {
sessionStorage.setItem('all_help_preset', 1);
}
$('[for*="help_for"]').addClass("show");
$('[for*="help_for"]').removeClass("hidden");
$('[data-for*="help_for"]').addClass("show");
$('[data-for*="help_for"]').removeClass("hidden");
} else {
$('[for*="help_for"]').addClass("hidden");
$('[for*="help_for"]').removeClass("show");
$('[data-for*="help_for"]').addClass("hidden");
$('[data-for*="help_for"]').removeClass("show");
if (window.sessionStorage) {
@ -308,8 +303,6 @@ function initFormHelpUI() {
// show all help messages when preset was stored
$('[id*="show_all_help"]').toggleClass("fa-toggle-on fa-toggle-off");
$('[id*="show_all_help"]').toggleClass("text-success text-danger");
$('[for*="help_for"]').addClass("show");
$('[for*="help_for"]').removeClass("hidden");
$('[data-for*="help_for"]').addClass("show");
$('[data-for*="help_for"]').removeClass("hidden");
}

View File

@ -142,7 +142,6 @@ $pagetitle .= html_safe(sprintf(' | %s.%s', $config['system']['hostname'], $conf
// link showhelp class behavior
$("a[class='showhelp']").click(function (event) {
$("*[for='" + $(this).attr('id') + "']").toggleClass("hidden show");
$("*[data-for='" + $(this).attr('id') + "']").toggleClass("hidden show");
event.preventDefault();
});
@ -155,16 +154,12 @@ $pagetitle .= html_safe(sprintf(' | %s.%s', $config['system']['hostname'], $conf
if (window.sessionStorage) {
sessionStorage.setItem('all_help_preset', 1);
}
$('[for*="help_for"]').addClass("show");
$('[for*="help_for"]').removeClass("hidden");
$('[data-for*="help_for"]').addClass("show");
$('[data-for*="help_for"]').removeClass("hidden");
} else {
if (window.sessionStorage) {
sessionStorage.setItem('all_help_preset', 0);
}
$('[for*="help_for"]').addClass("hidden");
$('[for*="help_for"]').removeClass("show");
$('[data-for*="help_for"]').addClass("hidden");
$('[data-for*="help_for"]').removeClass("show");
}
@ -174,8 +169,6 @@ $pagetitle .= html_safe(sprintf(' | %s.%s', $config['system']['hostname'], $conf
// show all help messages when preset was stored
$('[id*="show_all_help"]').toggleClass("fa-toggle-on fa-toggle-off");
$('[id*="show_all_help"]').toggleClass("text-success text-danger");
$('[for*="help_for"]').addClass("show");
$('[for*="help_for"]').removeClass("hidden");
$('[data-for*="help_for"]').addClass("show");
$('[data-for*="help_for"]').removeClass("hidden");
}

View File

@ -531,14 +531,14 @@ $(document).ready(function() {
</td>
</tr>
<tr>
<td><a id="help_for_httpaccesslog" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Access log"); ?></td>
<td>
<input name="httpaccesslog" type="checkbox" value="yes" <?= empty($pconfig['httpaccesslog']) ? '' : 'checked="checked"' ?> />
<strong><?=gettext("Enable access log"); ?></strong>
<output class="hidden" for="help_for_httpaccesslog">
<?=gettext("Enable access logging on the webinterface for debugging and analysis purposes.") ?>
</output>
</td>
<td><a id="help_for_httpaccesslog" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Access log"); ?></td>
<td>
<input name="httpaccesslog" type="checkbox" value="yes" <?= empty($pconfig['httpaccesslog']) ? '' : 'checked="checked"' ?> />
<strong><?=gettext("Enable access log"); ?></strong>
<div class="hidden" data-for="help_for_httpaccesslog">
<?=gettext("Enable access logging on the webinterface for debugging and analysis purposes.") ?>
</div>
</td>
</tr>
<tr>
<td><a id="help_for_webguiinterfaces" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Listen Interfaces') ?></td>

View File

@ -169,10 +169,10 @@ endif;?>
<td>
<input id="enable_password_policy_constraints" name="enable_password_policy_constraints" type="checkbox" <?= empty($pconfig['enable_password_policy_constraints']) ? '' : 'checked="checked"';?> />
<strong><?= gettext('Enable password policy constraints') ?></strong>
<output class="hidden" for="help_for_enable_password_policy_constraints">
<div class="hidden" data-for="help_for_enable_password_policy_constraints">
<?= gettext("Harden security on local accounts, for methods other then local these will usually be configured on the " .
"respective provider (e.g. ldap/radius/..). ");?>
</output>
</div>
</td>
</tr>
<tr class="password_policy_constraints">
@ -185,10 +185,10 @@ endif;?>
<option <?=$pconfig['password_policy_duration'] == '180' ? "selected=\"selected\"" : "";?> value="180"><?=sprintf(gettext("%d days"), "180");?></option>
<option <?=$pconfig['password_policy_duration'] == '360' ? "selected=\"selected\"" : "";?> value="360"><?=sprintf(gettext("%d days"), "360");?></option>
</select>
<output class="hidden" for="help_for_password_policy_duration">
<div class="hidden" data-for="help_for_password_policy_duration">
<?= gettext("Password duration settings, the interval in days in which passwords stay valid. ".
"When reached, the user will be forced to change his or her password before continuing.");?>
</output>
</div>
</td>
</tr>
<tr class="password_policy_constraints">
@ -201,9 +201,9 @@ endif;?>
<option <?=$pconfig['password_policy_length'] == '14' ? "selected=\"selected\"" : "";?> value="14">14</option>
<option <?=$pconfig['password_policy_length'] == '16' ? "selected=\"selected\"" : "";?> value="16">16</option>
</select>
<output class="hidden" for="help_for_password_policy_length">
<div class="hidden" data-for="help_for_password_policy_length">
<?= gettext("Sets the minimum length for a password");?>
</output>
</div>
</td>
</tr>
<tr class="password_policy_constraints">
@ -211,9 +211,9 @@ endif;?>
<td>
<input id="password_policy_complexity" name="password_policy_complexity" type="checkbox" <?= empty($pconfig['password_policy_complexity']) ? '' : 'checked="checked"';?> />
<strong><?= gettext('Enable complexity requirements') ?></strong>
<output class="hidden" for="help_for_password_policy_complexity">
<div class="hidden" data-for="help_for_password_policy_complexity">
<?= gettext("Require passwords to meet complexity rules");?>
</output>
</div>
</td>
</tr>
<tr>