Revision 3706:170617361020,
511 bytes
checked in by franck <carnet.franck.paul@…>, 7 years ago
(diff) |
use strict and no more linter warnings/errors as far as possible
|
Line | |
---|
1 | /*global $ */ |
---|
2 | 'use strict'; |
---|
3 | |
---|
4 | $(function() { |
---|
5 | if ($('#new_pwd').length == 0) { |
---|
6 | return; |
---|
7 | } |
---|
8 | var user_email = $('#user_email').val(); |
---|
9 | $('#user-form').submit(function() { |
---|
10 | var e = this.elements.cur_pwd; |
---|
11 | if (e.value != '') { |
---|
12 | return true; |
---|
13 | } |
---|
14 | if ($('#user_email').val() != user_email || $('#new_pwd').val() != '') { |
---|
15 | $(e).addClass('missing').focusout(function() { |
---|
16 | $(this).removeClass('missing'); |
---|
17 | }); |
---|
18 | e.focus(); |
---|
19 | return false; |
---|
20 | } |
---|
21 | return true; |
---|
22 | }); |
---|
23 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.