<%= form_for @user, :html => {:id => "account_edit"} do |f| %>
-
+
<%= f.label :email, nil, {:class => "control-label"}%>
<%= f.text_field :email, {:class => "span12"}%>
+
+
<%= f.label :first_name, nil, {:class => "control-label"}%>
<%= f.text_field :first_name, {:class => "span12"} %>
+
+
<%= f.label :last_name, nil, {:class => "control-label"}%>
<%= f.text_field :last_name, {:class => "span12"} %>
-
+
+
+
<%= f.label :password, nil, {:class => "control-label"}%>
<%= f.password_field :password, {:class => "span12", :placeholder => "Enter Password"}%>
+
+
<%= f.label :password_confirmation, nil, {:class => "control-label"}%>
<%= f.password_field :password_confirmation, {:class => "span12", :placeholder => "Enter Password"} %>
-
+
+
<%= f.label :admin, nil, {:class => "control-label"}%>
<%= f.select(:admin, @admin_select) %>
@@ -70,7 +79,16 @@ function validation(){
minlength: "Your password must be at least 6 characters long",
equalTo: "Please enter the same password as above"
}
- }
+ },
+ highlight: function(label) {
+ $("#submit_button").attr('disabled','disabled');
+ $(label).closest('.control-group').addClass('error');
+ },
+ success: function(label) {
+ label.closest('.control-group').addClass('success');
+ $("#submit_button").removeAttr('disabled');
+ }
+
});
};