mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-03 17:22:20 +09:00
After install, allow login by both user_id and email_address by default
This commit is contained in:
parent
2cdcfd13cf
commit
f92219f328
4 changed files with 15 additions and 9 deletions
|
|
@ -29,13 +29,13 @@
|
|||
<div class="x_control-group">
|
||||
<label for="aNick" class="x_control-label">{$lang->nick_name}</label>
|
||||
<div class="x_controls">
|
||||
<input name="nick_name" type="text" id="aNick" required value="admin" />
|
||||
<input name="nick_name" type="text" id="aNick" required value="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="aId" class="x_control-label">{$lang->user_id}</label>
|
||||
<div class="x_controls">
|
||||
<input name="user_id" type="text" id="aId" required value="admin" />
|
||||
<input name="user_id" type="text" id="aId" required value="" />
|
||||
</div>
|
||||
</div>
|
||||
<p class="install_help">{$lang->install_notandum}</p>
|
||||
|
|
|
|||
|
|
@ -6,4 +6,13 @@ jQuery(function($){
|
|||
$("p.db_type_" + $(this).val()).show();
|
||||
}).triggerHandler("click");
|
||||
}
|
||||
if($("input[name='user_id']").size() && $("input[name='email_address']").size()) {
|
||||
var user_id_input = $("input[name='user_id']");
|
||||
var email_input = $("input[name='email_address']");
|
||||
email_input.on("blur", function() {
|
||||
if (user_id_input.val() == "") {
|
||||
user_id_input.val(email_input.val().replace(/@.+$/g, "").replace(/[^a-zA-Z0-9_]/g, ""));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue