-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Changes proposed: 1. Moves JS code to show/hide password to `password_widget.js`. 2. Add a show/hide glyphicon toggle to the right of password widget. 3. Add a border around the glyphicon when form submission returns errors.
- Loading branch information
1 parent
bfc59d2
commit cd3865a
Showing
6 changed files
with
100 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
$(document).ready(function () { | ||
$("input[type='password'] + span > button").click(function() { | ||
var glyph = $(this).children(".glyphicon"); | ||
if(glyph.hasClass("glyphicon-eye-close")) { | ||
$(this).parent().prev("input").attr("type", "text"); | ||
glyph.removeClass("glyphicon-eye-close").addClass("glyphicon-eye-open"); | ||
} | ||
else { | ||
$(this).parent().prev("input").attr("type", "password"); | ||
glyph.removeClass("glyphicon-eye-open").addClass("glyphicon-eye-close"); | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters