Skip to content

Commit

Permalink
Merge pull request Sylius#13 from Lakion/login-register-pages-integra…
Browse files Browse the repository at this point in the history
…tion

[CJMAX-11][CJMAX-12] Login and registration pages integration
  • Loading branch information
michalmarcinkowski committed Mar 28, 2016
2 parents 5481453 + 731def0 commit 6b47d23
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 0 deletions.
68 changes: 68 additions & 0 deletions app/Resources/SyliusWebBundle/views/Frontend/User/login.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{% extends '@SyliusWeb/Frontend/layout.html.twig' %}

{% block title %}
- 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="box text-center">
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<h1>Login</h1>
</div>
</div>
</div>

{{ parent() }}

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

<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="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="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>
{% endblock %}
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 6b47d23

Please sign in to comment.