about summary refs log tree commit diff
path: root/app/views/admin/announcements/edit.html.haml
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-01-24 17:28:22 +0100
committerGitHub <noreply@github.com>2020-01-24 17:28:22 +0100
commit0be67df4f0a64367d9e376b06bd3fd2fb9ca8195 (patch)
tree2eaa85c899033aab9bd1b2f9da2d727ce5788e16 /app/views/admin/announcements/edit.html.haml
parenta8c109baca4d02cc8aed454e231518c1f8ec1844 (diff)
parentbdc1581556b86ba25a385c9309db714eeaba1ca1 (diff)
Merge pull request #1265 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/views/admin/announcements/edit.html.haml')
-rw-r--r--app/views/admin/announcements/edit.html.haml22
1 files changed, 22 insertions, 0 deletions
diff --git a/app/views/admin/announcements/edit.html.haml b/app/views/admin/announcements/edit.html.haml
new file mode 100644
index 000000000..c5c605e93
--- /dev/null
+++ b/app/views/admin/announcements/edit.html.haml
@@ -0,0 +1,22 @@
+- content_for :page_title do
+  = t('.title')
+
+= simple_form_for @announcement, url: admin_announcement_path(@announcement) do |f|
+  = render 'shared/error_messages', object: @announcement
+
+  .fields-group
+    = f.input :starts_at, include_blank: true, wrapper: :with_block_label
+    = f.input :ends_at, include_blank: true, wrapper: :with_block_label
+
+  .fields-group
+    = f.input :all_day, as: :boolean, wrapper: :with_label
+
+  .fields-group
+    = f.input :text, wrapper: :with_block_label
+
+  - if @announcement.scheduled_at.present? && !@announcement.published?
+    .fields-group
+      = f.input :scheduled_at, include_blank: true, wrapper: :with_block_label
+
+  .actions
+    = f.button :button, t('generic.save_changes'), type: :submit