aboutsummaryrefslogtreecommitdiff
path: root/app/views/pages/sales/sellForm.scala.html
blob: d3988ba1fb1922aa3aad02360fef99fd0c934827 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@(saleForm: Form[SaleData])(implicit request: AuthRequest[AnyContent], flash: Flash, token: play.filters.csrf.CSRF.Token)

@templates.ebe("Sell")(request.account) {

	<div class="pure-g">
		<div class="pure-u-1 pure-u-lg-1-2 centered">

			<h2>Sell a new item</h2>

			@views.html.fragments.forms.globalErrors(saleForm)

			@helper.form(action = routes.Sale.sellSubmit(), 'class -> "pure-form pure-form-stacked") {

				@helper.CSRF.formField

				<fieldset>
					@views.html.fragments.forms.labeledField(saleForm("name"), "text", "Item name")
					@views.html.fragments.forms.labeledField(saleForm("shortDescription"), "text", "Short description")
					@views.html.fragments.forms.labeledTextarea(saleForm("longDescription"), "text", "Long description")
				</fieldset>

				<fieldset>
					@views.html.fragments.forms.labeledField(saleForm("endDate"), "date", "End date")
					@views.html.fragments.forms.labeledField(saleForm("initialPrice"), "number", "Initial price")
				</fieldset>

				<button type="submit" class="pure-button pure-input-1 pure-button-primary">Save</button>

			}

		</div>
	</div>

}