Files
Phraseanet/templates/web/account/account.html.twig
Romain Neutron e7421e1fdd Fix twig tags
2013-12-03 20:02:39 +01:00

242 lines
17 KiB
Twig

{% extends "account/base.html.twig" %}
{% import "common/macros.html.twig" as auth_macro %}
{% set selected = "informations" %}
{% block stylesheet %}
<link rel="stylesheet" type="text/css" href="{{ path('minifier', { 'f' : 'skins/geonames/geonames.css' }) }}">
{{ parent() }}
{% endblock %}
{% block javascript %}
{{ parent() }}
<script type="text/javascript" language="javascript" src="{{ path('minifier', { 'f' : '/skins/account/account.js,assets/geonames-server-jquery-plugin/jquery.geonames.js,scripts/common/geonames.js' }) }}"></script>
<script type="text/javascript">
$(document).ready(function() {
geonames.init($("#form_geonameid"), {
"server": "{{ app['geonames.server-uri'] }}",
"limit": 40
});
});
</script>
{% endblock %}
{% block title %}
{{ "login:: Mon compte" | trans }}
{% endblock %}
{% block content_account %}
<div class="row-fluid">
<div class="span12">
{{ auth_macro.flashes() }}
<form name="account" id="account" class="form-horizontal" action="{{ path("submit_update_account") }}" method="post">
<div class="row-fluid">
<div class="span12 well well-small" id="phr-account">
<legend>{{ "Informations personnelles" | trans }}</legend>
<div class="control-group">
<label class="form_label control-label" for="form_login"><strong>{{ "admin::compte-utilisateur identifiant" | trans }}</strong></label>
<div class="controls">
<span class="control-span">{{ app["authentication"].getUser().get_login() }}</span>
<p class="form_alert help-block"></p>
</div>
</div>
<div class="control-group">
<label class="form_label control-label" for="form_gender"><strong>{{ "admin::compte-utilisateur sexe" | trans }}</strong></label>
<div class="controls">
<select name="form_gender" class="input-xlarge">
<option value=""></option>
<option {% if app["authentication"].getUser().get_gender() == "0" %}selected{% endif %} value="0" >
{{ "admin::compte-utilisateur:sexe: mademoiselle" | trans }}
</option>
<option {% if app["authentication"].getUser().get_gender() == "1" %}selected{% endif %} value="1" >
{{ "admin::compte-utilisateur:sexe: madame" | trans }}
</option>
<option {% if app["authentication"].getUser().get_gender() == "2" %}selected{% endif %} value="2" >
{{ "admin::compte-utilisateur:sexe: monsieur" | trans }}
</option>
</select>
<p class="form_alert help-block"></p>
</div>
</div>
<div class="control-group">
<label class="form_label control-label" for="form_lastname"><strong>{{ "admin::compte-utilisateur nom" | trans }}</strong></label>
<div class="controls">
<input class="input_element input-xlarge" type="text" name="form_lastname" id="form_lastname" value="{{ app["authentication"].getUser().get_lastname() }}" />
<p class="form_alert help-block"></p>
</div>
</div>
<div class="control-group">
<label class="form_label control-label" for="form_firstname"><strong>{{ "admin::compte-utilisateur prenom" | trans }}</strong></label>
<div class="controls">
<input class="input_element input-xlarge" type="text" name="form_firstname" id="form_firstname" value="{{ app["authentication"].getUser().get_firstname() }}" />
<p class="form_alert help-block"></p>
</div>
</div>
<div class="control-group">
<label class="form_label control-label" for="form_firstname"><strong>{{ "admin::compte-utilisateur email" | trans }}</strong></label>
<div class="controls">
<span class="control-span">{{ app["authentication"].getUser().get_email() }} <a href="{{ path("account_reset_email") }}" target="_self">{{ "login:: Changer mon adresse email" | trans }}</a></span>
<p class="form_alert help-block"></p>
</div>
</div>
<div class="control-group">
<label class="control-label"><strong>{{ "Password" | trans }}</strong></label>
<div class="controls">
<span class="control-span"><a href="{{ path("reset_password") }}" target="_self">{{ "admin::compte-utilisateur changer mon mot de passe" | trans }}</a></span>
</div>
</div>
<div class="control-group">
<label class="form_label control-label" for="form_address"><strong>{{ "admin::compte-utilisateur adresse" | trans }}</strong></label>
<div class="controls">
<input class="input_element input-xlarge" type="text" name="form_address" id="form_address" value="{{ app["authentication"].getUser().get_address() }}" />
<p class="form_alert help-block"></p>
</div>
</div>
<div class="control-group">
<label class="form_label control-label" for="form_zip"><strong>{{ "admin::compte-utilisateur code postal" | trans }}</strong></label>
<div class="controls">
<input class="input_element input-xlarge" type="text" name="form_zip" id="form_zip" value="{{ app["authentication"].getUser().get_zipcode() }}" />
<p class="form_alert help-block"></p>
</div>
</div>
<div class="control-group">
<label class="form_label control-label" for="form_city"><strong>{{ "admin::compte-utilisateur ville" | trans }}</strong></label>
<div class="controls">
<input class="input_element input-xlarge geoname_field" type="text" name="form_geonameid" id="form_geonameid" value="{{ app["authentication"].getUser().get_geonameid() }}" />
<p class="form_alert help-block"></p>
</div>
</div>
<div class="control-group">
<label class="form_label control-label" for="form_function"><strong>{{ "admin::compte-utilisateur poste" | trans }}</strong></label>
<div class="controls">
<input class="input_element input-xlarge" type="text" name="form_function" id="form_function" value="{{ app["authentication"].getUser().get_position() }}" />
<p class="form_alert help-block"></p>
</div>
</div>
<div class="control-group">
<label class="form_label control-label" for="form_company"><strong>{{ "admin::compte-utilisateur societe" | trans }}</strong></label>
<div class="controls">
<input class="input_element input-xlarge" type="text" name="form_company" id="form_company" value="{{ app["authentication"].getUser().get_company() }}" />
<p class="form_alert help-block"></p>
</div>
</div>
<div class="control-group">
<label class="form_label control-label" for="form_activity"><strong>{{ "admin::compte-utilisateur activite" | trans }}</strong></label>
<div class="controls">
<input class="input_element input-xlarge" type="text" name="form_activity" id="form_activity" value="{{ app["authentication"].getUser().get_job() }}" />
<p class="form_alert help-block"></p>
</div>
</div>
<div class="control-group">
<label class="form_label control-label" for="form_phone"><strong>{{ "admin::compte-utilisateur telephone" | trans }}</strong></label>
<div class="controls">
<input class="input_element input-xlarge" type="text" name="form_phone" id="form_phone" value="{{ app["authentication"].getUser().get_tel() }}" />
<p class="form_alert help-block"></p>
</div>
</div>
<div class="control-group">
<label class="form_label control-label" for="form_fax"><strong>{{ "admin::compte-utilisateur fax" | trans }}</strong></label>
<div class="controls">
<input class="input_element input-xlarge" type="text" name="form_fax" id="form_fax" value="{{ app["authentication"].getUser().get_fax() }}" />
<p class="form_alert help-block"></p>
</div>
</div>
<legend>{{ "Notification par email" | trans }}</legend>
{% for notification_group, nots in notifications%}
<div class="control-group">
<span class="pull-left"><strong>{{ notification_group }}</strong></span>
<div class="controls">
<ul class="unstyled well">
{% for notification in nots %}
<li>
<label class="checkbox" for="notif_{{ notification["id"] }}">
<input type="checkbox" id="notif_{{ notification["id"] }}" name="notifications[{{ notification["id"] }}]" {% if not app["authentication"].getUser().get_notifications_preference(app, notification["id"]) == "0" %}checked{% endif %} value="1"/>
{{ notification["description"] }}
</label>
<p class="form_alert help-block"></p>
</li>
{% endfor %}
</ul>
</div>
</div>
{% endfor %}
<legend>{{ "FTP" | trans }}</legend>
{% set ftpCredential = app["authentication"].getUser().getFtpCredential() %}
<div class="control-group">
<div class="controls">
<label class="form_label checkbox" for="form_activeFTP">{{ "admin::compte-utilisateur:ftp: Activer le compte FTP" | trans }}
<input class="input_element input-xlarge" type="checkbox" name="form_activeFTP" id="form_activeFTP" {% if ftpCredential.isActive() %}checked{% endif %} onchange="if(this.checked){$('#ftpinfos').slideDown();}else{$('#ftpinfos').slideUp();}" />
</label>
<p class="form_alert help-block"></p>
</div>
</div>
<div id="ftpinfos" style="display:{% if ftpCredential.isActive() %}block{% else %}none{% endif %}">
<div class="control-group">
<label class="form_label control-label" for="form_addressFTP"><strong>{{ "phraseanet:: adresse" | trans }}</strong></label>
<div class="controls">
<input class="input_element input-xlarge" type="text" name="form_addressFTP" id="form_addressFTP" value="{{ ftpCredential.getAddress() }}" />
<p class="form_alert help-block"></p>
</div>
</div>
<div class="control-group">
<label class="form_label control-label" for="form_loginFTP"><strong>{{ "admin::compte-utilisateur identifiant" | trans }}</strong></label>
<div class="controls">
<input class="input_element input-xlarge" type="text" name="form_loginFTP" id="form_loginFTP" value="{{ ftpCredential.getLogin() }}" />
<p class="form_alert help-block"></p>
</div>
</div>
<div class="control-group">
<label class="form_label control-label" for="form_pwdFTP"><strong>{{ "admin::compte-utilisateur mot de passe" | trans }}</strong></label>
<div class="controls">
<input class="input_element input-xlarge" type="text" name="form_pwdFTP" id="form_pwdFTP" value="{{ ftpCredential.getPassword() }}" />
<p class="form_alert help-block"></p>
</div>
</div>
<div class="control-group">
<label class="form_label control-label" for="form_destFTP"><strong>{{ "admin::compte-utilisateur:ftp: repertoire de destination ftp" | trans }}</strong></label>
<div class="controls">
<input class="input_element input-xlarge" type="text" name="form_destFTP" id="form_destFTP" value="{{ ftpCredential.getReceptionFolder() }}" />
<p class="form_alert help-block"></p>
</div>
</div>
<div class="control-group">
<label class="form_label control-label" for="form_prefixFTPfolder"><strong>{{ "admin::compte-utilisateur:ftp: prefixe des noms de dossier ftp" | trans }}</strong></label>
<div class="controls">
<input class="input_element input-xlarge" type="text" name="form_prefixFTPfolder" id="form_prefixFTPfolder" value="{{ ftpCredential.getRepositoryPrefixName() }}" />
<p class="form_alert help-block"></p>
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="form_label checkbox" for="form_passifFTP">
{{ "admin::compte-utilisateur:ftp: Utiliser le mode passif" | trans }}
<input class="input_element input-xlarge" type="checkbox" name="form_passifFTP" id="form_passifFTP" {% if ftpCredential.isPassive() %}checked{% endif %} />
</label>
<p class="form_alert help-block"></p>
</div>
</div>
<div class="control-group">
<label class="form_label control-label" for="form_retryFTP"><strong>{{ "admin::compte-utilisateur:ftp: Nombre d\'essais max" | trans }}</strong></label>
<div class="controls">
<input class="input_element input-xlarge" type="text" name="form_retryFTP" id="form_retryFTP" value="{{ ftpCredential.getMaxRetry() }}" />
<p class="form_alert help-block"></p>
</div>
</div>
</div>
</div>
<div class="form-actions">
<input type="submit" class="btn btn-info btn-" value="{{ "boutton::valider" | trans }}">
</div>
</div>
</form>
</div>
</div>
{% endblock %}