summaryrefslogtreecommitdiff
path: root/app/views/admin/broadcast_messages
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-02-12 16:28:53 -0500
committerRobert Speicher <rspeicher@gmail.com>2016-03-02 15:11:15 -0500
commit76ed2afcfc2ae2b6ab3d3419a1183374a39022cc (patch)
tree9f102ebcd4ec208938898529782317029e304d61 /app/views/admin/broadcast_messages
parentb5738edadeb7e77fa152fc3776f652d94156681c (diff)
downloadgitlab-ce-76ed2afcfc2ae2b6ab3d3419a1183374a39022cc.tar.gz
Change `js-quick-submit` behavior to expect the class on the form
Now it will work on any field inside that form, and it's easier to scope new behavior, which is what we're adding next!
Diffstat (limited to 'app/views/admin/broadcast_messages')
-rw-r--r--app/views/admin/broadcast_messages/_form.html.haml4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/admin/broadcast_messages/_form.html.haml b/app/views/admin/broadcast_messages/_form.html.haml
index 5c9403fa0c2..b748460a9f7 100644
--- a/app/views/admin/broadcast_messages/_form.html.haml
+++ b/app/views/admin/broadcast_messages/_form.html.haml
@@ -3,7 +3,7 @@
.js-broadcast-message-preview
= render_broadcast_message(@broadcast_message.message.presence || "Your message here")
-= form_for [:admin, @broadcast_message], html: { class: 'broadcast-message-form form-horizontal js-requires-input'} do |f|
+= form_for [:admin, @broadcast_message], html: { class: 'broadcast-message-form form-horizontal js-quick-submit js-requires-input'} do |f|
-if @broadcast_message.errors.any?
.alert.alert-danger
- @broadcast_message.errors.full_messages.each do |msg|
@@ -11,7 +11,7 @@
.form-group
= f.label :message, class: 'control-label'
.col-sm-10
- = f.text_area :message, class: "form-control js-quick-submit js-autosize",
+ = f.text_area :message, class: "form-control js-autosize",
required: true,
data: { preview_path: preview_admin_broadcast_messages_path }
.form-group.js-toggle-colors-container