From a74c5033910cd42e1f8496d98deb5680078b1997 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 27 Oct 2008 10:41:34 +0000 Subject: [PATCH] - LSformElement_image : -> Adaptation pour l'utilisation des templates. --- trunk/includes/class/class.LSformElement_image.php | 3 ++- trunk/templates/default/LSformElement_image_field.tpl | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 trunk/templates/default/LSformElement_image_field.tpl diff --git a/trunk/includes/class/class.LSformElement_image.php b/trunk/includes/class/class.LSformElement_image.php index 37db55b3..ac3210bf 100644 --- a/trunk/includes/class/class.LSformElement_image.php +++ b/trunk/includes/class/class.LSformElement_image.php @@ -34,6 +34,7 @@ class LSformElement_image extends LSformElement { var $postImage = NULL; var $tmp_file = array(); + var $fieldTemplate = 'LSformElement_image_field.tpl'; /** * Retourne les infos d'affichage de l'élément @@ -48,7 +49,7 @@ class LSformElement_image extends LSformElement { if (!$this -> isFreeze()) { $id=$this -> name.'_'.rand(); $return = $this -> getLabelInfos(); - $return['html'] = "\n"; + $return['html'] = $this -> fetchTemplate(NULL,array('id' => 'LSformElement_image_input_'.$id)); $this -> form -> setMaxFileSize(MAX_SEND_FILE_SIZE); } diff --git a/trunk/templates/default/LSformElement_image_field.tpl b/trunk/templates/default/LSformElement_image_field.tpl new file mode 100644 index 00000000..5ce43646 --- /dev/null +++ b/trunk/templates/default/LSformElement_image_field.tpl @@ -0,0 +1,3 @@ +{if !$freeze} + +{/if}