From c60eea07819a68ad0d51a3c05a51c7277ef614d4 Mon Sep 17 00:00:00 2001 From: Ken Johnson Date: Wed, 22 May 2013 03:30:53 -0400 Subject: [PATCH] prolly about as close as I am gonna get tonight --- app/views/layouts/admin/_get_user.html.erb | 26 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/app/views/layouts/admin/_get_user.html.erb b/app/views/layouts/admin/_get_user.html.erb index 7c719a3..d5dfbb2 100644 --- a/app/views/layouts/admin/_get_user.html.erb +++ b/app/views/layouts/admin/_get_user.html.erb @@ -14,22 +14,31 @@
<%= 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'); + } + }); };