2012-08-25 04:14:51 +00:00
|
|
|
<%= form_for(@user) do |f| %>
|
|
|
|
<% if @user.errors.any? %>
|
|
|
|
<div id="error_explanation">
|
|
|
|
<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<% @user.errors.full_messages.each do |msg| %>
|
|
|
|
<li><%= msg %></li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div class="field">
|
|
|
|
<%= f.label :name %><br />
|
|
|
|
<%= f.text_field :name %>
|
|
|
|
</div>
|
2012-09-16 03:41:17 +00:00
|
|
|
<div class="field">
|
|
|
|
<%= f.label :email %><br />
|
|
|
|
<%= f.email_field :email %>
|
|
|
|
</div>
|
|
|
|
<% if @user.id.blank? %>
|
|
|
|
<div class="field">
|
|
|
|
<%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
|
|
|
|
<%= f.password_field :password, :autocomplete => "off" %>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<%= f.label :password_confirmation %><br />
|
|
|
|
<%= f.password_field :password_confirmation %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2012-08-25 04:14:51 +00:00
|
|
|
<div class="field">
|
|
|
|
<%= f.label :card_id, "Card DB ID" %><br />
|
|
|
|
<%= f.number_field :card_id, :in => 10...201 %>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<%= f.label :card_number, "Card Number" %><br />
|
|
|
|
<%= f.text_field :card_number %>
|
|
|
|
</div>
|
|
|
|
<div class="field">
|
|
|
|
<%= f.label :card_permissions %><br />
|
|
|
|
<%= f.select :card_permissions, [["Enabled",1],["Disabled",255]] %>
|
|
|
|
</div>
|
|
|
|
<div class="actions">
|
|
|
|
<%= f.submit %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|