summaryrefslogtreecommitdiff
path: root/app/views/shared/notifications/_custom_notifications.html.haml
blob: 752932e604520dd9c1e8f61e96809b5f846bd5de (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
.modal.fade{ tabindex: "-1", role: "dialog", id: notifications_menu_identifier("modal", notification_setting), "aria-labelledby": "custom-notifications-title" }
  .modal-dialog
    .modal-content
      .modal-header
        %button.close{ type: "button",  "aria-label": "close", data: { dismiss: "modal" } }
          %span{ "aria-hidden": "true" } } ×
        %h4#custom-notifications-title.modal-title
          #{ _('Custom notification events') }

      .modal-body
        .container-fluid
          = form_for notification_setting, html: { class: "custom-notifications-form" } do |f|
            = hidden_setting_source_input(notification_setting)
            .row
              .col-lg-4
                %h4.prepend-top-0= _('Notification events')
                %p
                  - notification_link = link_to _('notification emails'), help_page_path('workflow/notifications'), target: '_blank'
                  - paragraph = _('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 %{notification_link}.') % { notification_link: notification_link.html_safe }
                  #{ paragraph.html_safe }
              .col-lg-8
                - NotificationSetting::EMAIL_EVENTS.each_with_index do |event, index|
                  - field_id = "#{notifications_menu_identifier("modal", notification_setting)}_notification_setting[#{event}]"
                  .form-group
                    .checkbox{ class: ("prepend-top-0" if index == 0) }
                      %label{ for: field_id }
                        = check_box("notification_setting", event, id: field_id, class: "js-custom-notification-event", checked: notification_setting.public_send(event))
                        %strong
                          = notification_event_name(event)
                          = icon("spinner spin", class: "custom-notification-event-loading")