2016-06-02 11:05:42 +05:30
|
|
|
= form_errors(@service)
|
2015-09-11 14:41:01 +05:30
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
- if lookup_context.template_exists?('help', "projects/services/#{@service.to_param}", true)
|
2020-04-08 14:13:33 +05:30
|
|
|
= render "projects/services/#{@service.to_param}/help", subject: @service
|
2017-08-17 22:00:37 +05:30
|
|
|
- elsif @service.help.present?
|
2018-11-08 19:23:39 +05:30
|
|
|
.info-well
|
|
|
|
.well-segment
|
|
|
|
= markdown @service.help
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
.service-settings
|
2020-04-22 19:07:51 +05:30
|
|
|
.js-vue-integration-settings{ data: { show_active: @service.show_active_box?.to_s, activated: (@service.active || @service.new_record?).to_s, disabled: disable_fields_service?(@service).to_s } }
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
- if @service.configurable_events.present?
|
2018-11-08 19:23:39 +05:30
|
|
|
.form-group.row
|
2020-01-01 13:55:28 +05:30
|
|
|
%label.col-form-label.col-sm-2= _('Trigger')
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
.col-sm-10
|
2018-03-27 19:54:05 +05:30
|
|
|
- @service.configurable_events.each do |event|
|
2018-11-08 19:23:39 +05:30
|
|
|
.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
|
2017-08-17 22:00:37 +05:30
|
|
|
%strong
|
|
|
|
= event.humanize
|
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
- field = @service.event_field(event)
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
- if field
|
2017-08-17 22:00:37 +05:30
|
|
|
= form.text_field field[:name], class: "form-control", placeholder: field[:placeholder]
|
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
%p.text-muted
|
|
|
|
= @service.class.event_description(event)
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2020-01-01 13:55:28 +05:30
|
|
|
- if @service.configurable_event_actions.present?
|
|
|
|
.form-group.row
|
|
|
|
%label.col-form-label.col-sm-2= _('Event Actions')
|
|
|
|
|
|
|
|
.col-sm-10
|
|
|
|
- @service.configurable_event_actions.each do |action|
|
|
|
|
.form-group
|
|
|
|
.form-check
|
|
|
|
= form.check_box service_event_action_field_name(action), class: 'form-check-input'
|
|
|
|
= form.label service_event_action_field_name(action), class: 'form-check-label' do
|
|
|
|
%strong
|
|
|
|
= event_action_description(action)
|
|
|
|
|
|
|
|
%p.text-muted
|
|
|
|
= event_action_description(action)
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
- @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
|