Skip to content

Instantly share code, notes, and snippets.

@codecowboy
Created October 4, 2011 06:20
Show Gist options
  • Save codecowboy/1261012 to your computer and use it in GitHub Desktop.
Save codecowboy/1261012 to your computer and use it in GitHub Desktop.
Change password form
<div id="change_password_wrapper">
<h2>Change your password</h2>
<form action="{{ path('fos_user_change_password') }}" {{ form_enctype(form) }} method="POST" class="fos_user_change_password">
{%if form_errors(form)%}
<div class="ui-state-error ui-corner-all">
<p>
<span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>
<strong>Error:</strong>
{{ form_errors(form) }}
</p>
</div>
{% endif %}
<div class="form-row">
{{ form_label(form.current, 'Current password: ') }}
{{ form_errors(form.current) }}
{{ form_widget(form.current) }}
</div>
<div class="form-row">
{{ form_label(form.new.first, 'New password: ') }}
{{ form_errors(form.new.first) }}
{{ form_widget(form.new.first) }}
</div>
<div class="form-row">
{{ form_label(form.new.second, 'Verify password: ') }}
{{ form_errors(form.new.second) }}
{{ form_widget(form.new.second) }}
</div>
<div class="form_row">
<input type="submit" value="{{ 'change_password.submit'|trans({}, 'FOSUserBundle') }}" />
</div>
{{ form_rest(form) }}
</form>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment