Commit 547d8098 authored by Christophe Maudoux's avatar Christophe Maudoux 🐛
Browse files

Display placeholder (#2521)

parent 4494bd1e
Pipeline #14460 passed with stage
in 9 minutes and 30 seconds
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\" .\"
.\" Standard preamble: .\" Standard preamble:
.\" ======================================================================== .\" ========================================================================
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
.\" ======================================================================== .\" ========================================================================
.\" .\"
.IX Title "llng-fastcgi-server 8" .IX Title "llng-fastcgi-server 8"
.TH llng-fastcgi-server 8 "2021-01-18" "perl v5.28.1" "User Contributed Perl Documentation" .TH llng-fastcgi-server 8 "2021-07-03" "perl v5.30.0" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents. .\" way too many mistakes in technical documents.
.if n .ad l .if n .ad l
......
...@@ -550,6 +550,15 @@ $(window).on 'load', () -> ...@@ -550,6 +550,15 @@ $(window).on 'load', () ->
$("#show-hide-icon-button").removeClass 'fa-eye-slash' $("#show-hide-icon-button").removeClass 'fa-eye-slash'
$("#show-hide-icon-button").addClass 'fa-eye' $("#show-hide-icon-button").addClass 'fa-eye'
# Functions to show/hide placeholder password inputs
$('#passwordfield').on 'input', () ->
if $('#passwordfield').get(0).value && $('#passwordfield').get(0).type == 'text'
$("#passwordfield").removeClass 'form-control'
$("#passwordfield").addClass 'form-control key'
else
$("#passwordfield").removeClass 'form-control key'
$("#passwordfield").addClass 'form-control'
#$('#formpass').on 'submit', changePwd #$('#formpass').on 'submit', changePwd
$('#resetfinduserform').on 'click', () -> $('#resetfinduserform').on 'click', () ->
......
...@@ -597,6 +597,15 @@ LemonLDAP::NG Portal jQuery scripts ...@@ -597,6 +597,15 @@ LemonLDAP::NG Portal jQuery scripts
return $("#show-hide-icon-button").addClass('fa-eye'); return $("#show-hide-icon-button").addClass('fa-eye');
} }
}); });
$('#passwordfield').on('input', function() {
if ($('#passwordfield').get(0).value && $('#passwordfield').get(0).type === 'text') {
$("#passwordfield").removeClass('form-control');
return $("#passwordfield").addClass('form-control key');
} else {
$("#passwordfield").removeClass('form-control key');
return $("#passwordfield").addClass('form-control');
}
});
$('#resetfinduserform').on('click', function() { $('#resetfinduserform').on('click', function() {
console.log('Reset form'); console.log('Reset form');
return $('#finduserForm').trigger('reset'); return $('#finduserForm').trigger('reset');
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<span class="input-group-text"><label for="passwordfield" class="mb-0"><i class="fa fa-lock"></i></label></span> <span class="input-group-text"><label for="passwordfield" class="mb-0"><i class="fa fa-lock"></i></label></span>
</div> </div>
<TMPL_IF NAME="DONT_STORE_PASSWORD"> <TMPL_IF NAME="DONT_STORE_PASSWORD">
<input id="passwordfield" name="password" type="text" class="form-control key" autocomplete="off" required aria-required="true" aria-hidden="true"/> <input id="passwordfield" name="password" type="text" class="form-control" trplaceholder="password" autocomplete="off" required aria-required="true" aria-hidden="true"/>
<TMPL_ELSE> <TMPL_ELSE>
<input id="passwordfield" name="password" type="password" class="form-control" trplaceholder="password" required aria-required="true"/> <input id="passwordfield" name="password" type="password" class="form-control" trplaceholder="password" required aria-required="true"/>
<TMPL_IF NAME="ENABLE_PASSWORD_DISPLAY"> <TMPL_IF NAME="ENABLE_PASSWORD_DISPLAY">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment