Skip to content

Commit

Permalink
Add Dropdowns to restrict ranges on X-edit form
Browse files Browse the repository at this point in the history
  • Loading branch information
cheyenneweaver committed Jan 7, 2015
1 parent 8bac86c commit 7407cee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/views/apprenticeships/_xedit.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
Frequency
%dd
#frequency.field.text
= editable_link_to "How many?", field: :hours, resource: @apprenticeship, type: :text
= editable_link_to "How many?", field: :hours, resource: @apprenticeship, type: :select, data: {source: "{'4':'4', '5':'5', '6':'6', '7':'7', '8':'8', '9':'9', '10':'10', '11':'11', '12':'12' }"}
hours per week
- if !show
%a{ href: "javascript:;", rel: 'popover', data: {placement: "right", content:"How often will you meet? We have a limit of 16 hours/week."} }
Expand Down Expand Up @@ -207,7 +207,7 @@
- if !show
%a{ href: "javascript:;", rel: 'popover', data: {placement: "right", content:"If it's a 'Residential' address we'll only display a map of the neighborhood, while a 'Commercial' address will be displayed with a map of the exact location."} }
%i.fa.fa-question-circle.small-icon
%br
%br
- if !show || !@apprenticeship.location_private || current_user && (current_user.signedup?(@apprenticeship) or current_user==@apprenticeship.user)
Expand Down Expand Up @@ -236,7 +236,7 @@
= editable_link_to "Describe your apprentice(s)", field: :gender, resource: @apprenticeship, type: :select, link_text: gender_text, data: { source: '{"false" : "Girls/Women", "true" : "Everyone"}'}
ages
#min-age.field.select
= editable_link_to "14", field: :age_min, resource: @apprenticeship, type: :number
= editable_link_to "14", field: :age_min, resource: @apprenticeship, type: :select, data: {source: "{'14':'14','15':'15','16':'16','17':'17','18':'18' }"}
\-
#max-age.field.select
= editable_link_to "and Up", field: :age_max, resource: @apprenticeship, type: :select, data: {source: "{'14':'14','15':'15','16':'16','17':'17','18':'18', 100 :'and Up' }"}
Expand All @@ -252,7 +252,7 @@
%dd
Up to
#registration-max.field.number
= editable_link_to "2", field: :registration_max, resource: @apprenticeship, type: :text
= editable_link_to "2", field: :registration_max, resource: @apprenticeship, type: :select, data: {source: "{'1':'1','2':'2','3':'3','4':'4','5':'5' }"}
Apprentice(s)
- if !show
%a{ href: "javascript:;", rel: 'popover', data: {placement: "right", content:"We suggest you start with 1-3 apprentice(s) if you're new to teaching or collaborating. You can always offer another apprenticeship later."} }
Expand Down

0 comments on commit 7407cee

Please sign in to comment.