Use shared form partial for admin/announcements views (#29608)
This commit is contained in:
parent
e5d5bd7ff1
commit
4837bfcc6a
3 changed files with 38 additions and 61 deletions
28
app/views/admin/announcements/_form.html.haml
Normal file
28
app/views/admin/announcements/_form.html.haml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
.fields-group
|
||||
= form.input :starts_at,
|
||||
html5: true,
|
||||
include_blank: true,
|
||||
input_html: { pattern: datetime_pattern, placeholder: datetime_placeholder },
|
||||
wrapper: :with_block_label
|
||||
= form.input :ends_at,
|
||||
html5: true,
|
||||
include_blank: true,
|
||||
input_html: { pattern: datetime_pattern, placeholder: datetime_placeholder },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.fields-group
|
||||
= form.input :all_day,
|
||||
as: :boolean,
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= form.input :text,
|
||||
wrapper: :with_block_label
|
||||
|
||||
- unless form.object.published?
|
||||
.fields-group
|
||||
= form.input :scheduled_at,
|
||||
html5: true,
|
||||
include_blank: true,
|
||||
input_html: { pattern: datetime_pattern, placeholder: datetime_placeholder },
|
||||
wrapper: :with_block_label
|
||||
Loading…
Add table
Add a link
Reference in a new issue