Public registration changed from performers to visitors.

This commit is contained in:
codevictory
2021-05-03 21:23:33 +03:00
parent 1308f691a4
commit 5c51d09b14
8 changed files with 97 additions and 45 deletions

View File

@@ -20,7 +20,7 @@
<%= link "Esiintyjät", to: Routes.performer_path(@conn, :index) %>
<%= link "Info", to: Routes.page_path(@conn, :info) %>
<%= link "Covid-19", to: Routes.page_path(@conn, :covid19) %>
<%= link "Ilmoittautuminen", to: Routes.admin_performer_path(@conn, :new) %>
<%= link "Ilmoittautuminen", to: Routes.visitor_path(@conn, :new) %>
</nav>
<h1 class="mobile-main-title">
<a href="/#logo-container">Runosaari 2021</a>
@@ -31,7 +31,7 @@
<%= link "Esiintyjät", to: "#{Routes.performer_path(@conn, :index)}#performers-start" %>
<%= link "Info", to: "#{Routes.page_path(@conn, :info)}#contact-start" %>
<%= link "Covid-19", to: "#{Routes.page_path(@conn, :covid19)}#covid-start" %>
<%= link "Ilmoittautuminen", to: "#{Routes.admin_performer_path(@conn, :new)}#registration-start" %>
<%= link "Ilmoittautuminen", to: "#{Routes.visitor_path(@conn, :new)}#registration-start" %>
</nav>
</header>
<main role="main">

View File

@@ -1,5 +1,5 @@
<section class="text">
<h1 id="registration-start">Ilmoittaudu</h1>
<h1>Ilmoittaudu</h1>
<%= render "form.html", Map.put(assigns, :action, Routes.admin_performer_path(@conn, :create)) %>
</section>

View File

@@ -0,0 +1,5 @@
<section class="text">
<h2>Ilmoittautumisesi on rekisteröity. </h2>
<h1>Tervetuloa mukaan!</h1>
<h3>Tapahtuman järjestäjät ovat teihin yhteydessä sähköpostilla tarpeen mukaan.</h3>
</section>

View File

@@ -1,47 +1,55 @@
<%= form_for @changeset, @action, fn f -> %>
<%= form_for @changeset, @action, fn form -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p>Oops, something went wrong! Please check the errors below.</p>
<p>Jokin kentistä on tyhjä.</p>
</div>
<% 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, :date1 %>
<%= checkbox f, :date1 %>
<%= error_tag f, :date1 %>
<h2>Ilmoita alustava kiinnostuksesi tässä</h2>
<%= label f, :date2 %>
<%= checkbox f, :date2 %>
<%= error_tag f, :date2 %>
<%= label f, :date3 %>
<%= checkbox f, :date3 %>
<%= error_tag f, :date3 %>
<%= label f, :bus %>
<%= checkbox f, :bus %>
<%= error_tag f, :bus %>
<%= label f, :accom %>
<%= checkbox f, :accom %>
<%= error_tag f, :accom %>
<div class="checkbox-container">
<%= checkbox form, :date1 %>
<%= label form, :date1, "Torstai 22.7" %>
<%= error_tag form, :date1 %>
</div>
<div class="checkbox-container">
<%= checkbox form, :date2 %>
<%= label form, :date2, "Perjantai 23.7." %>
<%= error_tag form, :date2 %>
</div>
<div class="checkbox-container">
<%= checkbox form, :date3 %>
<%= label form, :date3, "Lauantai 24.7." %>
<%= error_tag form, :date3 %>
</div>
<div class="checkbox-container">
<%= checkbox form, :bus %>
<%= label form, :bus, "Olen kiinnostunut bussikuljetuksesta" %>
<%= error_tag form, :bus %>
</div>
<div class="checkbox-container">
<%= checkbox form, :accom %>
<%= label form, :accom, "Olen kiinnostunut majoituksesta" %>
<%= error_tag form, :accom %>
</div>
<div>
<%= submit "Save" %>
<%= submit "Lähetä" %>
</div>
<% end %>

View File

@@ -1,5 +1,5 @@
<h1>New Visitor</h1>
<section class="text">
<h1 id="registration-start">Ilmoittaudu vierailijaksi</h1>
<%= render "form.html", Map.put(assigns, :action, Routes.visitor_path(@conn, :create)) %>
<span><%= link "Back", to: Routes.visitor_path(@conn, :index) %></span>
<%= render "form.html", Map.put(assigns, :action, Routes.visitor_path(@conn, :create)) %>
</section>