2015-12-31 17:55:14 -05:00
|
|
|
.broadcast-message-preview{ style: broadcast_message_style(@broadcast_message) }
|
2015-12-31 15:19:13 -05:00
|
|
|
= icon('bullhorn')
|
2016-02-03 23:01:04 -05:00
|
|
|
.js-broadcast-message-preview
|
|
|
|
= render_broadcast_message(@broadcast_message.message.presence || "Your message here")
|
2015-12-31 15:19:13 -05:00
|
|
|
|
2016-02-12 16:28:53 -05:00
|
|
|
= form_for [:admin, @broadcast_message], html: { class: 'broadcast-message-form form-horizontal js-quick-submit js-requires-input'} do |f|
|
2016-04-04 21:25:38 -04:00
|
|
|
= form_errors(@broadcast_message)
|
|
|
|
|
2015-12-31 15:19:13 -05:00
|
|
|
.form-group
|
|
|
|
= f.label :message, class: 'control-label'
|
|
|
|
.col-sm-10
|
2016-02-12 16:28:53 -05:00
|
|
|
= f.text_area :message, class: "form-control js-autosize",
|
2016-02-03 23:01:04 -05:00
|
|
|
required: true,
|
|
|
|
data: { preview_path: preview_admin_broadcast_messages_path }
|
2015-12-31 15:19:13 -05:00
|
|
|
.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
|
2015-12-31 17:55:14 -05:00
|
|
|
= f.color_field :color, class: "form-control"
|
2015-12-31 15:19:13 -05:00
|
|
|
.form-group.js-toggle-colors-container.hide
|
|
|
|
= f.label :font, "Font Color", class: 'control-label'
|
|
|
|
.col-sm-10
|
2015-12-31 17:55:14 -05:00
|
|
|
= f.color_field :font, class: "form-control"
|
2015-12-31 15:19:13 -05:00
|
|
|
.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"
|