From 8da98ce19cc022c4d67a7150f25a28e5218aad00 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 28 Aug 2014 16:26:30 +1000 Subject: [PATCH] Adding asterisks to required fields. Addressing BugHerd #454. --- app/views/admin/enterprises/_form.html.haml | 12 ++++++++++-- app/views/admin/enterprises/_required.html.haml | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 app/views/admin/enterprises/_required.html.haml diff --git a/app/views/admin/enterprises/_form.html.haml b/app/views/admin/enterprises/_form.html.haml index 07be41dd6e..b5107e2bc4 100644 --- a/app/views/admin/enterprises/_form.html.haml +++ b/app/views/admin/enterprises/_form.html.haml @@ -9,11 +9,13 @@ %fieldset.eleven.columns.alpha.no-border-bottom %legend Primary Details .row - .alpha.eleven.columns + .alpha.twelve.columns .three.columns.alpha = f.label :name .eight.columns.omega = f.text_field :name, { placeholder: "eg. Professor Plum's Biodynamic Truffles" } + .one.columns.omega + = render 'required' .row .alpha.eleven.columns .three.columns.alpha @@ -79,13 +81,15 @@ = f.fields_for :address do |af| - %fieldset.eleven.columns.alpha.no-border-bottom + %fieldset.twelve.columns.alpha.no-border-bottom %legend Address .row .three.columns.alpha = af.label :address1 .eight.columns.omega = af.text_field :address1, { placeholder: "eg. 123 High Street"} + .one.columns.omega + = render 'required' .row .alpha.three.columns = af.label :address2 @@ -100,6 +104,8 @@ = af.text_field :city, { placeholder: "eg. Northcote"} .four.columns.omega = af.text_field :zipcode, { placeholder: "eg. 3070"} + .one.columns.omega + = render 'required' .row .three.columns.alpha = af.label :state_id, 'State' @@ -109,6 +115,8 @@ = af.collection_select :state_id, af.object.country.states, :id, :name, {}, :class => "select2 fullwidth" .four.columns.omega = af.collection_select :country_id, available_countries, :id, :name, {}, :class => "select2 fullwidth" + .one.columns.omega + = render 'required' %fieldset.eleven.columns.alpha.no-border-bottom %legend Contact Details .row diff --git a/app/views/admin/enterprises/_required.html.haml b/app/views/admin/enterprises/_required.html.haml new file mode 100644 index 0000000000..9a0c2ca34b --- /dev/null +++ b/app/views/admin/enterprises/_required.html.haml @@ -0,0 +1,2 @@ +.with-tip{'data-powertip' => 'Required - You need to fill this field to complete the form.'} + %a *