Skip to content

Instantly share code, notes, and snippets.

@Tilotiti
Created October 7, 2016 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tilotiti/10132d79375161f1c58bee11a5df5beb to your computer and use it in GitHub Desktop.
Save Tilotiti/10132d79375161f1c58bee11a5df5beb to your computer and use it in GitHub Desktop.
Symfony - Création d'un espace sécurisé (Views)
{% extends 'base.html.twig' %}
{% block body %}
<h1>Connexion</h1>
{% if error %}
<div class="alert alert-danger">{{ error.message }}</div>
{% endif %}
<form method="post" action="{{ path('login_check') }}" class="form-horizontal col-md-6 col-md-offset-2">
<div class="form-group">
<label class="control-label col-sm-4" id="inputUsername">Nom d'utilisateur</label>
<div class="col-sm-8">
<input type="text" id="inputUsername" name="_username" value="{{ last_username }}" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="inputPassword">Mot de passe</label>
<div class="col-sm-8">
<input type="password" id="inputPassword" name="_password" class="form-control" />
</div>
</div>
<div class="form-group">
<div class="col-sm-8 col-sm-offset-4">
<button class="btn btn-default">
<i class="glyphicon glyphicon-lock"></i> Se connecter
</button>
</div>
</div>
</form>
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment