36 lines
1002 B
PHTML
Raw Normal View History

2011-09-29 08:17:51 +00:00
<?php if ($this->isPost) :?>
<?php if ($this->image): ?>
<div style="text-align:center;">
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-26 16:06:43 +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>
</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;?>