Hide login name policy when email is used
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
8c0ffecb7b
commit
58712c82d0
|
|
@ -20,4 +20,11 @@ $(document).ready(function() {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
$('#email_is_login').change(function(event) {
|
||||||
|
if (event.target.checked) {
|
||||||
|
$('.login-name-policy').addClass('hidden');
|
||||||
|
} else {
|
||||||
|
$('.login-name-policy').removeClass('hidden');
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -59,13 +59,15 @@ foreach ($_['groups'] as $group) {
|
||||||
<label for="email_is_login"><?php p($l->t('Force email as login name')); ?></label>
|
<label for="email_is_login"><?php p($l->t('Force email as login name')); ?></label>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3><?php p($l->t('Username policy')); ?></h3>
|
<div class="login-name-policy <?php if ($_['email_is_login'] === 'yes') { p('hidden'); } ?>">
|
||||||
|
<h3><?php p($l->t('Login name policy')); ?></h3>
|
||||||
<p>
|
<p>
|
||||||
<label>
|
<label>
|
||||||
<input type="text" id="username_policy_regex" name="username_policy_regex" value="<?php p($_['username_policy_regex']);?>" placeholder="E.g.: /^[a-z-]+\.[a-z-]+$/">
|
<input type="text" id="username_policy_regex" name="username_policy_regex" value="<?php p($_['username_policy_regex']);?>" placeholder="E.g.: /^[a-z-]+\.[a-z-]+$/">
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
<em><?php p($l->t('If configured, usernames will be validated through the regular expression. If the validation fails the user is prompted with a generic error. Make sure your regex is working correctly.'));?></em>
|
<em><?php p($l->t('If configured, login names will be validated through the regular expression. If the validation fails the user is prompted with a generic error. Make sure your regex is working correctly.'));?></em>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h3><?php p($l->t('User instructions')); ?></h3>
|
<h3><?php p($l->t('User instructions')); ?></h3>
|
||||||
<em><?php p($l->t('Caution: The user instructions will not be translated and will therefore be displayed as configured below for all users regardless of their actual language.'));?></em>
|
<em><?php p($l->t('Caution: The user instructions will not be translated and will therefore be displayed as configured below for all users regardless of their actual language.'));?></em>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue