mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 05:23:21 +00:00
62 lines
2.9 KiB
Twig
62 lines
2.9 KiB
Twig
<div class="header">
|
||
<h1>{% trans 'admin::base:collection: Creer une collection' %}</h1>
|
||
</div>
|
||
|
||
{% if app['request'].get('error') == 'name' %}
|
||
<div class="alert alert-error">
|
||
<a class="close" data-dismiss="alert" href="#">×</a>
|
||
{% trans 'admin:: La collection n\'a pas ete creee : vous devez donner un nom a votre collection' %}
|
||
</div>
|
||
|
||
{% elseif app['request'].get('error') == 'error' %}
|
||
<div class="alert alert-error">
|
||
<a class="close" data-dismiss="alert" href="#">×</a>
|
||
{% trans 'An error occured, please retry or contact an admin if problem persist' %}
|
||
</div>
|
||
{% endif %}
|
||
|
||
<div class="well-small">
|
||
<form class="form-horizontal" method='post' action='{{ path('admin_database_submit_collection', {'databox_id': app['request'].get('databox_id')}) }}'>
|
||
<fieldset>
|
||
<div class="control-group">
|
||
<label class="control-label" for="cnm">{% trans 'admin::base:collection: Nom de la nouvelle collection : ' %}</label>
|
||
<div class="controls">
|
||
<input id="cnm" name="name" class="input-xlarge" type="text">
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label" for="ccusrothercoll">{% trans "admin::base:collection: Vous pouvez choisir une collection de reference pour donenr des acces " %}</label>
|
||
<div class="controls">
|
||
<input type="checkbox" id="ccusrothercoll" name="ccusrothercoll">
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<div class="controls">
|
||
{% if app['phraseanet.user'].ACL().get_granted_base(["canadmin"]) | length > 0 %}
|
||
<select id="othcollsel" name="othcollsel" disabled>
|
||
<option>{% trans "choisir" %}</option>
|
||
{% for baseId, collection in app['phraseanet.user'].ACL().get_granted_base(["canadmin"]) %}
|
||
<option value="{{ baseId }}">{{ collection.get_name() }}</option>
|
||
{% endfor %}
|
||
</select>
|
||
{% endif %}
|
||
</div>
|
||
</div>
|
||
<div class="form-actions">
|
||
<button class="btn btn-primary" type="submit">{% trans 'boutton::valider' %}</button>
|
||
<a href='{{ path('admin_database', {'databox_id': app['request'].get('databox_id')}) }}' target='right' class="btn ajax">{% trans 'boutton::annuler' %}</a>
|
||
</div>
|
||
</fieldset>
|
||
</form>
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
$("#ccusrothercoll").bind('click', function(){
|
||
if($(this).is(':checked')) {
|
||
$("#othcollsel").attr("disabled", false);
|
||
} else {
|
||
$("#othcollsel").attr("disabled", true);
|
||
}
|
||
});
|
||
</script>
|