Skip to content

Commit

Permalink
[CJMAX-12] Integrated registration page
Browse files Browse the repository at this point in the history
  • Loading branch information
NoResponseMate committed Mar 28, 2016
1 parent ae27b5a commit 731def0
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 31 deletions.
68 changes: 37 additions & 31 deletions app/Resources/SyliusWebBundle/views/Frontend/User/login.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,58 +4,64 @@
- Login
{% endblock %}

{% block topbar %}
<ul class="breadcrumb">
<li><a href={{ path('sylius_homepage') }}>Home</a></li>
<li>Login</li>
</ul>
{% endblock %}

{% block content %}
<div class="page-header">
<h1>Login</h1>
<div class="box text-center">
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<h1>Login</h1>
</div>
</div>
</div>

<blockquote>
<p>{{ 'sylius.security.login.info'|trans|raw }}</p>
</blockquote>
{{ parent() }}

<div class="col-md-6 col-md-offset-3">
<div class="box">

<form action="{{ path('sylius_user_security_check') }}" method="post" class="form-horizontal" >

{{ form_errors(form) }}

<div class="row">
{{ form_label(form._username, null, {'label_attr': {'class': 'text-muted pull-left'}}) }}
{{ form_widget(form._username) }}
{{ form_errors(form._username) }}
</div>
<form action="{{ path('sylius_user_security_check') }}" method="post">
<div class="row">
{{ form_label(form._password, null, {'label_attr': {'class': 'text-muted pull-left'}}) }}
{{ form_widget(form._password) }}
{{ form_errors(form._password) }}
</div>
<div class="spacer-50">&nbsp;</div>
{{ form_errors(form) }}

<div class="box row">
<div class="col-md-12">
{{ form_label(form._username, null, {'label_attr': {'class': 'text-muted pull-left'}}) }}
{{ form_widget(form._username) }}
{{ form_errors(form._username) }}
</div>
<div class="col-md-12">
{{ form_label(form._password, null, {'label_attr': {'class': 'text-muted pull-left'}}) }}
{{ form_widget(form._password) }}
{{ form_errors(form._password) }}
</div>
<div class="spacer-50">&nbsp;</div>
</div>

<div class="col-md-6 form-group remember-me text-center">
<label for="remember_me"><h4 class="text-muted">Remember me</h4></label>
<input type="checkbox" id="remember_me" name="_remember_me"/>
</div>
<div class="col-md-6 text-center">
<div class="form-actions clearfix">
<div class="box">
<div class="row">
<div class="col-md-6 remember-me text-center">
<label for="remember_me"><h4 class="text-muted">Remember me</h4></label>
<input type="checkbox" id="remember_me" name="_remember_me"/>
</div>
<div class="col-md-6 text-center">
<button class="btn btn-primary btn-lg" type="submit">
<i class="fa fa-sign-in"></i>
Log in
</button>
</div>
</div>
</div>

{{ form_rest(form) }}

</form>

<div class="box-footer">
<a href="{{ path('sylius_user_request_password_reset_token') }}" class="btn btn-info btn-sm pull-left">Forgot password?</a>
<a href="{{ path('sylius_user_registration') }}" class="btn btn-primary btn-sm pull-right">Register <i class="fa fa-user-plus"></i></a>
<div class="row">
<a href="{{ path('sylius_user_request_password_reset_token') }}" class="btn btn-default btn-sm pull-left">Forgot password?</a>
<a href="{{ path('sylius_user_registration') }}" class="btn btn-primary btn-sm pull-right"><i class="fa fa-user-plus"></i>Register</a>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{% extends 'SyliusWebBundle:Frontend:layout.html.twig' %}

{% block title %}
- Register
{% endblock %}

{% block topbar %}
<ul class="breadcrumb">
<li><a href={{ path('sylius_homepage') }}>Home</a></li>
<li>Register</li>
</ul>
{% endblock %}

{% block content %}
<div class="box text-center">
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<h1>Register</h1>
</div>
</div>
</div>

{{ parent() }}

<div class="col-md-6 col-md-offset-3">
<div class="box">
<form action="{{ path('sylius_user_registration') }}" method="post">
<div class="row">
{{ form_errors(form) }}

<div class="col-md-12">
{{ form_label(form.email, null, {'label_attr': {'class': 'text-muted pull-left'}}) }}
{{ form_widget(form.email) }}
{{ form_errors(form.email) }}
</div>
<div class="col-md-6">
{{ form_label(form.firstName, null, {'label_attr': {'class': 'text-muted pull-left'}}) }}
{{ form_widget(form.firstName) }}
{{ form_errors(form.firstName) }}
</div>
<div class="col-md-6">
{{ form_label(form.lastName, null, {'label_attr': {'class': 'text-muted pull-left'}}) }}
{{ form_widget(form.lastName) }}
{{ form_errors(form.lastName) }}
</div>
<div class="spacer-50">&nbsp;</div>
<div class="col-md-12">
{{ form_label(form.user.plainPassword.first, null, {'label_attr': {'class': 'text-muted pull-left'}}) }}
{{ form_widget(form.user.plainPassword.first) }}
{{ form_errors(form.user.plainPassword.first) }}
</div>
<div class="col-md-12">
{{ form_label(form.user.plainPassword.second, null, {'label_attr': {'class': 'text-muted pull-left'}}) }}
{{ form_widget(form.user.plainPassword.second) }}
{{ form_errors(form.user.plainPassword.second) }}
</div>

{{ form_rest(form) }}
</div>
<div class="spacer-50">&nbsp;</div>

<div class="box form-actions clearfix text-center">
<button class="btn btn-primary btn-lg" type="submit">
<i class="fa fa-user-plus"></i>
Register
</button>
</div>
</form>
</div>
</div>
{% endblock %}

0 comments on commit 731def0

Please sign in to comment.