Merge branch 'elmo2k3-generate_password'
New: "Generate password"-button
This commit is contained in:
commit
d29e2ff2c7
2 changed files with 18 additions and 2 deletions
|
@ -193,6 +193,11 @@
|
|||
<td>
|
||||
<input name="password" class="textinput" type="password" placeholder="New password"/></br>
|
||||
<input name="password_rep" class="textinput" type="password" placeholder="New password (repeat)"/>
|
||||
|
||||
<p>
|
||||
<input type="button" class="button button-small" name="Text 1" value="Generate password"
|
||||
onclick="pass=generatePassword();this.form.password.value=pass;this.form.password_rep.value=pass;this.form.password.type='text';this.form.password_rep.type='text'">
|
||||
</p>
|
||||
</td>
|
||||
|
||||
<?php if(defined('DBC_USERS_MAILBOXLIMIT')){ ?>
|
||||
|
@ -210,4 +215,4 @@
|
|||
<p>
|
||||
<input type="submit" class="button button-small" value="Save settings">
|
||||
</p>
|
||||
</form>
|
||||
</form>
|
||||
|
|
|
@ -3,6 +3,17 @@
|
|||
<head>
|
||||
<title>WebMUM</title>
|
||||
<link rel=stylesheet href="<?php echo FRONTEND_BASE_PATH; ?>include/css/style.css" type="text/css" media=screen>
|
||||
<script type="text/javascript">
|
||||
function generatePassword() {
|
||||
var length = 9,
|
||||
charset = "abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!#",
|
||||
retVal = "";
|
||||
for (var i = 0, n = charset.length; i < length; ++i) {
|
||||
retVal += charset.charAt(Math.floor(Math.random() * n));
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -14,4 +25,4 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="content"> <!-- Opening content -->
|
||||
<div id="content"> <!-- Opening content -->
|
||||
|
|
Loading…
Add table
Reference in a new issue