2012-01-26 16:06:43 +00:00

36 lines
1002 B
PHTML

<?php if ($this->isPost) :?>
<?php if ($this->image): ?>
<div style="text-align:center;">
<img src="/fichier/logo/<?=$this->image?>" />
<br/>
<a id="logo_crop" href="<?=$this->url(array('controller'=>'logo', 'action'=>'crop', 'image'=>$this->image), null, true)?>">
Editer l'image</a>
</div>
<?php else:?>
Saisir l'URL d'une image
<?php endif;?>
<?php else:?>
<form id="urlForm" name="urlForm" action="<?=$this->url(array('controller'=>'logo', 'action'=>'url'), null, true)?>" method="post">
<input type="hidden" name="siren" value="<?=$this->siren?>" />
<label>URL : </label><input type="text" name="url" />
<input type="submit" name="submit" value="Valider"/>
</form>
<div id="result"></div>
<script type="text/javascript">
$('#urlForm').ajaxForm({
dataType: 'html',
target: '#result',
beforeSubmit: function(a,f,o) {
$('#result').html('Récupération en cours...');
},
success: function(data) {
$('#result').html(data);
return false;
}
});
</script>
<?php endif;?>