BigW Consortium Gitlab

_custom_notifications.html.haml 1.82 KB
Newer Older
1
.modal.fade{ tabindex: "-1", role: "dialog", id: notifications_menu_identifier("modal", notification_setting), aria: { labelledby: "custom-notifications-title" } }
2 3 4 5 6 7 8
  .modal-dialog
    .modal-content
      .modal-header
        %button.close{ type: "button", data: { dismiss: "modal" }, aria: { label: "close" } }
          %span{ aria: { hidden: "true" } } ×
        %h4#custom-notifications-title.modal-title
          Custom notification events
9

10 11
      .modal-body
        .container-fluid
12 13
          = form_for notification_setting, html: { class: "custom-notifications-form" } do |f|
            = hidden_setting_source_input(notification_setting)
14
            .row
15
              .col-lg-4
16 17
                %h4.prepend-top-0
                  Notification events
18 19 20
                %p
                  Custom notification levels are the same as participating levels. With custom notification levels you will also receive notifications for select events. To find out more, check out
                  = succeed "." do
21
                    %a{ href: help_page_path('workflow/notifications'), target: "_blank" } notification emails
22
              .col-lg-8
23
                - NotificationSetting::EMAIL_EVENTS.each_with_index do |event, index|
24
                  - field_id = "#{notifications_menu_identifier("modal", notification_setting)}_notification_setting[#{event}]"
25 26
                  .form-group
                    .checkbox{ class: ("prepend-top-0" if index == 0) }
27
                      %label{ for: field_id }
Sean McGivern committed
28
                        = check_box("notification_setting", event, id: field_id, class: "js-custom-notification-event", checked: notification_setting.public_send(event))
29
                        %strong
30
                          = notification_event_name(event)
31
                          = icon("spinner spin", class: "custom-notification-event-loading")