diff options
author | M.Gergo | 2020-06-09 23:40:04 +0200 |
---|---|---|
committer | M.Gergo | 2020-06-09 23:40:04 +0200 |
commit | 6359761e029be169a9f0ea2b1e3410408c373ec4 (patch) | |
tree | 3cd7bc3f9f4c75e7e47e6608dddea892358ea681 /mayor-orig/mayor-base/www/skin/classic | |
parent | 99481ab82a386c30d970592c5b8804e5c8e6df6e (diff) | |
download | mayor-6359761e029be169a9f0ea2b1e3410408c373ec4.tar.gz mayor-6359761e029be169a9f0ea2b1e3410408c373ec4.zip |
Rev: 4656rev4656
Diffstat (limited to 'mayor-orig/mayor-base/www/skin/classic')
-rw-r--r-- | mayor-orig/mayor-base/www/skin/classic/module-password/html/changePassword.phtml | 9 | ||||
-rw-r--r-- | mayor-orig/mayor-base/www/skin/classic/module-password/javascript/changePassword.jquery.min.js | 32 |
2 files changed, 41 insertions, 0 deletions
diff --git a/mayor-orig/mayor-base/www/skin/classic/module-password/html/changePassword.phtml b/mayor-orig/mayor-base/www/skin/classic/module-password/html/changePassword.phtml index 59dab0ea..295f6eeb 100644 --- a/mayor-orig/mayor-base/www/skin/classic/module-password/html/changePassword.phtml +++ b/mayor-orig/mayor-base/www/skin/classic/module-password/html/changePassword.phtml @@ -33,6 +33,15 @@ echo '<tbody>'."\n"; echo '<tr>'."\n"; echo '<td>'."\n"; + echo _PWGEN; + echo '</td>'."\n"; + echo '<td>'."\n"; + echo '<input id="txtPwgen" type="text" value="" maxlength="32" />'."\n"; + echo '<div id="btnPwgen" class="icon-fork" style="cursor: pointer"></div>'; + echo '</td>'."\n"; + echo '</tr>'."\n"; + echo '<tr>'."\n"; + echo '<td>'."\n"; echo _USERNAME; echo '</td>'."\n"; echo '<td>'."\n"; diff --git a/mayor-orig/mayor-base/www/skin/classic/module-password/javascript/changePassword.jquery.min.js b/mayor-orig/mayor-base/www/skin/classic/module-password/javascript/changePassword.jquery.min.js new file mode 100644 index 00000000..221c2f98 --- /dev/null +++ b/mayor-orig/mayor-base/www/skin/classic/module-password/javascript/changePassword.jquery.min.js @@ -0,0 +1,32 @@ +$(function() { + + var str = randString($('#newpassword')); + $("#btnPwgen").click(function() { + $('#newPassword').val(str); + $('#verification').val(str); + }); + $('#txtPwgen').val(str); + +}); + +function randString(id){ + var dataSet = 'a-z,A-Z,0-9'.split(','); + var possible = ''; + if($.inArray('a-z', dataSet) >= 0){ + possible += 'abcdefghijklmnopqrstuvwxyz'; + } + if($.inArray('A-Z', dataSet) >= 0){ + possible += 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; + } + if($.inArray('0-9', dataSet) >= 0){ + possible += '0123456789'; + } + if($.inArray('#', dataSet) >= 0){ + possible += '![]{}()%&*$#^<>~@|'; + } + var text = ''; + for(var i=0; i < 10; i++) { + text += possible.charAt(Math.floor(Math.random() * possible.length)); + } + return text; +} |