From 0d01f431fb3f8b17252c228e67c5b9879f86243b Mon Sep 17 00:00:00 2001 From: rgarcia Date: Mon, 19 Oct 2015 20:33:10 +0200 Subject: [PATCH] simplifies verification form --- app/models/verification/letter.rb | 2 +- app/views/verification/letter/edit.html.erb | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/app/models/verification/letter.rb b/app/models/verification/letter.rb index aa6fd6a4b..96321a419 100644 --- a/app/models/verification/letter.rb +++ b/app/models/verification/letter.rb @@ -1,7 +1,7 @@ class Verification::Letter include ActiveModel::Model - attr_accessor :user, :verification_code + attr_accessor :user, :verification_code, :email, :password validates :user, presence: true diff --git a/app/views/verification/letter/edit.html.erb b/app/views/verification/letter/edit.html.erb index 6c86a5766..73c9b9a48 100644 --- a/app/views/verification/letter/edit.html.erb +++ b/app/views/verification/letter/edit.html.erb @@ -10,18 +10,13 @@
-
- - "> + <%= form_for @letter, url: edit_letter_path do |f| %> + <%= f.text_field :email, label: t("pages.verify.email") %> + <%= f.password_field :password, label: t("pages.verify.password") %> + <%= f.text_field :verification_code, label: t("pages.verify.code") %> - - "> - - - "> - - " class="button radius success expand"> -
+ <%= f.submit(class: "button radius success expand", value: t("pages.verify.submit")) %> + <% end %>
\ No newline at end of file