From ddc50a7910518e4b595c0b663c15b579950a4924 Mon Sep 17 00:00:00 2001 From: codevictory Date: Tue, 30 Mar 2021 22:04:59 +0300 Subject: [PATCH] Registration form. --- .../templates/performer/form.html.eex | 40 +++++++++---------- .../templates/performer/new.html.eex | 4 +- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/lib/runosaari_web/templates/performer/form.html.eex b/lib/runosaari_web/templates/performer/form.html.eex index b82342c..2fcb2f1 100644 --- a/lib/runosaari_web/templates/performer/form.html.eex +++ b/lib/runosaari_web/templates/performer/form.html.eex @@ -1,35 +1,35 @@ -<%= form_for @changeset, @action, fn f -> %> +<%= form_for @changeset, @action, fn form -> %> <%= if @changeset.action do %>

Oops, something went wrong! Please check the errors below.

<% end %> - <%= label f, :fname %> - <%= text_input f, :fname %> - <%= error_tag f, :fname %> + <%= label form, :fname, "Etunimi" %> + <%= text_input form, :fname %> + <%= error_tag form, :fname %> - <%= label f, :lname %> - <%= text_input f, :lname %> - <%= error_tag f, :lname %> + <%= label form, :lname, "Sukunimi" %> + <%= text_input form, :lname %> + <%= error_tag form, :lname %> - <%= label f, :email %> - <%= text_input f, :email %> - <%= error_tag f, :email %> + <%= label form, :email, "Sähköposti" %> + <%= email_input form, :email %> + <%= error_tag form, :email %> - <%= label f, :tel %> - <%= text_input f, :tel %> - <%= error_tag f, :tel %> + <%= label form, :tel, "Puhelinumero" %> + <%= text_input form, :tel %> + <%= error_tag form, :tel %> - <%= label f, :confirmed %> - <%= checkbox f, :confirmed %> - <%= error_tag f, :confirmed %> + <%= label form, :notes, "Huomiot" %> + <%= textarea form, :notes %> + <%= error_tag form, :notes %> - <%= label f, :notes %> - <%= text_input f, :notes %> - <%= error_tag f, :notes %> + <%= label form, :confirmed, "Vahvitettu" %> + <%= checkbox form, :confirmed %> + <%= error_tag form, :confirmed %>
- <%= submit "Save" %> + <%= submit "Lähetä" %>
<% end %> diff --git a/lib/runosaari_web/templates/performer/new.html.eex b/lib/runosaari_web/templates/performer/new.html.eex index b4305e7..65796cb 100644 --- a/lib/runosaari_web/templates/performer/new.html.eex +++ b/lib/runosaari_web/templates/performer/new.html.eex @@ -1,5 +1,3 @@ -

New Performer

+

Ilmoittaudu

<%= render "form.html", Map.put(assigns, :action, Routes.performer_path(@conn, :create)) %> - -<%= link "Back", to: Routes.performer_path(@conn, :index) %>