Retrospring/app/views/announcement/edit.html.haml

30 lines
968 B
Plaintext
Raw Normal View History

2020-04-19 12:58:57 -07:00
- provide(:title, generate_title("Edit announcement"))
.container.j2-page
= bootstrap_form_for(@announcement, url: {action: "update"}, method: "PATCH") do |f|
- if @announcement.errors.any?
.row
.col-md-12
.alert.alert-danger
%strong
= pluralize(@announcement.errors.count, "error")
prohibited this announcement from being saved:
%ul
- @announcement.errors.full_messages.each do |err|
%li= err
2020-04-19 12:58:57 -07:00
.row
.col-md-12
= f.text_area :content, label: "Content"
.row
.col-md-6
= f.url_field :link_href, label: "Link URL"
.col-md-6
= f.datetime_field :link_text, label: "Link text"
.row
.col-md-6
= f.datetime_field :starts_at, label: "Start time"
.col-md-6
= f.datetime_field :ends_at, label: "End time"
.row
.col-md-12.text-right
= f.submit class: "btn btn-primary"