Skip to content
This repository was archived by the owner on Jan 25, 2018. It is now read-only.

Commit 9976670

Browse files
committed
prettier form errors oh my (bug 806419)
1 parent 94e3b05 commit 9976670

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

media/css/pay/pay.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ body {
6262
h2 {
6363
margin: 0;
6464
text-align: center;
65+
&.error {
66+
color: #800;
67+
}
6568
}
6669

6770
section.pay {

media/js/pin/pin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
}
3636

3737
$(window).on('focus', '.pinbox input', function(e) {
38+
this.value = '';
3839
watchInput(this);
3940
}).on('blur', '.pinbox input', function(e) {
4041
stopWatching();

webpay/pin/templates/pin/includes/verify_form.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
<h2>{{ _('Enter payment PIN:') }}</h2>
1+
{% if form.pin.errors %}
2+
<h2 class="error">{{ form.pin.errors[0] }}</h2>
3+
{% else %}
4+
<h2>{{ _('Enter payment PIN:') }}</h2>
5+
{% endif %}
26
<p>
37
<form id="pin" action="{{ url('pin.verify') }}" method="post">
48
{{ csrf() }}
5-
{{ form.errors }}
6-
{{ form.non_field_errors() }}
79
<div class="pinbox">
810
{{ form.pin }}
911
</div>

0 commit comments

Comments
 (0)