28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
- if !defined?(pex)
|
|
- pex = nil
|
|
main.col-md-9.ms-sm-auto.col-lg-10.px-md-4
|
|
h1
|
|
- if pex
|
|
| Update #{pex.name}
|
|
- else
|
|
| Add a new pex
|
|
form.col-md-6 method="POST" action="/pexs"
|
|
== csrf_tag
|
|
- if pex
|
|
input type="hidden" name="id" value=pex.id
|
|
.form-group.row
|
|
label.col-sm-12.col-form-label for="inputUsername" Name
|
|
input#inputUsername.form-control.form-control-lg name="name" type="text" value=pex&.name /
|
|
.form-group.row
|
|
label.col-sm-12.col-form-label for="inputCategory" Category
|
|
input#inputCategory.form-control.form-control-lg name="category" type="text" placeholder="sport" list="categoryList" value=pex&.category /
|
|
datalist#categoryList
|
|
- categories.each do |category|
|
|
option value=category
|
|
.form-group.row
|
|
label.col-sm-12.col-form-label for="inputAmount" Xp Amount by check
|
|
input#inputAmount.form-control.form-control-lg name="amount" type="integer" min="-50" max="50" value=(pex&.amount||"1") /
|
|
.form-group.row
|
|
p
|
|
input.btn.btn-lg.btn-block type="submit" value=(pex ? "update" : "create")
|