]> git.sur5r.net Git - contagged/blobdiff - templates/entry_edit.tpl
Make homephone multivalue aware
[contagged] / templates / entry_edit.tpl
index ddad5dc60c7e868f2d25d932c2885f74effd1d09..043f531cc5d068d8ad801f61b323a9414a9a1bae 100644 (file)
           <td><textarea name="entry[homestreet]" class="input" rows="2" cols="30">{$entry.homestreet|h}</textarea></td>
         </tr>
 {/if}
-{if $fields.homephone}
+{if $fields._homephone}
+        {foreach from=$entry.homephone|smarty:nodefaults item=homephone}
         <tr>
-          <th>{$lang.homephone}:</th>
-          <td><input type="text" class="input" name="entry[homephone]" value="{$entry.homephone|h}" /></td>
+          <th>{$lang.homephone} {counter name=homephone}:</th>
+          <td><input type="text" class="input" name="entry[homephone][]" value="{$homephone|h}" /></td>
+        </tr>
+        {/foreach}
+        <tr>
+          <th>{$lang.homephone} {counter name=homephone}:</th>
+          <td><input type="text" class="input" name="entry[homephone][]" value="" /></td>
         </tr>
 {/if}
 {if $fields.mobile}
 {if $fields._mail}
         {foreach from=$entry.mail|smarty:nodefaults item=mail}
         <tr>
-          <th>{$lang.mail} {counter}:</th>
+          <th>{$lang.mail} {counter name=mail}:</th>
           <td><input type="text" class="input" name="entry[mail][]" value="{$mail}" /></td>
         </tr>
         {/foreach}
         <tr>
-          <th>{$lang.mail} {counter}:</th>
+          <th>{$lang.mail} {counter name=mail}:</th>
           <td><input type="text" class="input" name="entry[mail][]" value="" /></td>
         </tr>
         <tr>
-          <th>{$lang.mail} {counter}:</th>
+          <th>{$lang.mail} {counter name=mail}:</th>
           <td><input type="text" class="input" name="entry[mail][]" value="" /></td>
         </tr>
 {/if}