Add compatibility to Smarty 3
[ldapsaisie.git] / public_html / templates / default / LSform.tpl
1 <form action='{$LSform_action}' method='post' enctype="multipart/form-data" class='LSform'>
2 {$LSform_header}
3 {if $LSform_layout}
4   <!-- Tabs - Start Title -->
5   <ul class='LSform_layout'>
6   {foreach from=$LSform_layout item=tab key=tab_key}
7     <li class='LSform_layout' id='LSform_layout_btn_{$tab_key}'><a href="#{$tab_key}">{tr msg=$tab.label}</a></li>
8   {/foreach}
9   </ul>
10   <!-- Tabs - End Title -->
11
12   <!-- Tabs - Start Content -->
13   {foreach from=$LSform_layout item=tab key=tab_key}
14     <a name='{$tab_key}'></a>
15     <h2 class='LSform_layout'>{tr msg=$tab.label}</h2>
16     <div class='LSform LSform_layout' id='LSform_layout_div_{$tab_key}'>
17       {if $LSformElement_image!='' && $tab.img==1}
18       <div class='LSformElement_image{if $LSformElement_image_errors} LSformElement_image_errors{/if}'>
19         {if $LSformElement_image_actions!='' && !$LSformElement_image_errors}
20         <ul class='LSformElement_image_actions'>
21             <li><img src='{$LS_IMAGES_DIR}/zoom.png' class='LSformElement_image_actions LSformElement_image_action_zoom' id='LSformElement_image_action_zoom_{$LSformElement_image.id}' /></li>
22           {foreach from=$LSformElement_image_actions item=item}
23             <li><img src='{$LS_IMAGES_DIR}/{$item}.png' class='LSformElement_image_actions LSformElement_image_action_{$item}' id='LSformElement_image_action_{$item}_{$LSformElement_image.id}' /></li>
24           {/foreach}
25         </ul>
26         {/if}
27         <img src='{$LSformElement_image.img}' class='LSformElement_image LSsmoothbox' id='LSformElement_image_{$LSformElement_image.id}' />
28       </div>
29       {/if}
30       
31       <dl class='LSform'>
32         {foreach from=$tab.args item=arg}
33           {if $LSform_fields[$arg]}
34             <dt class='LSform{if $LSform_fields[$arg].errors != ''} LSform-errors{/if}'>{$LSform_fields[$arg].label}{if $LSform_fields[$arg].required} *{/if}{if $LSform_fields[$arg].help_info!=""} <img class='LStips' src="{$LS_IMAGES_DIR}/help.png" alt='?' title="{$LSform_fields[$arg].help_info}"/>{/if}</dt>
35             <dd class='LSform'>{$LSform_fields[$arg].html}{if $LSform_fields[$arg].add != ''} <span class='LSform-addfield'>+ Ajouter un champ</span>{/if}</dd>
36             {if $LSform_fields[$arg].errors != ''}
37               {foreach from=$LSform_fields[$arg].errors item=error}
38               <dd class='LSform LSform-errors'>{$error}</dd>
39               {/foreach}
40             {/if}
41           {/if}
42         {/foreach}
43         <dd class='LSform'><input type='submit' value='{$LSform_submittxt}' class='LSform' /></dd>
44       </dl>
45       
46     </div>
47   {/foreach}  
48   <!-- Tabs - End Content -->
49 {else}
50   {if $LSformElement_image!=''}
51     <div class='LSformElement_image{if $LSformElement_image_errors} LSformElement_image_errors{/if}'>
52       {if $LSformElement_image_actions!='' && !$LSformElement_image_errors}
53       <ul class='LSformElement_image_actions'>
54           <li><img src='{$LS_IMAGES_DIR}/zoom.png' class='LSformElement_image_actions LSformElement_image_action_zoom' id='LSformElement_image_action_zoom_{$LSformElement_image.id}' /></li>
55         {foreach from=$LSformElement_image_actions item=item}
56           <li><img src='{$LS_IMAGES_DIR}/{$item}.png' class='LSformElement_image_actions LSformElement_image_action_{$item}' id='LSformElement_image_action_{$item}_{$LSformElement_image.id}' /></li>
57         {/foreach}
58       </ul>
59       {/if}
60       <img src='{$LSformElement_image.img}' class='LSformElement_image LSsmoothbox' id='LSformElement_image_{$LSformElement_image.id}' />
61     </div>
62   {/if}
63   
64   <div class='LSform'>
65     <dl class='LSform'>
66       {foreach from=$LSform_fields item=field}
67       <dt class='LSform{if $field.errors != ''} LSform-errors{/if}'>{$field.label}{if $field.required} *{/if}{if $field.help_info!=""} <img class='LStips' src="{$LS_IMAGES_DIR}/help.png" alt='?' title="{$field.help_info}"/>{/if}</dt>
68       <dd class='LSform'>{$field.html}{if $field.add != ''} <span class='LSform-addfield'>+ Ajouter un champ</span>{/if}</dd>
69       {if $field.errors != ''}
70         {foreach from=$field.errors item=error}
71         <dd class='LSform LSform-errors'>{$error}</dd>
72         {/foreach}
73       {/if}
74       {/foreach}
75       <dd class='LSform'><input type='submit' value='{$LSform_submittxt}' class='LSform' /></dd>
76     </dl>
77   </div>
78   
79 {/if}
80 </form>