mirror of
https://github.com/fluent/fluentd-ui.git
synced 2026-05-10 21:36:09 +02:00
Use partial for error messages
This commit is contained in:
parent
1309370416
commit
f1cf058017
@ -1,5 +1,4 @@
|
||||
- @setting.errors.full_messages.each do |msg|
|
||||
= msg
|
||||
= render "shared/setting_errors"
|
||||
|
||||
= form_for(@setting, url: finish_fluentd_setting_in_syslog_path(@fluentd), html: {class: "ignore-rails-error-div"}) do |f|
|
||||
= field(f, :tag)
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
- @setting.errors.full_messages.each do |msg|
|
||||
= msg
|
||||
= render "shared/setting_errors"
|
||||
|
||||
= form_for(@setting, url: finish_fluentd_setting_out_forward_path(@fluentd), html: {class: "ignore-rails-error-div"}) do |f|
|
||||
= field(f, :match)
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
- @setting.errors.full_messages.each do |msg|
|
||||
= msg
|
||||
= render "shared/setting_errors"
|
||||
|
||||
= form_for(@setting, url: finish_fluentd_setting_out_mongo_path(@fluentd), html: {class: "ignore-rails-error-div"}) do |f|
|
||||
= field(f, :match)
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
- @setting.errors.full_messages.each do |msg|
|
||||
= msg
|
||||
= render "shared/setting_errors"
|
||||
|
||||
= form_for(@setting, url: finish_fluentd_setting_out_s3_path(@fluentd), html: {class: "ignore-rails-error-div"}) do |f|
|
||||
= field(f, :match)
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
- @setting.errors.full_messages.each do |msg|
|
||||
= msg
|
||||
= render "shared/setting_errors"
|
||||
|
||||
= form_for(@setting, url: finish_fluentd_setting_out_td_path(@fluentd), html: {class: "ignore-rails-error-div"}) do |f|
|
||||
= field(f, :match)
|
||||
|
||||
5
app/views/shared/_setting_errors.html.haml
Normal file
5
app/views/shared/_setting_errors.html.haml
Normal file
@ -0,0 +1,5 @@
|
||||
- if request.post? && !@setting.valid?
|
||||
.well.well-sm
|
||||
- @setting.errors.full_messages.each do |msg|
|
||||
.text.text-danger= msg
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user