mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Story Create template
This commit is contained in:
58
templates/web/prod/Story/Create.html.twig
Normal file
58
templates/web/prod/Story/Create.html.twig
Normal file
@@ -0,0 +1,58 @@
|
||||
<form method="POST" action="/prod/story/">
|
||||
|
||||
<label for="add_sel">{% trans 'Ajouter ma selection courrante' %}</label>
|
||||
<input type="checkbox" id="story_create_sel" name="lst" value=""/>
|
||||
|
||||
<label>{% trans 'Story name' %}</label>
|
||||
<input name="name" value="" type="text"/>
|
||||
|
||||
<label>{% trans 'Story description' %}</label>
|
||||
<textarea name="description"></textarea>
|
||||
|
||||
<label>{% trans 'Collection' %}</label>
|
||||
<select name="base_id">
|
||||
{% for collection in user.ACL().get_granted_base(['canaddrecord']) %}
|
||||
<option value="{{ collection.get_base_id() }}">{{ collection.get_databox().get_viewname() }} / {{ collection.get_name() }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<button>{% trans 'boutton::valider' %}</button>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('#story_create_sel').val(p4.sel.join(';'));
|
||||
|
||||
$('#DIALOG form').bind('submit', function(event){
|
||||
|
||||
//$this.SetLoader(true);
|
||||
|
||||
var $form = $(this);
|
||||
|
||||
$.ajax({
|
||||
type: $form.attr('method'),
|
||||
url: $form.attr('action'),
|
||||
data: $form.serializeArray(),
|
||||
dataType: 'json',
|
||||
beforeSend:function(){
|
||||
|
||||
},
|
||||
success: function(data){
|
||||
|
||||
refreshBaskets(data.basket.id);
|
||||
$('#DIALOG').dialog('close').empty();
|
||||
|
||||
return;
|
||||
},
|
||||
error: function(){
|
||||
|
||||
},
|
||||
timeout: function(){
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</form>
|
Reference in New Issue
Block a user