aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2015-02-08 15:47:07 +0100
committerPacien TRAN-GIRARD2015-02-08 15:47:07 +0100
commita022850963552096dab032fb57c16d3b1d3ac51a (patch)
tree2404424261057b9d0d60daf7c3f34c49dc482f68 /app/views
parent1dd7d1dd1a796592b4448eba878ddcae8e063407 (diff)
downloadminibay-a022850963552096dab032fb57c16d3b1d3ac51a.tar.gz
Add sign up form and AutoInc on tables uuid
Diffstat (limited to 'app/views')
-rw-r--r--app/views/fragments/accountInfos.scala.html2
-rw-r--r--app/views/fragments/forms/inputField.scala.html1
-rw-r--r--app/views/fragments/forms/inputLabel.scala.html3
-rw-r--r--app/views/fragments/forms/labeledField.scala.html4
-rw-r--r--app/views/pages/signupForm.scala.html43
5 files changed, 52 insertions, 1 deletions
diff --git a/app/views/fragments/accountInfos.scala.html b/app/views/fragments/accountInfos.scala.html
index 6bf8655..887e485 100644
--- a/app/views/fragments/accountInfos.scala.html
+++ b/app/views/fragments/accountInfos.scala.html
@@ -19,7 +19,7 @@
19 } 19 }
20 20
21 case None => { 21 case None => {
22 <a class="pure-button" href="@routes.Authentication.logout()"> 22 <a class="pure-button" href="@routes.Profile.signup()">
23 <i class="fa fa-pencil-square-o fa-lg"></i> 23 <i class="fa fa-pencil-square-o fa-lg"></i>
24 Sign up 24 Sign up
25 </a> 25 </a>
diff --git a/app/views/fragments/forms/inputField.scala.html b/app/views/fragments/forms/inputField.scala.html
index 7de0e3b..41b6656 100644
--- a/app/views/fragments/forms/inputField.scala.html
+++ b/app/views/fragments/forms/inputField.scala.html
@@ -7,4 +7,5 @@ placeholder="@label"
7name="@field.name" 7name="@field.name"
8id="@field.name" 8id="@field.name"
9value="@field.value" 9value="@field.value"
10required
10> 11>
diff --git a/app/views/fragments/forms/inputLabel.scala.html b/app/views/fragments/forms/inputLabel.scala.html
new file mode 100644
index 0000000..d03a23b
--- /dev/null
+++ b/app/views/fragments/forms/inputLabel.scala.html
@@ -0,0 +1,3 @@
1@(field: Field, label: String)
2
3<label for="@field.name">@label</label>
diff --git a/app/views/fragments/forms/labeledField.scala.html b/app/views/fragments/forms/labeledField.scala.html
new file mode 100644
index 0000000..6a2c697
--- /dev/null
+++ b/app/views/fragments/forms/labeledField.scala.html
@@ -0,0 +1,4 @@
1@(field: Field, inputType: String, label: String)
2
3@views.html.fragments.forms.inputLabel(field, label)
4@views.html.fragments.forms.inputField(field, inputType, label)
diff --git a/app/views/pages/signupForm.scala.html b/app/views/pages/signupForm.scala.html
new file mode 100644
index 0000000..b026167
--- /dev/null
+++ b/app/views/pages/signupForm.scala.html
@@ -0,0 +1,43 @@
1@(signupForm: Form[SignupData])(implicit flash: Flash, token: play.filters.csrf.CSRF.Token)
2
3@templates.ebe("Sign up")() {
4
5 <div class="pure-g">
6 <div class="pure-u-1 pure-u-lg-1-2 centered">
7
8 <h2>Sign up</h2>
9
10 @views.html.fragments.forms.globalErrors(signupForm)
11
12 @helper.form(action = routes.Profile.signupSubmit(), 'class -> "pure-form pure-form-stacked") {
13
14 @helper.CSRF.formField
15
16 <fieldset>
17 @views.html.fragments.forms.labeledField(signupForm("username"), "text", "Username")
18 @views.html.fragments.forms.labeledField(signupForm("password"), "password", "Password")
19 @views.html.fragments.forms.labeledField(signupForm("passwordCheck"), "password", "Password check")
20 </fieldset>
21
22 <fieldset>
23 @views.html.fragments.forms.labeledField(signupForm("firstName"), "text", "First name")
24 @views.html.fragments.forms.labeledField(signupForm("lastName"), "text", "Last name")
25 @views.html.fragments.forms.labeledField(signupForm("birthdate"), "date", "Birthdate")
26 </fieldset>
27
28 <fieldset>
29 @views.html.fragments.forms.labeledField(signupForm("email"), "email", "E-mail address")
30 @views.html.fragments.forms.labeledField(signupForm("phone"), "tel", "Phone number")
31 @views.html.fragments.forms.labeledField(signupForm("address"), "text", "Address")
32 @views.html.fragments.forms.labeledField(signupForm("postalCode"), "text", "Postal code")
33 @views.html.fragments.forms.labeledField(signupForm("country"), "text", "Country code")
34 </fieldset>
35
36 <button type="submit" class="pure-button pure-input-1 pure-button-primary">Sign up</button>
37
38 }
39
40 </div>
41 </div>
42
43}