]> git.sur5r.net Git - contagged/commitdiff
support multiple URLs
authorChristian Weiske <cweiske@cweiske.de>
Thu, 3 Oct 2013 18:12:56 +0000 (20:12 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 3 Oct 2013 18:12:56 +0000 (20:12 +0200)
inc/fields.php
templates/entry_edit.tpl
templates/entry_show.tpl

index 25e05085be232fc0d4e70e03a7b528438ad54ab4..0c236be696a51d1d33b7c4cf5938f15719736cc2 100644 (file)
@@ -38,7 +38,7 @@ $FIELDS = array(
     'homephone'    => 'homePhone',
     'homestreet'   => 'homePostalAddress',
     'photo'        => 'jpegPhoto',
-    'url'          => 'labeledURI',
+    '_url'         => 'labeledURI',
     'note'         => 'description',
     'manager'      => 'manager',                     // aka. key account
     '_mail'        => 'mail',
index ddad5dc60c7e868f2d25d932c2885f74effd1d09..b8f3ff81dbb7e3fe4c53fd806915404329413858 100644 (file)
         <tr>
           <td colspan="2"><h3>{$lang.communication}</h3></td>
         </tr>
-{if $fields.url}
+{if $fields._url}
+        {foreach from=$entry.url|smarty:nodefaults item=url}
         <tr>
-          <th>{$lang.url}:</th>
-          <td><input type="text" class="input" name="entry[url]" value="{$entry.url|h}" /></td>
+          <th>{$lang.url} {counter}:</th>
+          <td><input type="text" class="input" name="entry[url][]" value="{$url|h}" /></td>
+        </tr>
+        {/foreach}
+        <tr>
+          <th>{$lang.url} {counter}:</th>
+          <td><input type="text" class="input" name="entry[url][]" value="" /></td>
         </tr>
 {/if}
 {if $fields._mail}
+        {counter start=0}
         {foreach from=$entry.mail|smarty:nodefaults item=mail}
         <tr>
           <th>{$lang.mail} {counter}:</th>
index b10b45f4c1eb49f6a69fcd6f12020ccd315593e2..4960893f7e413389ef422c68a85acc0e76cddd71 100644 (file)
 {if $entry.url}
           <tr>
             <th>{$lang.url}:</th>
-            <td>{$entry.url|http}</td>
+            <td>
+              {foreach from=$entry.url item=url}
+                {$url|http}<br/>
+              {/foreach}
+            </td>
           </tr>
 {/if}
 {if $entry.mail}