summaryrefslogtreecommitdiff
path: root/app/views/admin/application_settings/_mailgun.html.haml
blob: fb15f6e79a53cb2ad0db929a24fa53848660f669 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
- expanded = integration_expanded?('mailgun_')
%section.settings.as-mailgun.no-animate#js-mailgun-settings{ class: ('expanded' if expanded) }
  .settings-header
    %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only
      = _('Mailgun')
    = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do
      = expanded ? _('Collapse') : _('Expand')
    %p
      = _('Configure the %{link} integration.').html_safe % { link: link_to(_('Mailgun events'), 'https://documentation.mailgun.com/en/latest/user_manual.html#webhooks', target: '_blank', rel: 'noopener noreferrer') }
  .settings-content
    = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-mailgun-settings'), html: { class: 'fieldset-form', id: 'mailgun-settings' } do |f|
      = form_errors(@application_setting) if expanded

      %fieldset
        .form-group
          = f.gitlab_ui_checkbox_component :mailgun_events_enabled,
          _('Enable Mailgun event receiver')
        .form-group
          = f.label :mailgun_signing_key, _('Mailgun HTTP webhook signing key'), class: 'label-light'
          = f.text_field :mailgun_signing_key, class: 'form-control gl-form-input'

      = f.submit _('Save changes'), pajamas_button: true