Files
Phraseanet/templates/mobile/api/auth/end_user_authorization.html.twig
2013-12-03 20:06:49 +01:00

103 lines
5.8 KiB
Twig

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta charset="utf-8" />
<title>Phraseanet Authentication</title>
<meta name="author" content="Alchemy" />
<!-- Mobile viewport optimized -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- styles -->
<link type="text/css" rel="stylesheet" href="{{ path('minifier', { 'f' : 'assets/bootstrap/css/bootstrap.css' }) }}" />
<link type="text/css" rel="stylesheet" href="{{ path('minifier', { 'f' : 'assets/bootstrap/css/bootstrap-responsive.css' }) }}" />
<link rel="stylesheet" type="text/css" href="{{ path('minifier', { 'f' : 'skins/oauth/default.css' }) }}" />
<!-- All JavaScript at the bottom, except this Modernizr build.
Modernizr enables HTML5 elements & feature detects for optimal performance. -->
<script type="text/javascript" src="{{ path('minifier', { 'f' : 'assets/modernizr/modernizr.js' }) }}"></script>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
{% set home_title = app['phraseanet.registry'].get('GV_homeTitle') %}
<body>
<div id="page" class="container">
<div id="main" class="row">
<div id="title-box" class="span6 offset3">
<h1 id="namePhr">{{home_title}}</h1>
</div>
{% if not app['authentication'].isAuthenticated() %}
<div id="content-box" class="span6 offset3">
<form id="login-form" class="form-vertical" method="post">
{% for key,value in auth.getParams %}
<input type="hidden" name="{{key}}" value="{{value}}">
{% endfor %}
{% if errorMessage %}
<p class="login_error">{{ 'Erreur de login / mot de passe' | trans }}</p>
{% endif %}
<p class="login_hello">
{% trans with {'%home_title%' : home_title} %}Bonjour, veuillez vous identifier sur %home_title% :{% endtrans %}
</p>
<input id="myLogin" name="login" class="span6" type="text" placeholder="{{ 'admin::compte-utilisateur identifiant' | trans }}" />
<input id="myPass" name="password" class="span6" type="password" placeholder="{{ 'admin::compte-utilisateur mot de passe' | trans }}" />
<input id="button_login" name="action_login" class="btn btn-inverse btn-large span6" type="submit" value="{{ 'Se connecter' | trans }}" />
</form>
<p>
<a href="#">{{ 'Problemes de connexion ?' | trans }}</a>
</p>
</div>
{% else %}
{% if app['authentication'].getUser() is not none %}
{% set username = '<b>' ~ app['authentication'].getUser().get_display_name() ~ '</b>' %}
<div id="hello-box" class="span6 offset3">
<p class="login_hello">
{% trans with {'%username%' : username} %}Hello %username%{% endtrans %}
</p>
</div>
{% endif %}
{% if auth.getClient() is not none %}
<div id="text-box" class="span6 offset3">
<div id="top-text-box">
<h4>{% trans %}Autorisation d'acces{% endtrans %}</h4>
</div>
<div id="main-text-box">
{% set application_name = '<span>' ~ auth.getClient.get_name() ~ '</span>' %}
<p>
{% trans with {'%application_name%' : application_name, '%home_title%' : home_title} %}Autorisez-vous l'application %application_name% a acceder a votre contenu sur %home_title% ?{% endtrans %}
</p>
</div>
</div>
{% endif %}
<div id="btn-box" class="span6 offset3">
<form method="post" class="access-deny">
{% for key,value in auth.getParams %}
<input type="hidden" name="{{key}}" value="{{value}}">
{% endfor %}
<input type="hidden" name="action_accept" value="1">
<input id="button_access" class="btn btn-inverse btn-large span3" type="submit" value="{{ 'Autoriser' | trans }}" />
</form>
<form method="post" class="access-deny">
{% for key,value in auth.getParams %}
<input type="hidden" name="{{key}}" value="{{value}}">
{% endfor %}
<input type="hidden" name="action_accept" value="0">
<input id="button_deny" class="btn btn-inverse btn-large span3" type="submit" value="{{ 'Ne pas autoriser' | trans }}" />
</form>
</div>
{% endif %}
</div>
</div>
<script type="text/javascript" src="{{ path('minifier', { 'f' : 'assets/jquery/jquery.js' }) }}"></script>
<script type="text/javascript" src="{{ path('minifier', { 'f' : 'assets/bootstrap/js/bootstrap.js' }) }}"></script>
</body>
</html>