|
1 | | - <script> |
2 | | - function elementHideShow(elementToHideOrShow) { |
3 | | - var el = document.getElementById(elementToHideOrShow); |
4 | | - el.style.display = el.style.display === 'none' ? 'block' : 'none'; |
5 | | - } |
| 1 | + <script> |
| 2 | + function elementHideShow(elementToHideOrShow) { |
| 3 | + var el = document.getElementById(elementToHideOrShow); |
| 4 | + el.style.display = el.style.display === 'none' ? 'block' : 'none'; |
| 5 | + } |
6 | 6 |
|
7 | | - function randomString() { |
8 | | - var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'; |
9 | | - var string_length = 10; |
10 | | - var randomstring = ''; |
11 | | - for (var i = 0; i < string_length; i++) { |
12 | | - var rnum = Math.floor(Math.random() * chars.length); |
13 | | - randomstring += chars.substr(rnum, 1); |
14 | | - } |
15 | | - document.v_add_mail_acc.v_password.value = randomstring; |
| 7 | + function randomString() { |
| 8 | + var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'; |
| 9 | + var string_length = 10; |
| 10 | + var randomstring = ''; |
| 11 | + for (var i = 0; i < string_length; i++) { |
| 12 | + var rnum = Math.floor(Math.random() * chars.length); |
| 13 | + randomstring += chars.substr(rnum, 1); |
| 14 | + } |
| 15 | + document.v_add_mail_acc.v_password.value = randomstring; |
16 | 16 |
|
17 | | - if($('input[name=v_password]').attr('type') == 'text') |
18 | | - $('#v_password').text(randomstring); |
19 | | - else |
20 | | - $('#v_password').text(Array(randomstring.length+1).join('*')); |
21 | | - } |
| 17 | + if($('input[name=v_password]').attr('type') == 'text') |
| 18 | + $('#v_password').text(randomstring); |
| 19 | + else |
| 20 | + $('#v_password').text(Array(randomstring.length+1).join('*')); |
| 21 | + } |
22 | 22 |
|
23 | | - $(document).ready(function() { |
24 | | - $('#v_account').text($('input[name=v_account]').val()); |
25 | | - $('#v_password').text($('input[name=v_password]').val()); |
| 23 | + $(document).ready(function() { |
| 24 | + $('#v_account').text($('input[name=v_account]').val()); |
| 25 | + $('#v_password').text($('input[name=v_password]').val()); |
26 | 26 |
|
27 | | - $('input[name=v_account]').change(function(){ |
28 | | - $('#v_account').text($(this).val()); |
29 | | - }); |
| 27 | + $('input[name=v_account]').change(function(){ |
| 28 | + $('#v_account').text($(this).val()); |
| 29 | + }); |
30 | 30 |
|
31 | | - $('input[name=v_password]').change(function(){ |
32 | | - if($('input[name=v_password]').attr('type') == 'text') |
33 | | - $('#v_password').text($(this).val()); |
34 | | - else |
35 | | - $('#v_password').text(Array($(this).val().length+1).join('*')); |
36 | | - }); |
| 31 | + $('input[name=v_password]').change(function(){ |
| 32 | + if($('input[name=v_password]').attr('type') == 'text') |
| 33 | + $('#v_password').text($(this).val()); |
| 34 | + else |
| 35 | + $('#v_password').text(Array($(this).val().length+1).join('*')); |
| 36 | + }); |
37 | 37 |
|
38 | | - $('.toggle-psw-visibility-icon').click(function(){ |
39 | | - if($('input[name=v_password]').attr('type') == 'text') |
40 | | - $('#v_password').text($('input[name=v_password]').val()); |
41 | | - else |
42 | | - $('#v_password').text(Array($('input[name=v_password]').val().length+1).join('*')); |
43 | | - }); |
44 | | - }); |
45 | | - </script> |
46 | | - <script src="/js/pages/edit.package.js"></script> |
| 38 | + $('.toggle-psw-visibility-icon').click(function(){ |
| 39 | + if($('input[name=v_password]').attr('type') == 'text') |
| 40 | + $('#v_password').text($('input[name=v_password]').val()); |
| 41 | + else |
| 42 | + $('#v_password').text(Array($('input[name=v_password]').val().length+1).join('*')); |
| 43 | + }); |
| 44 | + }); |
| 45 | + </script> |
| 46 | + <script src="/js/pages/edit.package.js"></script> |
0 commit comments