liquid_feedback_frontend
annotate app/main/registration/register_enter_pin.lua @ 1309:32cc544d5a5b
Cumulative patch for upcoming frontend version 4
| author | bsw/jbe |
|---|---|
| date | Sun Jul 15 14:07:29 2018 +0200 (2018-07-15) |
| parents | |
| children |
| rev | line source |
|---|---|
| bsw/jbe@1309 | 1 local id = param.get_id() |
| bsw/jbe@1309 | 2 local verification = Verification:by_id(id) |
| bsw/jbe@1309 | 3 local invalid_pin = param.get("invalid_pin", atom.boolean) |
| bsw/jbe@1309 | 4 |
| bsw/jbe@1309 | 5 ui.title(_"Self registration") |
| bsw/jbe@1309 | 6 app.html_title.title = _"Self registration" |
| bsw/jbe@1309 | 7 |
| bsw/jbe@1309 | 8 ui.container{ attr = { class = "mdl-grid" }, content = function() |
| bsw/jbe@1309 | 9 ui.container{ attr = { class = "mdl-cell mdl-cell--12-col" }, content = function() |
| bsw/jbe@1309 | 10 |
| bsw/jbe@1309 | 11 ui.heading{ content = _"PIN page" } |
| bsw/jbe@1309 | 12 slot.put("<br />") |
| bsw/jbe@1309 | 13 ui.container { content = _"You should receive a PIN code via SMS shortly. Please enter the PIN." } |
| bsw/jbe@1309 | 14 |
| bsw/jbe@1309 | 15 if invalid_pin then |
| bsw/jbe@1309 | 16 slot.put("<br />") |
| bsw/jbe@1309 | 17 ui.container { attr = { class = "warning" }, content = _"Invalid PIN, please try again!" } |
| bsw/jbe@1309 | 18 slot.put("<br />") |
| bsw/jbe@1309 | 19 end |
| bsw/jbe@1309 | 20 |
| bsw/jbe@1309 | 21 ui.form{ |
| bsw/jbe@1309 | 22 module = "registration", action = "register_pin", id = verification.id, |
| bsw/jbe@1309 | 23 content = function() |
| bsw/jbe@1309 | 24 ui.field.text{ |
| bsw/jbe@1309 | 25 container_attr = { class = "mdl-textfield mdl-js-textfield mdl-textfield--floating-label" }, |
| bsw/jbe@1309 | 26 attr = { id = "pin", class = "mdl-textfield__input", autofocus = "autofocus" }, |
| bsw/jbe@1309 | 27 label_attr = { class = "mdl-textfield__label", ["for"] = "pin" }, |
| bsw/jbe@1309 | 28 label = "PIN code", |
| bsw/jbe@1309 | 29 name = "pin" |
| bsw/jbe@1309 | 30 } |
| bsw/jbe@1309 | 31 |
| bsw/jbe@1309 | 32 slot.put("<br />") |
| bsw/jbe@1309 | 33 |
| bsw/jbe@1309 | 34 ui.tag{ |
| bsw/jbe@1309 | 35 tag = "input", |
| bsw/jbe@1309 | 36 attr = { |
| bsw/jbe@1309 | 37 type = "submit", |
| bsw/jbe@1309 | 38 class = "mdl-button mdl-js-button mdl-button--raised mdl-button--colored", |
| bsw/jbe@1309 | 39 value = _"Proceed with registration" |
| bsw/jbe@1309 | 40 } |
| bsw/jbe@1309 | 41 } |
| bsw/jbe@1309 | 42 |
| bsw/jbe@1309 | 43 slot.put("<br /><br />") |
| bsw/jbe@1309 | 44 |
| bsw/jbe@1309 | 45 ui.heading{ content = _"No PIN code received?" } |
| bsw/jbe@1309 | 46 slot.put("<br />") |
| bsw/jbe@1309 | 47 ui.container { content = _"If you have not received a PIN code, our team will need to check your registration manually. We will be in touch within two working days. Please accept our apologies for the inconvenience." } |
| bsw/jbe@1309 | 48 |
| bsw/jbe@1309 | 49 slot.put("<br />") |
| bsw/jbe@1309 | 50 |
| bsw/jbe@1309 | 51 ui.tag{ |
| bsw/jbe@1309 | 52 tag = "input", |
| bsw/jbe@1309 | 53 attr = { |
| bsw/jbe@1309 | 54 name = "manual_verification", |
| bsw/jbe@1309 | 55 type = "submit", |
| bsw/jbe@1309 | 56 class = "mdl-button mdl-js-button mdl-button--raised", |
| bsw/jbe@1309 | 57 value = _"Start manual verification" |
| bsw/jbe@1309 | 58 } |
| bsw/jbe@1309 | 59 } |
| bsw/jbe@1309 | 60 |
| bsw/jbe@1309 | 61 end |
| bsw/jbe@1309 | 62 } |
| bsw/jbe@1309 | 63 |
| bsw/jbe@1309 | 64 |
| bsw/jbe@1309 | 65 end } |
| bsw/jbe@1309 | 66 end } |