Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-04-05 04:25:38 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-04-05 04:37:07 +0300
commit7a2370f74060b2f065e3602700fe1b33fda4685c (patch)
tree0c23a588515e857598d5e389cd55aa816d3cfe35 /app/views/admin/broadcast_messages/_form.html.haml
parent2ed6cd9e469ffcdb60f21d1738de1eff8c258432 (diff)
Standardize the way we check for and display form errors
- Some views had a "Close" button. We've removed this, because we don't want users accidentally hiding the validation errors and not knowing what needs to be fixed. - Some views used `li`, some used `p`, some used `span`. We've standardized on `li`. - Some views only showed the first error. We've standardized on showing all of them. - Some views added an `#error_explanation` div, which we've made standard.
Diffstat (limited to 'app/views/admin/broadcast_messages/_form.html.haml')
-rw-r--r--app/views/admin/broadcast_messages/_form.html.haml6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/views/admin/broadcast_messages/_form.html.haml b/app/views/admin/broadcast_messages/_form.html.haml
index b748460a9f7..6b157abf842 100644
--- a/app/views/admin/broadcast_messages/_form.html.haml
+++ b/app/views/admin/broadcast_messages/_form.html.haml
@@ -4,10 +4,8 @@
= render_broadcast_message(@broadcast_message.message.presence || "Your message here")
= 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|
- %p= msg
+ = form_errors(@broadcast_message)
+
.form-group
= f.label :message, class: 'control-label'
.col-sm-10