From 6359761e029be169a9f0ea2b1e3410408c373ec4 Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Tue, 9 Jun 2020 23:40:04 +0200 Subject: Rev: 4656 --- mayor-orig/mayor-base/log/mayor-base.rev | 2 +- .../lang/hu_HU/module-password/changePassword.php | 1 + .../module-password/html/changePassword.phtml | 9 ++++++ .../javascript/changePassword.jquery.min.js | 32 ++++++++++++++++++++++ 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 mayor-orig/mayor-base/www/skin/classic/module-password/javascript/changePassword.jquery.min.js (limited to 'mayor-orig/mayor-base') diff --git a/mayor-orig/mayor-base/log/mayor-base.rev b/mayor-orig/mayor-base/log/mayor-base.rev index b5859656..4a14f368 100644 --- a/mayor-orig/mayor-base/log/mayor-base.rev +++ b/mayor-orig/mayor-base/log/mayor-base.rev @@ -1 +1 @@ -4653 +4656 diff --git a/mayor-orig/mayor-base/www/lang/hu_HU/module-password/changePassword.php b/mayor-orig/mayor-base/www/lang/hu_HU/module-password/changePassword.php index 9c56a329..94007ff8 100644 --- a/mayor-orig/mayor-base/www/lang/hu_HU/module-password/changePassword.php +++ b/mayor-orig/mayor-base/www/lang/hu_HU/module-password/changePassword.php @@ -12,5 +12,6 @@ define('_USERNAME','Felhasználói név'); define('_NEW_PASSWORD','Új jelszó'); define('_VERIFICATION','Megerősítés'); define('_OK','OK'); +define('_PWGEN','Ajánlott jelszó'); ?> 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 @@ -31,6 +31,15 @@ echo ''."\n"; echo ''."\n"; echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo _PWGEN; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo '
'; + echo ''."\n"; + echo ''."\n"; echo ''."\n"; echo ''."\n"; echo _USERNAME; 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; +} -- cgit v1.2.3