summaryrefslogtreecommitdiff
path: root/app/views/admin
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/admin')
-rw-r--r--app/views/admin/appearances/_form.html.haml5
-rw-r--r--app/views/admin/application_settings/_form.html.haml6
-rw-r--r--app/views/admin/applications/_form.html.haml7
-rw-r--r--app/views/admin/broadcast_messages/_form.html.haml6
-rw-r--r--app/views/admin/deploy_keys/new.html.haml6
-rw-r--r--app/views/admin/groups/_form.html.haml5
-rw-r--r--app/views/admin/hooks/index.html.haml6
-rw-r--r--app/views/admin/identities/_form.html.haml6
-rw-r--r--app/views/admin/labels/_form.html.haml8
-rw-r--r--app/views/admin/users/_form.html.haml6
10 files changed, 13 insertions, 48 deletions
diff --git a/app/views/admin/appearances/_form.html.haml b/app/views/admin/appearances/_form.html.haml
index 6f325914d14..d88f3ad314d 100644
--- a/app/views/admin/appearances/_form.html.haml
+++ b/app/views/admin/appearances/_form.html.haml
@@ -1,8 +1,5 @@
= form_for @appearance, url: admin_appearances_path, html: { class: 'form-horizontal'} do |f|
- - if @appearance.errors.any?
- .alert.alert-danger
- - @appearance.errors.full_messages.each do |msg|
- %p= msg
+ = form_errors(@appearance)
%fieldset.sign-in
%legend
diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml
index de86dacbb12..a8cca1a81cb 100644
--- a/app/views/admin/application_settings/_form.html.haml
+++ b/app/views/admin/application_settings/_form.html.haml
@@ -1,9 +1,5 @@
= form_for @application_setting, url: admin_application_settings_path, html: { class: 'form-horizontal fieldset-form' } do |f|
- - if @application_setting.errors.any?
- #error_explanation
- .alert.alert-danger
- - @application_setting.errors.full_messages.each do |msg|
- %p= msg
+ = form_errors(@application_setting)
%fieldset
%legend Visibility and Access Controls
diff --git a/app/views/admin/applications/_form.html.haml b/app/views/admin/applications/_form.html.haml
index e18f7b499dd..4aacbb8cd77 100644
--- a/app/views/admin/applications/_form.html.haml
+++ b/app/views/admin/applications/_form.html.haml
@@ -1,9 +1,6 @@
= form_for [:admin, @application], url: @url, html: {class: 'form-horizontal', role: 'form'} do |f|
- - if application.errors.any?
- .alert.alert-danger
- %button{ type: "button", class: "close", "data-dismiss" => "alert"} ×
- - application.errors.full_messages.each do |msg|
- %p= msg
+ = form_errors(application)
+
= content_tag :div, class: 'form-group' do
= f.label :name, class: 'col-sm-2 control-label'
.col-sm-10
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
diff --git a/app/views/admin/deploy_keys/new.html.haml b/app/views/admin/deploy_keys/new.html.haml
index 5b46b3222a9..15aa059c93d 100644
--- a/app/views/admin/deploy_keys/new.html.haml
+++ b/app/views/admin/deploy_keys/new.html.haml
@@ -4,11 +4,7 @@
%div
= form_for [:admin, @deploy_key], html: { class: 'deploy-key-form form-horizontal' } do |f|
- -if @deploy_key.errors.any?
- .alert.alert-danger
- %ul
- - @deploy_key.errors.full_messages.each do |msg|
- %li= msg
+ = form_errors(@deploy_key)
.form-group
= f.label :title, class: "control-label"
diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml
index 7f2b1cd235d..0cc405401cf 100644
--- a/app/views/admin/groups/_form.html.haml
+++ b/app/views/admin/groups/_form.html.haml
@@ -1,8 +1,5 @@
= form_for [:admin, @group], html: { class: "form-horizontal" } do |f|
- - if @group.errors.any?
- .alert.alert-danger
- %span= @group.errors.full_messages.first
-
+ = form_errors(@group)
= render 'shared/group_form', f: f
.form-group.group-description-holder
diff --git a/app/views/admin/hooks/index.html.haml b/app/views/admin/hooks/index.html.haml
index 53b3cd04c68..ad952052f25 100644
--- a/app/views/admin/hooks/index.html.haml
+++ b/app/views/admin/hooks/index.html.haml
@@ -10,10 +10,8 @@
= form_for @hook, as: :hook, url: admin_hooks_path, html: { class: 'form-horizontal' } do |f|
- -if @hook.errors.any?
- .alert.alert-danger
- - @hook.errors.full_messages.each do |msg|
- %p= msg
+ = form_errors(@hook)
+
.form-group
= f.label :url, "URL:", class: 'control-label'
.col-sm-10
diff --git a/app/views/admin/identities/_form.html.haml b/app/views/admin/identities/_form.html.haml
index 3a788558226..112a201fafa 100644
--- a/app/views/admin/identities/_form.html.haml
+++ b/app/views/admin/identities/_form.html.haml
@@ -1,9 +1,5 @@
= form_for [:admin, @user, @identity], html: { class: 'form-horizontal fieldset-form' } do |f|
- - if @identity.errors.any?
- #error_explanation
- .alert.alert-danger
- - @identity.errors.full_messages.each do |msg|
- %p= msg
+ = form_errors(@identity)
.form-group
= f.label :provider, class: 'control-label'
diff --git a/app/views/admin/labels/_form.html.haml b/app/views/admin/labels/_form.html.haml
index 8c6b389bf15..448aa953548 100644
--- a/app/views/admin/labels/_form.html.haml
+++ b/app/views/admin/labels/_form.html.haml
@@ -1,11 +1,5 @@
= form_for [:admin, @label], html: { class: 'form-horizontal label-form js-requires-input' } do |f|
- -if @label.errors.any?
- .row
- .col-sm-offset-2.col-sm-10
- .alert.alert-danger
- - @label.errors.full_messages.each do |msg|
- %span= msg
- %br
+ = form_errors(@label)
.form-group
= f.label :title, class: 'control-label'
diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml
index d2527ede995..b05fdbd5552 100644
--- a/app/views/admin/users/_form.html.haml
+++ b/app/views/admin/users/_form.html.haml
@@ -1,10 +1,6 @@
.user_new
= form_for [:admin, @user], html: { class: 'form-horizontal fieldset-form' } do |f|
- -if @user.errors.any?
- #error_explanation
- .alert.alert-danger
- - @user.errors.full_messages.each do |msg|
- %p= msg
+ = form_errors(@user)
%fieldset
%legend Account