2015-03-04 18:40:32 -05:00
|
|
|
extends /templates/base
|
|
|
|
|
|
|
|
block content
|
|
|
|
|
|
|
|
if me.get('anonymous')
|
|
|
|
p(data-i18n="account_invoices.not_logged_in")
|
|
|
|
else
|
|
|
|
ol.breadcrumb
|
|
|
|
li
|
|
|
|
a(href="/")
|
|
|
|
span.glyphicon.glyphicon-home
|
|
|
|
li
|
|
|
|
a(href="/account", data-i18n="nav.account")
|
|
|
|
li.active(data-i18n="account.invoices")
|
|
|
|
|
|
|
|
if state === 'purchasing'
|
|
|
|
.alert.alert-info(data-i18n="account_invoices.purchasing")
|
|
|
|
else if state === 'retrying'
|
|
|
|
#retrying-alert.alert.alert-danger(data-i18n="account_invoices.retrying")
|
|
|
|
else
|
|
|
|
.form
|
|
|
|
.form-group
|
|
|
|
label.control-label(for="amount", data-i18n="account_invoices.amount")
|
2015-10-22 18:26:52 -04:00
|
|
|
input#amount.form-control(name="amount", type="text", value="#{(view.amount / 100).toFixed(2)}")
|
2015-03-04 18:40:32 -05:00
|
|
|
.form-group
|
|
|
|
label.control-label(for="description", data-i18n="general.description")
|
2015-10-22 18:26:52 -04:00
|
|
|
input#description.form-control(name="description", type="text", value="#{view.description}")
|
2015-03-04 18:40:32 -05:00
|
|
|
button#pay-button.btn.form-control.btn-primary(data-i18n="account_invoices.pay")
|
|
|
|
|
|
|
|
br
|
|
|
|
|
2015-10-22 18:26:52 -04:00
|
|
|
if view.state === 'invoice_paid'
|
2015-03-04 18:40:32 -05:00
|
|
|
#declined-alert.alert.alert-success.alert-dismissible
|
|
|
|
button.close(type="button" data-dismiss="alert")
|
|
|
|
span(aria-hidden="true") ×
|
2015-10-22 18:26:52 -04:00
|
|
|
p= view.stateMessage
|
|
|
|
if view.state === 'validation_error'
|
2015-03-04 18:40:32 -05:00
|
|
|
#declined-alert.alert.alert-danger.alert-dismissible
|
|
|
|
button.close(type="button" data-dismiss="alert")
|
|
|
|
span(aria-hidden="true") ×
|
2015-10-22 18:26:52 -04:00
|
|
|
p= view.stateMessage
|
|
|
|
if view.state === 'declined'
|
2015-03-04 18:40:32 -05:00
|
|
|
#declined-alert.alert.alert-danger.alert-dismissible
|
|
|
|
span(data-i18n="account_invoices.declined")
|
|
|
|
button.close(type="button" data-dismiss="alert")
|
|
|
|
span(aria-hidden="true") ×
|
2015-10-22 18:26:52 -04:00
|
|
|
if view.state === 'unknown_error'
|
2015-03-04 18:40:32 -05:00
|
|
|
#error-alert.alert.alert-danger.alert-dismissible
|
|
|
|
button.close(type="button" data-dismiss="alert")
|
|
|
|
span(aria-hidden="true") ×
|
|
|
|
p(data-i18n="loading_error.unknown")
|
2015-10-22 18:26:52 -04:00
|
|
|
p= view.stateMessage
|