my_array_search('VOICE',(array) $tel['param']['TYPE']) != false))
{
// Work phone
- $entry['phone'] = $tel['value'][0][0];
+ $entry['phone'][] = $tel['value'][0][0];
}elseif(empty($entry['fax']) &&
my_array_search('FAX',(array) $tel['param']['TYPE']) !== false){
$entry['fax'] = $tel['value'][0][0];
'street' => 'postalAddress',
'zip' => 'postalCode',
'location' => 'l', // aka. city
- 'phone' => 'telephoneNumber',
+ '_phone' => 'telephoneNumber',
'fax' => 'facsimileTelephoneNumber',
'mobile' => 'mobile', // aka. cell phone
'pager' => 'pager',
</td>
</tr>
{/if}
-{if $fields.phone}
+{if $fields._phone}
+ {foreach from=$entry.phone|smarty:nodefaults item=phone}
<tr>
- <th>{$lang.phone}:</th>
- <td><input type="text" class="input" name="entry[phone]" value="{$entry.phone|h}" /></td>
+ <th>{$lang.phone} {counter name=phone}:</th>
+ <td><input type="test" class="input" name="entry[phone][]" value="{$phone|h}" /></td>
+ </tr>
+ {/foreach}
+ <tr>
+ <th>{$lang.phone} {counter name=phone}:</th>
+ <td><input type="text" class="input" name="entry[phone][]" value="" /></td>
</tr>
{/if}
{if $fields.switchboard}
{if $entry.phone}
<tr>
<th>{$lang.phone}:</th>
- <td><a href="callto://{$entry.phone|escape:phone}">{$entry.phone|h}</a></td>
+ <td>
+ {foreach from=$entry.phone item=phone}
+ <a href="callto://{$phone|escape:phone}">{$phone|h}</a><br />
+ {/foreach}
+ </td>
</tr>
{/if}
{if $entry.switchboard}
FN:{$entry.givenname} {$entry.name}
ORG;ENCODING=QUOTED-PRINTABLE:{$entry.organisation|escape:qp};{$entry.office|escape:qp}
NOTE;ENCODING=QUOTED-PRINTABLE:{$entry.note|escape:qp}
-TEL;WORK;VOICE;ENCODING=QUOTED-PRINTABLE:{$entry.phone|escape:qp}
+{foreach from=$entry.phone item=phone}
+TEL;WORK;VOICE;ENCODING=QUOTED-PRINTABLE:{$phone|escape:qp}
+{/foreach}
{foreach from=$entry.homephone item=homephone}
TEL;HOME;VOICE;ENCODING=QUOTED-PRINTABLE:{$homephone|escape:qp}
{/foreach}
<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}" />
-{$entry.name|csv};{$entry.givenname|csv};{$entry.title|csv};{$entry.organization|csv};{$entry.office|csv};{$entry.street|csv};{$entry.zip|csv};{$entry.location|csv};{$entry.country|csv};{$entry.phone|csv};{$entry.fax|csv};{$entry.pager|csv};{$entry.homestreet|csv};{$entry.homephone[0]|csv};{$entry.mobile|csv};{$lang.url|csv};{$entry.note|csv};{$entry.mail[0]|csv};{$entry.mail[1]|csv};{$entry.mail[2]|csv};{$entry.markers|csv}
+{$entry.name|csv};{$entry.givenname|csv};{$entry.title|csv};{$entry.organization|csv};{$entry.office|csv};{$entry.street|csv};{$entry.zip|csv};{$entry.location|csv};{$entry.country|csv};{$entry.phone[0]|csv};{$entry.fax|csv};{$entry.pager|csv};{$entry.homestreet|csv};{$entry.homephone[0]|csv};{$entry.mobile|csv};{$lang.url|csv};{$entry.note|csv};{$entry.mail[0]|csv};{$entry.mail[1]|csv};{$entry.mail[2]|csv};{$entry.markers|csv}
<a href="index.php?org={$entry.organization|escape:url}">{$entry.organization|h}</a>
</td>
<td>
- <a href="callto://{$entry.phone|escape:phone}">{$entry.phone|h}</a>
+ <a href="callto://{$entry.phone[0]|escape:phone}">{$entry.phone[0]|h}</a>
</td>
<td>
<a href="mailto:{$entry.mail[0]|h}">{$entry.mail[0]|h}</a>