Skip to content

Commit c1679ba

Browse files
author
Ben Thomson
committed
Use form_ajax() Twig function for all account component forms.
Fixes #388.
1 parent ba27e63 commit c1679ba

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

components/account/register.htm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{% if canRegister %}
22
<h3>Register</h3>
3-
<form
4-
data-request="onRegister">
3+
4+
{{ form_ajax('onRegister') }}
5+
56
<div class="form-group">
67
<label for="registerName">Full Name</label>
78
<input
@@ -45,7 +46,8 @@ <h3>Register</h3>
4546
</div>
4647

4748
<button type="submit" class="btn btn-default">Register</button>
48-
</form>
49+
50+
{{ form_close() }}
4951
{% else %}
5052
<!-- Registration is disabled. -->
5153
{% endif %}

components/account/signin.htm

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<form
2-
data-request="onSignin">
1+
{{ form_ajax('onSignin') }}
2+
33
<div class="form-group">
44
<label for="userSigninLogin">{{ loginAttributeLabel }}</label>
55
<input
@@ -21,4 +21,5 @@
2121
</div>
2222

2323
<button type="submit" class="btn btn-default">Sign in</button>
24-
</form>
24+
25+
{{ form_close() }}

0 commit comments

Comments
 (0)