app/views/users/edit.html.haml in wheels-0.1.13 vs app/views/users/edit.html.haml in wheels-0.1.14

- old
+ new

@@ -6,39 +6,56 @@ #errorExplanation %h2= "#{pluralize(resource.errors.count, "error")} prohibited this change:" %ul - resource.errors.full_messages.each do |msg| %li= msg + + .fieldGroup + .fieldGroupTitle Edit your personal info + = f.fields_for :profile do |pf| + .field + .fieldName= pf.label :first_name + .fieldValue= pf.text_field :first_name + .field + .fieldName= pf.label :last_name + .fieldValue= pf.text_field :last_name + .field + .fieldName= f.label :email + .fieldValue= f.text_field :email + .field + .fieldName= pf.label :phone + .fieldValue= pf.text_field :phone + .field + .fieldName= label_tag "Company / Organization" + .fieldValue= pf.text_field :company + .field + .fieldName= pf.label :position + .fieldValue= pf.text_field :position + .fieldGroup + .fieldGroupTitle Change your password .field - .fieldName Old Password: - = f.password_field :old_password, :id=>"old_password" + .fieldName= label_tag "Old Password:" + .fieldValue= f.password_field :old_password, :id=>"old_password" .field - .fieldName New Password: - = f.password_field :password, :id=>"password" + .fieldName= label_tag "New Password:" + .fieldValue= f.password_field :password, :id=>"password" .field - .fieldName Confirm Password: - = f.password_field :password_confirmation + .fieldName= label_tag "Confirm Password:" + .fieldalue= f.password_field :password_confirmation .submit= f.submit "Change Password" :css .extra_form_data { display: none; } = content_for :head do - = javascript_include_tag 'jquery.validate' + = javascript_include_tag %w(jquery.validate jquery-validate/extra-methods.js) :javascript var checkingPassword = true; $(function(){ - jQuery.validator.addMethod("verify_user", function(value, element, params) { - //alert($(element).attr('data-verify-user-path')); - return $.ajax({ - async: false, - url: $(element).attr('data-verify-user-path')+ '?password='+value - }).responseText == "true"; - }, "Password is incorrect."); $('form').validate({onkeyup: function(element) {}}); $('#old_password').rules("add", {verify_user : true, alphanumeric: true}) });