debian-mirror-gitlab/app/views/admin/broadcast_messages/_form.html.haml

42 lines
1.8 KiB
Text
Raw Normal View History

.broadcast-message-preview{ style: broadcast_message_style(@broadcast_message) }
= icon('bullhorn')
2016-04-02 18:10:28 +05:30
.js-broadcast-message-preview
2016-11-03 12:29:30 +05:30
- if @broadcast_message.message.present?
= render_broadcast_message(@broadcast_message)
- else
2017-08-17 22:00:37 +05:30
Your message here
2018-11-08 19:23:39 +05:30
= form_for [:admin, @broadcast_message], html: { class: 'broadcast-message-form js-quick-submit js-requires-input'} do |f|
2016-06-02 11:05:42 +05:30
= form_errors(@broadcast_message)
2018-11-08 19:23:39 +05:30
.form-group.row
= f.label :message, class: 'col-form-label col-sm-2'
.col-sm-10
2016-06-02 11:05:42 +05:30
= f.text_area :message, class: "form-control js-autosize",
2016-04-02 18:10:28 +05:30
required: true,
data: { preview_path: preview_admin_broadcast_messages_path }
2018-11-08 19:23:39 +05:30
.form-group.row.js-toggle-colors-container
.col-sm-10.offset-sm-2
= link_to 'Customize colors', '#', class: 'js-toggle-colors-link'
2018-11-08 19:23:39 +05:30
.form-group.row.js-toggle-colors-container.toggle-colors.hide
= f.label :color, "Background Color", class: 'col-form-label col-sm-2'
.col-sm-10
2017-09-10 17:25:29 +05:30
= f.color_field :color, class: "form-control"
2018-11-08 19:23:39 +05:30
.form-group.row.js-toggle-colors-container.toggle-colors.hide
= f.label :font, "Font Color", class: 'col-form-label col-sm-2'
.col-sm-10
2017-09-10 17:25:29 +05:30
= f.color_field :font, class: "form-control"
2018-11-08 19:23:39 +05:30
.form-group.row
= f.label :starts_at, _("Starts at (UTC)"), class: 'col-form-label col-sm-2'
.col-sm-10.datetime-controls
= f.datetime_select :starts_at, {}, class: 'form-control form-control-inline'
2018-11-08 19:23:39 +05:30
.form-group.row
= f.label :ends_at, _("Ends at (UTC)"), class: 'col-form-label col-sm-2'
.col-sm-10.datetime-controls
= f.datetime_select :ends_at, {}, class: 'form-control form-control-inline'
.form-actions
- if @broadcast_message.persisted?
2018-12-05 23:21:45 +05:30
= f.submit "Update broadcast message", class: "btn btn-success"
- else
2018-12-05 23:21:45 +05:30
= f.submit "Add broadcast message", class: "btn btn-success"