mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 05:53:13 +00:00
50 lines
1.6 KiB
Twig
50 lines
1.6 KiB
Twig
<div>
|
|
<form action="/prod/baskets/{{ basket.getId() }}/update/" method="POST" id="basket-rename-box">
|
|
<label style="margin:5px 0 0 0;">{% trans 'panier:: nom' %}</label>
|
|
<input type="text" name="name" value="{{ basket.getName() }}" style="width:98%;" />
|
|
<label style="margin:5px 0 0 0;">{% trans 'panier:: description' %}</label>
|
|
<textarea style="width:98%;height:120px;" name="description">{{ basket.getDescription() }}</textarea>
|
|
<button type='button' class="btn btn-inverse" style="margin: 5px 40%;">{% trans 'boutton::valider' %}</button>
|
|
</form>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
|
|
$('#basket-rename-box button').bind('click', function(event){
|
|
|
|
//$this.SetLoader(true);
|
|
|
|
var $form = $(this).closest('form');
|
|
|
|
$.ajax({
|
|
type: $form.attr('method'),
|
|
url: $form.attr('action'),
|
|
dataType: 'json',
|
|
data: $form.serializeArray(),
|
|
beforeSend:function(){
|
|
|
|
},
|
|
success: function(data){
|
|
$dialog = p4.Dialog.get(1).Close();
|
|
if(data.success) {
|
|
humane.info(data.message);
|
|
return p4.WorkZone.refresh(data.basket.id);
|
|
} else {
|
|
humane.error(data.message);
|
|
return false;
|
|
}
|
|
},
|
|
error: function(){
|
|
|
|
},
|
|
timeout: function(){
|
|
|
|
}
|
|
});
|
|
|
|
return false;
|
|
});
|
|
|
|
});
|
|
</script>
|
|
</div>
|