This commit is contained in:
Michael RICOIS 2012-07-31 15:15:29 +00:00
parent 136f9623be
commit b9cad4af3f

View File

@ -91,10 +91,59 @@ class Zend_View_Helper_Field extends Zend_View_Helper_Abstract
$this->checkboxHTML($name, $options),
$title
);
break;
case 'intervalDate':
$html.= $this->structureHTML(
$label,
$this->intervalDateHTML($name, $options),
$title
);
break;
case 'interval':
$html.= $this->structureHTML(
$label,
$this->intervalHTML($name, $field),
$title
);
break;
case 'date':
$html.= $this->structureHTML(
$field['label'],
$this->dateHTML($name, $field));
break;
case 'text':
$html.= $this->structureHTML(
$label,
$this->textHTML($name, $options),
$title
);
break;
case 'textarea':
$html.= $this->structureHTML(
$field['label'],
$this->textareaHTML($name, $field)
);
break;
case 'radio':
$html.= $this->structureHTML(
$field['label'],
$this->radioHTML($name, $field));
break;
case 'file':
$html.= $this->structureHTML(
$field['label'],
$this->fileuploadHtml($name, $field));
break;
case 'tree':
//Do nothing
break;
case 'list':
$html.= $this->structureHTML(
$label,
$this->textareaHTML($name, $options),
$title
);
break;
default:
$html.= $this->structureHTML($name, '');
break;
@ -334,32 +383,8 @@ class Zend_View_Helper_Field extends Zend_View_Helper_Abstract
}
/* Textes */
private function textHTML($name, $options)
protected function textHTML($name, $options)
{
$session = new Scores_Fields();
switch($name) {
case 'ape_entrep':
case 'ape_etab':
$type = 'Naf';
break;
case 'vil':
$type= 'Vil';
break;
case 'adr_com':
case 'adr_com_ex':
$type= $name;
break;
case 'cj':
$type = 'Cj';
break;
case 'cj_ex':
$type = 'Cj_ex';
break;
case 'adr_dept':
case 'adr_dept_ex':
$type= $name;
break;
}
$return = '<input type="text" class="criteres autocomplete" name="'.$name.'" />';
$return.= '<ul id="selectqueries"></ul>';
$return.= '<a href="#" class="autocomplete">Sélectionner</a>';
@ -368,14 +393,12 @@ class Zend_View_Helper_Field extends Zend_View_Helper_Abstract
}
/* Textarea */
private function textareaHTML($name, $field)
protected function textareaHTML($name, $field)
{
$return = '<a class="arborescence" title="'.$field['title'].'" href="'.$this->view->url(array('controller' => 'arborescence', 'action' => $field['action'], 'key' => $name)).'">
<img src="/themes/default/images/arborescence.gif" />
</a> <img style="cursor:pointer" class="manuel" ref="'.$name.'" src="/themes/default/images/Textarea.gif" title="Champs texte"/>';
if($name == 'adr_com')
$return .= ' <img src="/themes/default/images/img_carte_fr.gif" title="Carte de france"/>';
return ($return);
$return = '<textarea class="criteres" name="'.$name.'" ></textarea>';
$return.= '<a href="#" class="list">Sélectionner</a>';
$return.= '&nbsp;<a href="#" class="listEx">Exclure</a>';
return $return;
}
private function fileuploadHtml($name, $field)