summaryrefslogtreecommitdiff
path: root/app/views/shared/_service_settings.html.haml
blob: 7d93dca22f54d4cbd0832f8647aefc47c1a74e32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
= form_errors(integration)

- if lookup_context.template_exists?('help', "projects/services/#{integration.to_param}", true)
  = render "projects/services/#{integration.to_param}/help", subject: integration
- elsif integration.help.present?
  .info-well
    .well-segment
      = markdown integration.help

.service-settings
  - if @admin_integration
    .js-vue-admin-integration-settings{ data: integration_form_data(@admin_integration) }
  .js-vue-integration-settings{ data: integration_form_data(integration) }

  - if show_service_trigger_events?(integration)
    .form-group.row
      %label.col-form-label.col-sm-2= _('Trigger')

      .col-sm-10
        - integration.configurable_events.each do |event|
          .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
                %strong
                  = event.humanize

            - field = integration.event_field(event)

            - if field
              = form.text_field field[:name], class: "form-control", placeholder: field[:placeholder]

            %p.text-muted
              = integration.class.event_description(event)

  - unless integration_form_refactor?
    - integration.global_fields.each do |field|
      = render 'shared/field', form: form, field: field