2011-12-16 15:36:34 +00:00

32 lines
963 B
PHP

<?php
Class Zend_View_Helper_Textarea extends Zend_View_Helper_Abstract
{
public function printHistorique($val)
{
if(is_array($val)) {
return (implode(',', $val));
}
return ($val);
}
public function Textarea($name, $libelle)
{
$session = new Zend_Session_Namespace('ciblage');
$val = $session->ciblage[$name];
$champ = '<div>';
$champ .= '<div style="float:left;text-align:left;">
<label>'.$libelle.'</label>
</div>';
$champ .= '<div style="text-align:right;">
<textarea style="border:1px inset silver;width:60%;height:40px;" name="'.$name.'">'.((!empty($val))?$this->printHistorique($val):'Code séparé par des virgules...').'</textarea>
<br /><a class="interval" id="'.$name.'" href=""><img width="10%" src="/themes/default/images/valider.png" /></a>
</div>';
$champ .= '<div style="margin-top:5px;margin-bottom:5px">
<hr />
</div>';
$champ .= '</div>';
return ($champ);
}
}