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

Add optional title field to service properties.

parent 7b34c9dc
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
- @service.fields.each do |field| - @service.fields.each do |field|
- name = field[:name] - name = field[:name]
- title = field[:title] || name.humanize
- value = @service.send(name) unless field[:type] == 'password' - value = @service.send(name) unless field[:type] == 'password'
- type = field[:type] - type = field[:type]
- placeholder = field[:placeholder] - placeholder = field[:placeholder]
...@@ -23,7 +24,7 @@ ...@@ -23,7 +24,7 @@
- default_choice = field[:default_choice] - default_choice = field[:default_choice]
.form-group .form-group
= f.label name, class: "control-label" = f.label name, title, class: "control-label"
.col-sm-10 .col-sm-10
- if type == 'text' - if type == 'text'
= f.text_field name, class: "form-control", placeholder: placeholder = f.text_field name, class: "form-control", placeholder: placeholder
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
- @service.fields.each do |field| - @service.fields.each do |field|
- name = field[:name] - name = field[:name]
- title = field[:title] || name.humanize
- value = @service.send(name) unless field[:type] == 'password' - value = @service.send(name) unless field[:type] == 'password'
- type = field[:type] - type = field[:type]
- placeholder = field[:placeholder] - placeholder = field[:placeholder]
...@@ -36,7 +37,7 @@ ...@@ -36,7 +37,7 @@
- default_choice = field[:default_choice] - default_choice = field[:default_choice]
.form-group .form-group
= f.label name, class: "control-label" = f.label name, title, class: "control-label"
.col-sm-10 .col-sm-10
- if type == 'text' - if type == 'text'
= f.text_field name, class: "form-control", placeholder: placeholder = 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