Commit 0e7d1fd4 authored by Douwe Maan's avatar Douwe Maan

Add optional title field to service properties.

parent 7b34c9dc
......@@ -16,6 +16,7 @@
- @service.fields.each do |field|
- name = field[:name]
- title = field[:title] || name.humanize
- value = @service.send(name) unless field[:type] == 'password'
- type = field[:type]
- placeholder = field[:placeholder]
......@@ -23,7 +24,7 @@
- default_choice = field[:default_choice]
.form-group
= f.label name, class: "control-label"
= f.label name, title, class: "control-label"
.col-sm-10
- if type == 'text'
= f.text_field name, class: "form-control", placeholder: placeholder
......
......@@ -29,6 +29,7 @@
- @service.fields.each do |field|
- name = field[:name]
- title = field[:title] || name.humanize
- value = @service.send(name) unless field[:type] == 'password'
- type = field[:type]
- placeholder = field[:placeholder]
......@@ -36,7 +37,7 @@
- default_choice = field[:default_choice]
.form-group
= f.label name, class: "control-label"
= f.label name, title, class: "control-label"
.col-sm-10
- if type == 'text'
= f.text_field name, class: "form-control", placeholder: placeholder
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment