diff options
author | Pacien TRAN-GIRARD | 2015-02-08 00:17:21 +0100 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2015-02-08 00:17:21 +0100 |
commit | cb902da50bd75b623a47727e62c0c69913422bfd (patch) | |
tree | 2296df3bc243176f640732fffc80ec553a371367 /app/views/fragments/forms | |
parent | 3d22cb7d1ee6bdf7b484bbf001c76e81ae351dea (diff) | |
download | minibay-cb902da50bd75b623a47727e62c0c69913422bfd.tar.gz |
Authentication draft
Diffstat (limited to 'app/views/fragments/forms')
-rw-r--r-- | app/views/fragments/forms/globalErrors.scala.html | 7 | ||||
-rw-r--r-- | app/views/fragments/forms/inputField.scala.html | 10 | ||||
-rw-r--r-- | app/views/fragments/forms/textarea.scala.html | 8 |
3 files changed, 25 insertions, 0 deletions
diff --git a/app/views/fragments/forms/globalErrors.scala.html b/app/views/fragments/forms/globalErrors.scala.html new file mode 100644 index 0000000..98dad24 --- /dev/null +++ b/app/views/fragments/forms/globalErrors.scala.html | |||
@@ -0,0 +1,7 @@ | |||
1 | @(form: Form[_ <: Product]) | ||
2 | |||
3 | <div class="flash-message"> | ||
4 | @for(error <- form.globalErrors) { | ||
5 | <div class="error">@error.message</div> | ||
6 | } | ||
7 | </div> | ||
diff --git a/app/views/fragments/forms/inputField.scala.html b/app/views/fragments/forms/inputField.scala.html new file mode 100644 index 0000000..7de0e3b --- /dev/null +++ b/app/views/fragments/forms/inputField.scala.html | |||
@@ -0,0 +1,10 @@ | |||
1 | @(field: Field, inputType: String, label: String) | ||
2 | |||
3 | <input | ||
4 | class="pure-input-1 @if(field.hasErrors) {input-invalid}" | ||
5 | type="@inputType" | ||
6 | placeholder="@label" | ||
7 | name="@field.name" | ||
8 | id="@field.name" | ||
9 | value="@field.value" | ||
10 | > | ||
diff --git a/app/views/fragments/forms/textarea.scala.html b/app/views/fragments/forms/textarea.scala.html new file mode 100644 index 0000000..44904ca --- /dev/null +++ b/app/views/fragments/forms/textarea.scala.html | |||
@@ -0,0 +1,8 @@ | |||
1 | @(field: Field, label: String) | ||
2 | |||
3 | <textarea | ||
4 | class="pure-input-1 @if(field.hasErrors) {input-invalid}" | ||
5 | placeholder="@label" | ||
6 | name="@field.name" | ||
7 | id="@field.name" | ||
8 | >@field.value</textarea> | ||