diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-03-29 17:42:38 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-03-30 10:44:20 +0200 |
commit | 5583197e091e8f75ad9c99a1bbc46e6a0b7279d4 (patch) | |
tree | 949f3c92f4f951251bbbd3d9cfe8c5bd11878831 /app/views/projects/buttons | |
parent | f8f68d6b8c5b5d85b4798257ae3ae4bf4ec8fadc (diff) | |
download | gitlab-ce-5583197e091e8f75ad9c99a1bbc46e6a0b7279d4.tar.gz |
Create NotificationSettings object only when user change value in dropdown
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/projects/buttons')
-rw-r--r-- | app/views/projects/buttons/_notifications.html.haml | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/views/projects/buttons/_notifications.html.haml b/app/views/projects/buttons/_notifications.html.haml index 4b8a10f0819..2b9d8f2ac81 100644 --- a/app/views/projects/buttons/_notifications.html.haml +++ b/app/views/projects/buttons/_notifications.html.haml @@ -1,7 +1,6 @@ - if @notification_setting - = form_tag profile_notifications_path, method: :put, remote: true, class: 'inline', id: 'notification-form' do - = hidden_field_tag :notification_id, @notification_setting.id - = hidden_field_tag :notification_level, @notification_setting.level + = form_for [@project.namespace.becomes(Namespace), @project, @notification_setting], remote: true, html: { class: 'inline', id: 'notification-form' } do |f| + = f.hidden_field :level %span.dropdown %a.dropdown-new.btn.notifications-btn#notifications-button{href: '#', "data-toggle" => "dropdown"} = icon('bell') |