Skip to content

Commit

Permalink
Merge pull request #13 from nucleos/form-theme
Browse files Browse the repository at this point in the history
Use bootstrap 3 layout as default form theme
  • Loading branch information
core23 committed Feb 7, 2020
2 parents e612edc + e9bdd93 commit 19d560c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 7 additions & 3 deletions src/Resources/views/Profile/edit_content.html.twig
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{% trans_default_domain 'NucleosProfileBundle' %}

{% form_theme form 'bootstrap_3_horizontal_layout.html.twig' %}

{{ form_start(form, { 'action': path('nucleos_profile_profile_edit'), 'attr': { 'class': 'nucleos_profile_profile_edit' } }) }}
{{ form_widget(form) }}
<div>
<input type="submit" value="{{ 'profile.edit.submit'|trans }}"/>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input type="submit" class="btn btn-primary" value="{{ 'profile.edit.submit'|trans }}"/>
</div>
</div>
{{ form_end(form) }}
10 changes: 7 additions & 3 deletions src/Resources/views/Registration/register_content.html.twig
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{% trans_default_domain 'NucleosProfileBundle' %}

{% form_theme form 'bootstrap_3_horizontal_layout.html.twig' %}

{{ form_start(form, {'method': 'post', 'action': path('nucleos_profile_registration_register'), 'attr': {'class': 'nucleos_profile_registration_register'}}) }}
{{ form_widget(form) }}
<div>
<input type="submit" value="{{ 'registration.submit'|trans }}"/>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input type="submit" class="btn btn-primary" value="{{ 'registration.submit'|trans }}"/>
</div>
</div>
{{ form_end(form) }}

0 comments on commit 19d560c

Please sign in to comment.