diff --git a/app/views/announcements/new.html.haml b/app/views/announcements/new.html.haml --- a/app/views/announcements/new.html.haml +++ b/app/views/announcements/new.html.haml @@ -1,14 +1,22 @@ %h1 New announcement -= error_messages_for :announcement -= simple_form_for(@announcement) do |f| - .row - .col-md-6 - = f.input :title - = f.input :notes, label: 'Notes (shown internally, used to organize announcements)' - = f.input :body - = f.input :author - = f.input :published - = f.input :frontpage, label: 'Display in the front page only?' - = f.input :contest_only, label: 'Display in contest only?' - = f.button :submit, "Create", class: 'btn btn-primary' - = link_to 'Back', announcements_path, class: 'btn btn-default' + +-content_for(:form_buttons) do + = link_to t(:back), announcements_path, class: 'card-link btn btn-secondary' + += render 'form' + +-# old style + = error_messages_for :announcement + = simple_form_for(@announcement) do |f| + .row + .col-md-6 + = f.input :title + = f.input :notes, label: 'Notes (shown internally, used to organize announcements)' + = f.input :body + = f.input :author + = f.input :published + = f.input :frontpage, label: 'Display in the front page only?' + = f.input :contest_only, label: 'Display in contest only?' + = f.button :submit, "Create", class: 'btn btn-primary' + = link_to 'Back', announcements_path, class: 'btn btn-default' +