From 785b8fd78f0f5d39c3dae517c4433d4d730414d5 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Tue, 8 Oct 2019 10:57:35 +0200 Subject: [PATCH] Remove simple form from mail_templates --- app/views/admin/mail_templates/edit.html.haml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/views/admin/mail_templates/edit.html.haml b/app/views/admin/mail_templates/edit.html.haml index c423fe418..e515cf7f3 100644 --- a/app/views/admin/mail_templates/edit.html.haml +++ b/app/views/admin/mail_templates/edit.html.haml @@ -4,17 +4,23 @@ %h3 = @mail_template.class.const_get(:DISPLAYED_NAME) - = simple_form_for @mail_template, + = form_for @mail_template, as: 'mail_template', url: admin_procedure_mail_template_path(@procedure, @mail_template.class.const_get(:SLUG)), method: :put do |f| .row .col-md-6 - = f.input :subject, label: "Objet de l'email" - = f.input :body, label: "Corps de l'email", input_html: { class: 'wysihtml5' } + .form-group.string.optional.mail_template_subject + = f.label :subject, "Objet de l'email", class: 'control-label string optional' + = f.text_field :subject, class: 'form-control string optional' + + .form-group.text.optional.mail_template_body + = f.label :body, "Corps de l'email", class: 'control-label string optional' + = f.text_area :body, class: 'wysihtml5 form-control text optional' + .text-right = link_to "Annuler", admin_procedure_mail_templates_path(@procedure), class: "btn btn-default" - = f.button :submit, 'Mettre à jour', class: "btn-success" + = f.submit 'Mettre à jour', class: "btn btn-default btn-success" = link_to "Prévisualiser", preview_procedure_mail_template_path(@procedure, @mail_template.class.const_get(:SLUG)), class: "btn btn-primary", target: "_blank" .row