Commit 79361b20 authored by Robert Speicher's avatar Robert Speicher

Add js-requires-input to form

parent b7f49aa0
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
%i.fa.fa-bullhorn %i.fa.fa-bullhorn
%span Your message here %span Your message here
= form_for [:admin, @broadcast_message], html: { class: 'broadcast-message-form form-horizontal'} do |f| = form_for [:admin, @broadcast_message], html: { class: 'broadcast-message-form form-horizontal js-requires-input'} do |f|
-if @broadcast_message.errors.any? -if @broadcast_message.errors.any?
.alert.alert-danger .alert.alert-danger
- @broadcast_message.errors.full_messages.each do |msg| - @broadcast_message.errors.full_messages.each do |msg|
...@@ -17,8 +17,7 @@ ...@@ -17,8 +17,7 @@
.col-sm-10 .col-sm-10
= f.text_area :message, class: "form-control", rows: 2, required: true = f.text_area :message, class: "form-control", rows: 2, required: true
%div %div
= link_to '#', class: 'js-toggle-colors-link' do = link_to 'Customize colors', '#', class: 'js-toggle-colors-link'
Customize colors
.form-group.js-toggle-colors-container.hide .form-group.js-toggle-colors-container.hide
= f.label :color, "Background Color", class: 'control-label' = f.label :color, "Background Color", class: 'control-label'
.col-sm-10 .col-sm-10
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment