- LSformElement_image :

-> Adaptation pour l'utilisation des templates.
This commit is contained in:
Benjamin Renard 2008-10-27 10:41:34 +00:00
parent 912a90f4fd
commit a74c503391
2 changed files with 5 additions and 1 deletions

View file

@ -34,6 +34,7 @@ class LSformElement_image extends LSformElement {
var $postImage = NULL; var $postImage = NULL;
var $tmp_file = array(); var $tmp_file = array();
var $fieldTemplate = 'LSformElement_image_field.tpl';
/** /**
* Retourne les infos d'affichage de l'élément * Retourne les infos d'affichage de l'élément
@ -48,7 +49,7 @@ class LSformElement_image extends LSformElement {
if (!$this -> isFreeze()) { if (!$this -> isFreeze()) {
$id=$this -> name.'_'.rand(); $id=$this -> name.'_'.rand();
$return = $this -> getLabelInfos(); $return = $this -> getLabelInfos();
$return['html'] = "<input type='file' name='".$this -> name."' class='LSform' id='LSformElement_image_input_$id' />\n"; $return['html'] = $this -> fetchTemplate(NULL,array('id' => 'LSformElement_image_input_'.$id));
$this -> form -> setMaxFileSize(MAX_SEND_FILE_SIZE); $this -> form -> setMaxFileSize(MAX_SEND_FILE_SIZE);
} }

View file

@ -0,0 +1,3 @@
{if !$freeze}
<input type='file' name='{$attr_name}' class='LSform' id='{$id}' />
{/if}