]> git.sur5r.net Git - contagged/blobdiff - templates/import_entry.tpl
Make phone multivalue aware
[contagged] / templates / import_entry.tpl
index 28ef22eaa02c3a21b14e3c90333764799ee877d9..be96fd2935593e8a56db471728e26447358fffd5 100644 (file)
         <input type="hidden" name="entry[location]" value="{$entry.location|h}" />
         <input type="hidden" name="entry[country]" value="{$entry.country|h}" />
         <input type="hidden" name="entry[state]" value="{$entry.state|h}" />
-        <input type="hidden" name="entry[phone]" value="{$entry.phone|h}" />
+        {foreach from=$entry.phone item=phone}
+        <input type="hidden" name="entry[phone][]" value="{$phone|h}" />
+        {/foreach}
         <input type="hidden" name="entry[fax]" value="{$entry.fax|h}" />
         <input type="hidden" name="entry[pager]" value="{$entry.pager|h}" />
         <input type="hidden" name="entry[homestreet]" value="{$entry.homestreet|h}" />
-        <input type="hidden" name="entry[homephone]" value="{$entry.homephone|h}" />
+        {foreach from=$entry.homephone item=homephone}
+        <input type="hidden" name="entry[homephone][]" value="{$homephone|h}" />
+        {/foreach}
         <input type="hidden" name="entry[mobile]" value="{$entry.mobile|h}" />
         <input type="hidden" name="entry[url]" value="{$entry.url|h}" />
+        <input type="hidden" name="photo" value="{$entry.photo|h}" />
         {foreach from=$entry.mail item=mail}
         <input type="hidden" name="entry[mail][]" value="{$mail|h}" />
         {/foreach}
         <input type="hidden" name="entry[note]" value="{$entry.note|h}" />
         <input type="hidden" name="entry[birthday]" value="{$entry.birthday|h}" />
+       {if $conf.privatebook}
         <button name="type" value="public" class="button">
             <img src="pix/public.png" border="0" width="16" height="16" align="middle" alt="" />{$lang.publicbook}
         </button>
         <button name="type" value="private" class="button">
             <img src="pix/private.png" border="0" width="16" height="16" align="middle" alt="" />{$lang.privatebook}
         </button>
+       {else}
+           <input type="hidden" name="type" value="public" />
+       {/if}
+           <input type="submit" name="save" value="save" />
         </form>
     </td>
 </tr>