Skip to content

Commit

Permalink
Updated account forms
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Bartlett committed Feb 5, 2015
1 parent e68aa57 commit 2b966f8
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 16 deletions.
2 changes: 1 addition & 1 deletion media/dist/vendor.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions media/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ $.validator.setDefaults({
errorPlacement: function(error, element) {
if(element.parent('.input-group').length) {
error.insertAfter(element.parent());
} else if(element.parent().parent('.input-group').length) {
error.insertAfter(element.parent().parent());
} else {
error.insertAfter(element);
}
Expand Down
46 changes: 35 additions & 11 deletions templates/includes/modals/account.html
Original file line number Diff line number Diff line change
@@ -1,42 +1,66 @@
<div id="lcb-account" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<form class="validate form-horizontal" action="/account/settings" method="post">
<form action="/account/settings" method="post"
class="validate form-horizontal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title"><i class="icon-cogs"></i> Account Settings</h4>
<button type="button" class="close"
data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">
<i class="icon-cogs"></i> Account Settings
</h4>
</div>
<div class="modal-body">
<div class="form-group">
<label class="control-label col-sm-6">Username</label>
<div class="col-sm-11">
<input class="form-control" name="username" type="text" value="{{ account.username }}" required />
<div class="input-group">
<span class="input-group-addon">@</span>
<input type="text" name="username" required
class="lcb-room-slug form-control"
value="{{ account.username }}" >
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-6">Email</label>
<div class="col-sm-11">
<input class="required email form-control" name="email" type="text" value="{{ account.email }}" required />
<input type="text" name="email" required
class="required email form-control"
value="{{ account.email }}" />
</div>
</div>
{% if account.local %}
<div class="form-group">
<label class="control-label col-sm-6">New Password</label>
<label class="control-label col-sm-6">
New Password
</label>
<div class="col-sm-11">
<input class="form-control" name="new-password" type="password" minlength="4" maxlength="64" data-clear="true" />
<input type="password" name="new-password"
class="form-control"
minlength="4" maxlength="64"
data-clear="true" />
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-6">Confirm New Password</label>
<label class="control-label col-sm-6">
Confirm New Password
</label>
<div class="col-sm-11">
<input class="form-control" name="confirm-password" type="password" minlength="4" maxlength="64" />
<input type="password" name="confirm-password"
class="form-control"
minlength="4" maxlength="64" />
</div>
</div>
{% endif %}
<div class="form-group">
<label class="control-label col-sm-6">Current Password <small>Required</small></label>
<label class="control-label col-sm-6">
Current Password <small>Required</small>
</label>
<div class="col-sm-11">
<input class="form-control" name="current-password" type="password" minlength="4" maxlength="64" required />
<input type="password" name="current-password"
class="form-control"
minlength="4" maxlength="64" required />
</div>
</div>
<p class="alert response" style="display: none;"></p>
Expand Down
13 changes: 10 additions & 3 deletions templates/includes/modals/add-room.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,22 @@ <h4 class="modal-title">Add Room</h4>
<div class="modal-body">
<div class="form-group">
<label for="lcb-room-name">Name</label>
<input type="text" class="lcb-room-name form-control" placeholder="Name">
<input type="text" placeholder="Name"
class="lcb-room-name form-control" >
</div>

<div class="form-group">
<label for="lcb-room-slug">Slug</label>
<input type="text" class="lcb-room-slug form-control" placeholder="Slug">
<div class="input-group">
<span class="input-group-addon">#</span>
<input type="text" placeholder="Slug"
class="lcb-room-slug form-control" >
</div>
</div>
<div class="form-group">
<label for="lcb-room-name">Description</label>
<input type="text" class="lcb-room-description form-control" placeholder="Description">
<input type="text" placeholder="Description"
class="lcb-room-description form-control">
</div>
</div>
<div class="modal-footer">
Expand Down
7 changes: 6 additions & 1 deletion templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ <h2 class="lcb-login-box-heading">Sign in</h2>
<form class="lcb-login-box lcb-login-box-registration validate" action="/account/register" method="post" style="display: none;">
<h2 class="lcb-login-box-heading">Register</h2>
<div class="form-group">
<input class="required form-control" name="username" type="text" placeholder="Username" maxlength="24" />
<div class="input-group">
<span class="input-group-addon">@</span>
<input type="text" name="username"
class="required form-control"
placeholder="Username" maxlength="24" >
</div>
</div>
<div class="form-group">
<input class="required email form-control" name="email" type="text" placeholder="Email" />
Expand Down

0 comments on commit 2b966f8

Please sign in to comment.