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?
|
2018-06-07 15:39:30 -04:00
|
|
|
.info-well
|
|
|
|
.well-segment
|
|
|
|
= 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?
|
2018-04-12 16:11:22 -04:00
|
|
|
.form-group.row
|
2018-04-12 19:16:56 -04:00
|
|
|
= form.label :active, "Active", class: "col-form-label col-sm-2"
|
2017-07-05 08:07:03 -04:00
|
|
|
.col-sm-10
|
2018-01-04 04:33:51 -05:00
|
|
|
= form.check_box :active, disabled: disable_fields_service?(@service)
|
2016-11-21 17:11:21 -05:00
|
|
|
|
2018-03-06 18:20:01 -05:00
|
|
|
- if @service.configurable_events.present?
|
2018-04-12 16:11:22 -04:00
|
|
|
.form-group.row
|
2018-06-07 15:39:30 -04:00
|
|
|
.col-sm-2.text-right Trigger
|
2016-11-21 17:11:21 -05:00
|
|
|
|
|
|
|
.col-sm-10
|
2018-03-06 18:20:01 -05:00
|
|
|
- @service.configurable_events.each do |event|
|
2018-06-07 15:39:30 -04:00
|
|
|
.form-group
|
|
|
|
.form-check
|
|
|
|
= form.check_box service_event_field_name(event), class: 'form-check-input'
|
|
|
|
= form.label service_event_field_name(event), class: 'form-check-label' do
|
2016-11-21 17:11:21 -05:00
|
|
|
%strong
|
|
|
|
= event.humanize
|
|
|
|
|
2018-06-07 15:39:30 -04:00
|
|
|
- field = @service.event_field(event)
|
2016-11-21 17:11:21 -05:00
|
|
|
|
2018-06-07 15:39:30 -04:00
|
|
|
- if field
|
2016-11-21 17:11:21 -05:00
|
|
|
= form.text_field field[:name], class: "form-control", placeholder: field[:placeholder]
|
|
|
|
|
2018-06-07 15:39:30 -04:00
|
|
|
%p.text-muted
|
|
|
|
= @service.class.event_description(event)
|
2016-11-21 17:11:21 -05:00
|
|
|
|
|
|
|
- @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
|