Skip to content

Instantly share code, notes, and snippets.

@x37v
Created September 14, 2010 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save x37v/579691 to your computer and use it in GitHub Desktop.
Save x37v/579691 to your computer and use it in GitHub Desktop.
<div id="edit_user_form" class="blue_fields">
<%= form_for [:admin, @user] do |f| %>
<%= qm_error_messages("account information", @user) %>
<div>
<%= f.check_box :admin %>
<%= f.label :admin, "Is an admin?" %>
</div>
<br />
<div>
<%= f.label :email, "*Email Address" %>
<%= f.text_field :email %>
</div>
<div>
<%= f.label :username, "*User Name" %>
<%= f.text_field :username %>
</div>
<h6>Leave the password blank if you don't want to change it.</h6>
<div>
<%= f.label :password %>
<%= f.password_field :password %>
</div>
<div>
<%= f.label :password_confirmation %>
<%= f.password_field :password_confirmation %>
</div>
<% if @user.user_validation %>
<% f.fields_for @user.user_validation do |uv| %>
<div>
<%= uv.label :first_name, "*First Name" %>
<%= uv.text_field :first_name %>
</div>
<div>
<%= uv.label :last_name, "*Last Name" %>
<%= uv.text_field :last_name %>
</div>
<div>
<%= uv.label :address, "Street Address" %>
<%= uv.text_field :address %>
</div>
<div>
<%= uv.label :city, "*City" %>
<%= uv.text_field :city %>
</div>
<div>
<%= uv.label :state, "*State" %>
<%= uv.text_field :state %>
</div>
<div>
<%= uv.label :zipcode, "*Zip Code" %>
<%= uv.text_field :zipcode %>
</div>
<div>
<%= uv.label :phone, "Phone Number" %>
<%= uv.text_field :phone %>
</div>
<div>
<%= uv.label :paypal_email, "*PayPal Email" %>
<%= uv.text_field :paypal_email %>
</div>
<% end %>
<% end %>
<br />
<p><%= f.submit "Update User" %></p>
<% end %>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment