Permalink
Browse files

User settings form

  • Loading branch information...
tiwilliam committed Jun 12, 2012
1 parent 347b398 commit d4d628a167e93fc5f824d31e329f4489f9f77cd1
Showing with 26 additions and 2 deletions.
  1. +14 −2 static/js/app/view/user/profile.js
  2. +12 −0 static/template/layout/user/profile.html
@@ -1,7 +1,19 @@
define(function() {
define(['text!template/layout/user/profile.html'],
function(UserProfileMarkup) {
var UserProfileView = Backbone.View.extend({
events: {
'click #user-save-btn': 'onUserProfileClick'
},
onUserProfileClick: function(e) {
e.preventDefault();
console.log('onUserProfileClick');
},
render: function() {
var content = this.make('h1', {}, 'Hello user profile view');
var params = {};
params.user = window.session.attributes;
var content = Mustache.render(UserProfileMarkup, params);
this.$el.append(content);
return this;
}
@@ -0,0 +1,12 @@
<h1>User settings</h1>
<br />
<form method="post" action="#">
<label of="email">Email</label>
<input name="email" type="text" value="{{ user.email }}" />
<label of="email">Password</label>
<input name="password" type="text" value="" />
<label of="email">Password confirm</label>
<input name="password_again" type="text" value="" />
<br />
<button id="user-save-btn" class="btn">Save</button>
</form>

0 comments on commit d4d628a

Please sign in to comment.