From ef6efb95bf94d185360595dab2d3af4c133d686a Mon Sep 17 00:00:00 2001 From: jimi Date: Tue, 17 Mar 2009 23:03:01 -0500 Subject: [PATCH] More form and css work --- app/views/employees/_form.html.erb | 93 +++++++++++++------------- app/views/layouts/application.html.erb | 2 +- app/views/loads/_form.html.erb | 29 ++++++-- public/stylesheets/1_elements.css | 1 + 4 files changed, 75 insertions(+), 50 deletions(-) diff --git a/app/views/employees/_form.html.erb b/app/views/employees/_form.html.erb index 452f0db..2f8f65d 100644 --- a/app/views/employees/_form.html.erb +++ b/app/views/employees/_form.html.erb @@ -4,46 +4,60 @@
Personal Info - + + + <%= f.text_field :firstname, :maxsize => "16" %> + <%= f.text_field :lastname, :maxsize => "16" %> + <%= f.text_field :street, :maxsize => "30" %> - + - + - - - + + + +
<%= f.label :firstname, "First Name" %> <%= f.label :lastname, "Last Name" %>
- <%= f.text_field :firstname, :size => "12", :maxsize => 30 %> - <%= f.text_field :lastname, :size => "12" %>
<%= f.label :street %>
- <%= f.text_field :street, :size => "30" %>
<%= f.label :city %><%= f.label :city %> <%= f.label :state, "St" %><%= f.label :zip %><%= f.label :zip %>
<%= f.text_field :city, :size => "16" %><%= f.text_field :state, :size => "1" %><%= f.text_field :zip, :size => "6" %> + <%= f.text_field :city, :maxsize => "16" %> + <%= f.text_field :state, :maxsize => "2" %> + <%= f.text_field :zip, :maxsize => "7" %>
+
+
+ Tax Info + + + - + - - - + @@ -57,10 +71,14 @@ - - - - + + + +
<%= f.label :dob, "Birth Date" %> <%= f.label :hired, "Hire Date" %><%= f.label :payrate, "Pay Rate" %><%= f.label :payrate, "Rate" %>
<%= f.calendar_date_select :dob, :size => "8", + + <%= f.calendar_date_select :dob, :maxsize => "10", :year_range => 70.years.ago..0.years.ago, :buttons => false %><%= f.calendar_date_select :hired, :size => "8", + + <%= f.calendar_date_select :hired, :maxsize => "10", :year_range => 20.years.ago..1.year.from_now, :buttons => false %><%= f.text_field :payrate, :size => "2" %> + <%= f.text_field :payrate, :maxsize => "4" %>
<%= f.label :tax_status, "Tax Info" %>
<%= f.text_field :phone, :size => "10" %><%= f.text_field :ssn, :size => "9" %><%= f.text_field :tax_status, :size => "1" %><%= f.text_field :dependents, :size => "1" %> + <%= f.text_field :phone, :maxsize => "13" %> + <%= f.text_field :ssn, :maxsize => "11" %> + <%= f.text_field :tax_status, :maxsize => "1" %> + <%= f.text_field :dependents, :maxsize => "2" %>
@@ -68,17 +86,20 @@
Vehicle Info - + + - - + + - - + + + <%= f.calendar_date_select :dl_expire, :maxsize => "10" %> @@ -87,8 +108,10 @@ - - + +
<%= f.label :dl_number, "License No." %><%= f.label :dl_state, "St", :class => "label" %><%= f.label :dl_expire, "Expiry", :class => "label" %><%= f.label :dl_state, "St" %><%= f.label :dl_expire, "Expiry" %>
<%= f.text_field :dl_number, :size => "12" %><%= f.text_field :dl_state, :size => "1" %> + <%= f.text_field :dl_number, :maxsize => "15" %> + <%= f.text_field :dl_state, :maxsize => "2" %> - <%= f.calendar_date_select :dl_expire, :size => "8" %>
 
<%= f.text_field :truck, :size => "12" %><%= f.text_field :trailer, :size => "12" %> + <%= f.text_field :truck, :maxsize => "12" %> + <%= f.text_field :trailer, :maxsize => "12" %>  
@@ -97,26 +120,6 @@
Recent Loads -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 81b90c3..0970636 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -4,7 +4,7 @@ <%= h(yield(:title) || "Untitled") %> <%= javascript_include_tag :defaults %> - <%= stylesheet_link_tag 'reset', 'application' %> + <%= stylesheet_link_tag :all %> <%= calendar_date_select_includes %> <%= yield(:head) %> diff --git a/app/views/loads/_form.html.erb b/app/views/loads/_form.html.erb index 415bb09..8c8f261 100644 --- a/app/views/loads/_form.html.erb +++ b/app/views/loads/_form.html.erb @@ -4,21 +4,42 @@
Load Detail - - + + - + + - + + + + + + + + + + + + + +
<%= f.label :number, "Trip Number" %><%= f.label :number, "Trip Number" %> <%= f.label :hub_in %> <%= f.label :hub_out %>
<%= f.text_field :number %><%= f.text_field :number %> <%= f.text_field :hub_in %> <%= f.text_field :hub_out %>
<%= f.label :start_date %><%= f.label :end_date %>
+ <%= f.calendar_date_select :start_date, :maxsize => "10" %> + <%= f.calendar_date_select :end_date, :maxsize => "10" %>
+
+
+ Load Expenses +
+

<%= f.submit "Submit" %>

<% end %> diff --git a/public/stylesheets/1_elements.css b/public/stylesheets/1_elements.css index 5bc4890..40a5c88 100644 --- a/public/stylesheets/1_elements.css +++ b/public/stylesheets/1_elements.css @@ -92,6 +92,7 @@ fieldset label { font-weight: bold; text-transform: uppercase; margin-top: 0.25em; + color: #333; } fieldset table {