Correction logo

This commit is contained in:
Michael RICOIS 2012-01-24 17:10:14 +00:00
parent 1e443a20e6
commit 2449222b9f
4 changed files with 8 additions and 5 deletions

View File

@ -74,13 +74,14 @@ class LogoController extends Zend_Controller_Action
$request = $this->getRequest();
$siren = $request->getParam('siren');
$image = $request->getParam('image');
if ($request->isPost())
{
$jpeg_quality = 90;
$png_quality = 90;
list($name, $ext) = explode('.', $_POST['image']);
list($name, $ext) = explode('.', $image);
$src = $name.'.'.$ext;
$dst = str_replace('tmp_', '', $src);
@ -121,7 +122,7 @@ class LogoController extends Zend_Controller_Action
$this->view->assign('image', $dst);
$this->view->assign('isPost', true);
} else {
$this->view->assign('image', $request->getParam('image'));
$this->view->assign('image', $image);
}
$this->view->assign('siren', $siren);
}

View File

@ -668,7 +668,9 @@ class SaisieController extends Zend_Controller_Action
*/
public function ficheAction()
{
$this->view->headScript()->appendFile('/themes/default/scripts/saisie.js', 'text/javascript');
$this->view->headScript()
->appendFile('/themes/default/scripts/saisie.js', 'text/javascript')
->appendFile('/themes/default/scripts/jquery.form.js', 'text/javascript');
$request = $this->getRequest();
$siret = $request->getParam('siret');

View File

@ -46,7 +46,7 @@ var options = {
$('#crop').ajaxForm(options);
</script>
<img src="logos/<?=$this->image?>" id="cropbox" />
<img src="/fichier/logo/<?=$this->image?>" id="cropbox" />
<br/>
<form id="crop" name="crop"
action="<?=$this->url(array('controller'=>'logo', 'action'=>'crop'),null, true);?>" method="post">

View File

@ -4,7 +4,7 @@
<?php if ($this->image):?>
<img src="/fichier/logo/<?=$this->image?>"/>
<br/>
<a id="logo_crop" href="<?=$this->url(array('controller'=>'logo', 'action'=>'crop', 'file'=>$this->image), null, true)?>">
<a id="logo_crop" href="<?=$this->url(array('controller'=>'logo', 'action'=>'crop', 'image'=>$this->image), null, true)?>">
Editer l'image</a>
<?php else:?>
Erreur