Fix username input

This commit is contained in:
Mattias Erming 2014-11-05 23:19:29 +01:00
parent a88b06bc27
commit 7aafa8a956
3 changed files with 11 additions and 6 deletions

View File

@ -128,18 +128,18 @@
<label>Nick</label> <label>Nick</label>
</div> </div>
<div class="col-sm-5"> <div class="col-sm-5">
<input class="input" name="nick" value="<%= defaults.nick %>"> <input class="input" id="nick" name="nick" value="<%= defaults.nick %>">
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
<div class="col-sm-3"> <div class="col-sm-3">
<label>Username</label> <label title="* Optional">Username</label>
</div> </div>
<div class="col-sm-5"> <div class="col-sm-5">
<input class="input" name="nick" value="<%= defaults.username %>"> <input class="input" id="username" name="username" value="<%= defaults.username %>">
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
<div class="col-sm-3"> <div class="col-sm-3">
<label>Real Name</label> <label>Real name</label>
</div> </div>
<div class="col-sm-9"> <div class="col-sm-9">
<input class="input" name="realname" class="input" value="<%= defaults.realname %>"> <input class="input" name="realname" class="input" value="<%= defaults.realname %>">

View File

@ -685,6 +685,11 @@ $(function() {
event, values event, values
); );
}); });
forms.on("input", "#nick", function() {
var nick = $(this).val();
$("#username").val(nick);
});
Mousetrap.bind([ Mousetrap.bind([
"command+up", "command+up",

View File

@ -150,9 +150,9 @@ module.exports = {
// Username // Username
// //
// @type string // @type string
// @default "" // @default "shout-user"
// //
username: "", username: "shout-user",
// //
// Real Name // Real Name