Created
August 16, 2012 18:01
-
-
Save jasonswett/3372164 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_for(@client) do |f| %> | |
<% if @client.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@client.errors.count, "error") %> prohibited this client from being saved:</h2> | |
<ul> | |
<% @client.errors.full_messages.each do |msg| %> | |
<li><%= msg %></li> | |
<% end %> | |
</ul> | |
</div> | |
<% end %> | |
<%= f.hidden_field :salon_id, :value => current_user.salon.id %> | |
<fieldset class="chunk no_heading" id="client_and_notes"> | |
<fieldset class="appointment_client_fieldset"> | |
<div class="field"> | |
<%= f.label :name %><br /> | |
<%= f.text_field :name %> | |
</div> | |
<div class="field"> | |
<%= f.label :phone %><br /> | |
<%= f.text_field :phone %> | |
</div> | |
<div class="field"> | |
<%= f.label :email %><br /> | |
<%= f.text_field :email %> | |
</div> | |
</fieldset> | |
<fieldset class="appointment_client_fieldset" id="appointment_client_address_fieldset"> | |
<%= f.fields_for @client.address do |address_form| %> | |
<div class="field"> | |
<%= address_form.label :line1, "Address Line 1" %><br /> | |
<%= address_form.text_field :line1 %> | |
</div> | |
<div class="field"> | |
<%= address_form.label :line2, "Line 2" %><br /> | |
<%= address_form.text_field :line2 %> | |
</div> | |
<div class="field"> | |
<%= address_form.label :city %><br /> | |
<%= address_form.text_field :city %> | |
</div> | |
<div class="field"> | |
<%= address_form.label :state_id %><br /> | |
<%= select_tag "client[address][state_id]", options_from_collection_for_select(@states, :id, :name, @client.address.state.id), :autocomplete => 'off' %> | |
</div> | |
<div class="field"> | |
<%= address_form.label :zip %><br /> | |
<%= address_form.text_field :zip %> | |
</div> | |
<% end %> | |
</fieldset> | |
<div class="clear"></div> | |
</fieldset> | |
<fieldset class="chunk no_heading"> | |
<div class="field" id="about_this_client"> | |
<%= f.label :notes, "About This Client" %><br /> | |
<%= f.text_area :notes %> | |
</div> | |
<div id="client_history"> | |
Appointment History | |
<ul class="standard"> | |
<% @client.appointments.each do |a| %> | |
<li class="<%= (a.has_payments) ? "payments" : "no_payments" %>"> | |
<%= link_to a.start_time.strftime("%m/%d/%Y"), edit_appointment_path(a.id) %> | |
<%= (a.has_payments) ? "" : "(not checked out)" %> | |
<br /> | |
<strong>Stylist:</strong> <%= a.stylist.name %><br /> | |
<strong>Services:</strong> <%= a.service_list %><br /> | |
<% if a.products.count > 0 %> | |
<strong>Products:</strong> <%= a.product_list %><br /> | |
<% end %> | |
<% if a.notes != "" %> | |
<strong>Notes:</strong> <%= a.notes %> | |
<% end %> | |
</li> | |
<% end %> | |
</ul> | |
</div> | |
<div class="clear"></div> | |
</fieldset> | |
<div class="actions"> | |
<%= f.submit %> | |
</div> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment