Files
Phraseanet/templates/web/admin/collection/create.html.twig
2012-10-04 15:43:36 +02:00

62 lines
2.9 KiB
Twig
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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>