37 lines
1.0 KiB
PHTML
Raw Normal View History

2011-09-29 08:17:51 +00:00
<?php if ($this->isPost) :?>
<div style="text-align:center;">
<?php if ($this->image):?>
2012-01-23 13:13:21 +00:00
<img src="/fichier/logo/<?=$this->image?>"/>
2011-09-29 08:17:51 +00:00
<br/>
2012-01-24 17:10:14 +00:00
<a id="logo_crop" href="<?=$this->url(array('controller'=>'logo', 'action'=>'crop', 'image'=>$this->image), null, true)?>">
2011-09-29 08:17:51 +00:00
Editer l'image</a>
<?php else:?>
Erreur
<?php endif;?>
</div>
<?php else:?>
<form id="uploadForm" name="uploadForm" action="<?=$this->url(array('controller'=>'logo','action'=>'upload'), null, true)?>" method="post" enctype="multipart/form-data">
<input name="MAX_FILE_SIZE" value="100000" type="hidden">
<input type="hidden" name="siren" value="<?=$this->siren?>"/>
<label>Fichier:</label><input name="file" type="file">
<input value="Envoyer" type="submit">
</form>
<div id="uploadOutput"></div>
<script type="text/javascript">
$('#uploadForm').ajaxForm({
dataType: 'html',
target: '#uploadOutput',
beforeSubmit: function(a,f,o) {
$('#uploadOutput').html('Envoi en cours...');
},
success: function(data) {
$('#uploadOutput').html(data);
return false;
}
});
</script>
<?php endif;?>