Added password generating JS
Added password generating JS

--- a/Resources/info.php
+++ b/Resources/info.php
@@ -198,6 +198,12 @@
 return <?php echo $enabled;?>;
 }
 
+
+
+
+
+
+
 new getTerminology();
 <?php
 

--- a/Resources/main.js
+++ b/Resources/main.js
@@ -13,6 +13,26 @@
 
 
 var counter=false, cancel='', dispcred, interval;
+
+
+
+function genPwd(a,l){
+var i,
+    p='',
+    key="(=?)+.,abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+
+    
+    for (i=0; i<l; i++){
+     p+=key.charAt(Math.floor(Math.random()*key.length)); 
+    }
+
+
+if (a =='r'){ return p; }
+document.getElementById(a).value = p;
+
+
+}
+
 
 
 function resizebkgrnd(){

--- a/views/Creds/add.php
+++ b/views/Creds/add.php
@@ -110,6 +110,7 @@
 <label for="frmUser"><?php echo Lang::_("User");?></label><input type="text" name="frmUser" id="frmUser">
 
 <label for="frmCredential"><?php echo Lang::_("Password");?></label><textarea id="frmCredential" name="frmCredential"></textarea>
+<a href="javascript: genPwd('frmCredential',10);">Generate Password</a>
 
 <label for="frmAddress"><?php echo Lang::_("Address");?></label><input type="text" name="frmAddress" id="frmAddress">
 

--- a/views/Creds/edit.php
+++ b/views/Creds/edit.php
@@ -132,7 +132,7 @@
 <label for="frmUser"><?php echo Lang::_("User");?></label><input type="text" name="frmUser" id="frmUser" value="NOCHANGE">
 
 <label for="frmCredential"><?php echo Lang::_("Password");?></label><textarea id="frmCredential" name="frmCredential">NOCHANGE</textarea>
-
+<a href="javascript: genPwd('frmCredential',10);">Generate Password</a>
 <label for="frmAddress"><?php echo Lang::_("Address");?></label><input type="text" name="frmAddress" id="frmAddress" value="NOCHANGE">
 
 

--- a/views/user/add.php
+++ b/views/user/add.php
@@ -93,6 +93,7 @@
 
 
 <label for="frmPass">Password</label><input type="password" name="frmPass" autocomplete="off" onkeyup="testPassword(this.value);" id="frmPass">
+<a href="javascript: var p = genPwd('r',10); alert('The users generated password is: '+p); document.getElementById('frmPass').value = p; document.getElementById('frmPassConf').value = p;">Generate Password</a>
 <span id="passStrength"></span>
 <div id="PassNoMatch" style="display: none;" class="alert alert-error"></div>
 

--- a/views/user/changePass.php
+++ b/views/user/changePass.php
@@ -69,6 +69,8 @@
 <span id="passStrength"></span>
 <div id="PassNoMatch" style="display: none;" class="alert alert-error"></div>
 
+<a href="javascript: var p = genPwd('r',10); alert('Your new password is: '+p); document.getElementById('frmPass').value = p; document.getElementById('frmPassConf').value = p;">Generate Password</a>
+
 <label for="frmPassConf">Password Confirm</label><input type="password" name="frmPassConf" id="frmPassConf" autocomplete='off'>
 
 <input type="hidden" id="minpassStrength" disabled="true" value="<?php echo BTMain::getConf()->minpassStrength;?>">