2016-04-04 21:25:38 -04:00
|
|
|
= form_errors(@service)
|
2015-04-29 10:52:27 -04:00
|
|
|
|
2016-11-18 17:46:57 -05:00
|
|
|
- if lookup_context.template_exists?('help', "projects/services/#{@service.to_param}", true)
|
2016-11-19 15:56:25 -05:00
|
|
|
= render "projects/services/#{@service.to_param}/help", subject: subject
|
2016-11-18 05:58:29 -05:00
|
|
|
- elsif @service.help.present?
|
2015-04-29 10:52:27 -04:00
|
|
|
.well
|
2017-04-28 10:57:17 -04:00
|
|
|
= markdown @service.help
|
2015-04-29 10:52:27 -04:00
|
|
|
|
2016-11-21 17:11:21 -05:00
|
|
|
.service-settings
|
2017-07-05 08:07:03 -04:00
|
|
|
- if @service.show_active_box?
|
|
|
|
.form-group
|
|
|
|
= form.label :active, "Active", class: "control-label"
|
|
|
|
.col-sm-10
|
|
|
|
= form.check_box :active
|
2016-11-21 17:11:21 -05:00
|
|
|
|
|
|
|
- if @service.supported_events.present?
|
|
|
|
.form-group
|
|
|
|
= form.label :url, "Trigger", class: 'control-label'
|
|
|
|
|
|
|
|
.col-sm-10
|
|
|
|
- @service.supported_events.each do |event|
|
|
|
|
%div
|
|
|
|
= form.check_box service_event_field_name(event), class: 'pull-left'
|
|
|
|
.prepend-left-20
|
|
|
|
= form.label service_event_field_name(event), class: 'list-label' do
|
|
|
|
%strong
|
|
|
|
= event.humanize
|
|
|
|
|
|
|
|
- field = @service.event_field(event)
|
|
|
|
|
|
|
|
- if field
|
|
|
|
%p
|
|
|
|
= form.text_field field[:name], class: "form-control", placeholder: field[:placeholder]
|
|
|
|
|
|
|
|
%p.light
|
|
|
|
= service_event_description(event)
|
|
|
|
|
|
|
|
- @service.global_fields.each do |field|
|
|
|
|
- type = field[:type]
|
|
|
|
|
|
|
|
- if type == 'fieldset'
|
|
|
|
- fields = field[:fields]
|
|
|
|
- legend = field[:legend]
|
|
|
|
|
|
|
|
%fieldset
|
|
|
|
%legend= legend
|
|
|
|
- fields.each do |subfield|
|
|
|
|
= render 'shared/field', form: form, field: subfield
|
|
|
|
- else
|
|
|
|
= render 'shared/field', form: form, field: field
|