app/views/organizations/_form.html.haml in artfully_ose-1.2.0.pre.4 vs app/views/organizations/_form.html.haml in artfully_ose-1.2.0.pre.5
- old
+ new
@@ -1,20 +1,52 @@
-.row-fluid
- .span6
- %h3 Details
- %ul
- %li
- =form.label :name, "Organization Name"
- =form.text_field :name, :class => 'input-xlarge no-fa'
- %li
- =form.label :email, "Contact Email"
- =form.email_field :email, :class => 'input-xlarge email-popup', "data-content" => "Your patrons will be able to respond to this email address when receiving ticket/donation receipts. You can change this at any time."
- %li
- =form.label :time_zone, "Time Zone"
- =form.time_zone_select( :time_zone, ActiveSupport::TimeZone.us_zones, {:default => "Eastern Time (US & Canada)"}, {:class => 'input-xlarge'})
- .span6
- %h3 Preferences
- %ul
- %li
- %label.checkbox
- = form.check_box :receive_daily_sales_report
- Send the organization admin a daily sales report.
+%fieldset.ng-cloak
+ %legend Required Info
+ .control-group{"ng-class" => "{error: ! data.organization.valid_name}"}
+ = form.label :name, "Organization Name", :class => 'control-label'
+ .controls
+ = form.text_field :name, :placeholder => 'Example Organization', :required => true, :class => 'input-xlarge no-fa', "ng-model" => "data.organization.name", "ng-init" => "data.organization.name = '#{form.object.name}'"
+ %p.text-error{"ng-hide" => "data.organization.valid_name"} Artful.ly already has an organization with this name and zip code. If you forgot your password or would like to be added to the pre-existing organization please email #{mail_to "support@artful.ly"}.
+
+ .control-group
+ = form.label :email, 'Organization Email', :class=>'control-label'
+ .controls
+ = form.email_field :email, :placeholder => 'contact@organization.org', :required => true, :class => 'input-xlarge email-popup', "data-content" => "Your patrons will be able to respond to this email address when receiving ticket/donation receipts. You can change this at any time."
+ %span.help-inline (default contact for your patrons)
+
+%fieldset
+ %legend Details
+ .control-group
+ = form.label :country, :class => 'control-label'
+ .controls= form.select :country, [(h form.object.country || "United States")], selected: (form.object.country || "United States"), :required => true
+
+ .control-group
+ .control-label.form-inline
+ = form.label :state, 'State'
+ &
+ = form.label :zip, 'Zip'
+ .controls
+ = form.select :state, [nil, (h form.object.state || "New York")], selected: (form.object.state), :required => true
+ = form.text_field :zip, :placeholder => '10001', :class => 'span1', :required => true, "ng-model" => "data.organization.zip", "ng-init" => "data.organization.zip = '#{form.object.zip}'"
+
+ .control-group
+ = form.label :phone_number, 'Phone Number', :class => 'control-label'
+ .controls= form.text_field :phone_number, :placeholder => '(888) 692-7878', :required => true
+
+ .control-group
+ = form.label :website, :class => 'control-label'
+ .controls
+ .input-prepend
+ %span.add-on http://
+ = form.text_field :website, :placeholder => 'example.com'
+
+ .control-group
+ = form.label :discipline, :class => 'control-label hidden'
+ .controls= form.select :discipline, ['Dance', 'Film & Electronic Media', 'Literary Arts', 'Music', 'Theater', 'Visual Arts', 'Other'], {:include_blank => 'What kind of work does your organization primarily do?'}, {:class => 'span5', :required => true}
+
+ .control-group
+ = form.label :time_zone, "Time Zone", :class => 'control-label'
+ .controls= form.time_zone_select :time_zone, ActiveSupport::TimeZone.us_zones, {:default => "Eastern Time (US & Canada)"}, {:class => 'span5', :required => true}
+
+ .control-group
+ %label.controls.checkbox
+ = form.check_box :receive_daily_sales_report
+ Send me emails summarizing my sales for each day.