summaryrefslogtreecommitdiff
path: root/app/views/profiles/notifications
diff options
context:
space:
mode:
authorGosia Ksionek <mksionek@gitlab.com>2019-03-20 10:36:22 +0000
committerJames Lopez <james@gitlab.com>2019-03-20 10:36:22 +0000
commit2bcfb2391e2672db7e4f7138be7109f7c6ce87c5 (patch)
treec727c6d5e0b57d57dd6e5eb58276b29022fb469f /app/views/profiles/notifications
parent1614089fcfe71bd2ff3fafc787195de380b9b6a1 (diff)
downloadgitlab-ce-2bcfb2391e2672db7e4f7138be7109f7c6ce87c5.tar.gz
CE backport of forcing sending notifications to saml provided email
Diffstat (limited to 'app/views/profiles/notifications')
-rw-r--r--app/views/profiles/notifications/_email_settings.html.haml6
-rw-r--r--app/views/profiles/notifications/show.html.haml4
2 files changed, 7 insertions, 3 deletions
diff --git a/app/views/profiles/notifications/_email_settings.html.haml b/app/views/profiles/notifications/_email_settings.html.haml
new file mode 100644
index 00000000000..34dcf8f5402
--- /dev/null
+++ b/app/views/profiles/notifications/_email_settings.html.haml
@@ -0,0 +1,6 @@
+- form = local_assigns.fetch(:form)
+.form-group
+ = form.label :notification_email, class: "label-bold"
+ = form.select :notification_email, @user.all_emails, { include_blank: false }, class: "select2", disabled: local_assigns.fetch(:email_change_disabled, nil)
+ .help-block
+ = local_assigns.fetch(:help_text, nil)
diff --git a/app/views/profiles/notifications/show.html.haml b/app/views/profiles/notifications/show.html.haml
index 712eb2a4573..e616e5546b3 100644
--- a/app/views/profiles/notifications/show.html.haml
+++ b/app/views/profiles/notifications/show.html.haml
@@ -22,9 +22,7 @@
Global notification settings
= form_for @user, url: profile_notifications_path, method: :put, html: { class: 'update-notifications prepend-top-default' } do |f|
- .form-group
- = f.label :notification_email, class: "label-bold"
- = f.select :notification_email, @user.all_emails, { include_blank: false }, class: "select2"
+ = render_if_exists 'profiles/notifications/email_settings', form: f
= label_tag :global_notification_level, "Global notification level", class: "label-bold"
%br