00e8700433
Closes #3046
37 lines
1.6 KiB
Text
37 lines
1.6 KiB
Text
.broadcast-message-preview{ style: broadcast_message_style(@broadcast_message) }
|
|
= icon('bullhorn')
|
|
%span= @broadcast_message.message || "Your message here"
|
|
|
|
= form_for [:admin, @broadcast_message], html: { class: 'broadcast-message-form form-horizontal js-requires-input'} do |f|
|
|
-if @broadcast_message.errors.any?
|
|
.alert.alert-danger
|
|
- @broadcast_message.errors.full_messages.each do |msg|
|
|
%p= msg
|
|
.form-group
|
|
= f.label :message, class: 'control-label'
|
|
.col-sm-10
|
|
= f.text_area :message, class: "form-control js-quick-submit", rows: 2, required: true
|
|
.form-group.js-toggle-colors-container
|
|
.col-sm-10.col-sm-offset-2
|
|
= link_to 'Customize colors', '#', class: 'js-toggle-colors-link'
|
|
.form-group.js-toggle-colors-container.hide
|
|
= f.label :color, "Background Color", class: 'control-label'
|
|
.col-sm-10
|
|
= f.color_field :color, class: "form-control"
|
|
.form-group.js-toggle-colors-container.hide
|
|
= f.label :font, "Font Color", class: 'control-label'
|
|
.col-sm-10
|
|
= f.color_field :font, class: "form-control"
|
|
.form-group
|
|
= f.label :starts_at, class: 'control-label'
|
|
.col-sm-10.datetime-controls
|
|
= f.datetime_select :starts_at, {}, class: 'form-control form-control-inline'
|
|
.form-group
|
|
= f.label :ends_at, class: 'control-label'
|
|
.col-sm-10.datetime-controls
|
|
= f.datetime_select :ends_at, {}, class: 'form-control form-control-inline'
|
|
.form-actions
|
|
- if @broadcast_message.persisted?
|
|
= f.submit "Update broadcast message", class: "btn btn-create"
|
|
- else
|
|
= f.submit "Add broadcast message", class: "btn btn-create"
|