2011-09-29 08:17:51 +00:00

36 lines
997 B
PHTML

<?php if ($this->isPost) :?>
<?php if ($this->image): ?>
<div style="text-align:center;">
<img src="logos/<?=$this->image?>&uid=<?=time()?>" />
<br/>
<a id="logo_crop" href="<?=$this->url(array('controller'=>'logo', 'action'=>'crop', 'file'=>$this->image))?>">
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;?>