diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-01-09 01:17:04 +0100 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-01-09 20:38:06 +0100 |
commit | 978a08ab1c5e425210e8128e6d8efa432d593571 (patch) | |
tree | e2a43b5d7e31c36fce09a1c72312ecc677f1c0b3 /apps/contacts/templates | |
parent | 604ca61d78881e3a1a0a41e4b50ef4cb7c1eeaf0 (diff) | |
download | nextcloud-server-978a08ab1c5e425210e8128e6d8efa432d593571.tar.gz nextcloud-server-978a08ab1c5e425210e8128e6d8efa432d593571.zip |
Fixed Phone types not being saved correctly when adding them.
Diffstat (limited to 'apps/contacts/templates')
-rw-r--r-- | apps/contacts/templates/part.property.php | 5 | ||||
-rw-r--r-- | apps/contacts/templates/part.setpropertyform.php | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/apps/contacts/templates/part.property.php b/apps/contacts/templates/part.property.php index d930a9ca99d..e4010397500 100644 --- a/apps/contacts/templates/part.property.php +++ b/apps/contacts/templates/part.property.php @@ -25,15 +25,14 @@ <?php echo $_['property']['value']; ?> <?php if(isset($_['property']['parameters']['TYPE']) && !empty($_['property']['parameters']['TYPE'])): ?> <?php - $types = array(); - foreach($_['property']['parameters']['TYPE'] as $type): + foreach($_['property']['parameters']['TYPE'] as $type) { if (isset($_['phone_types'][strtoupper($type)])){ $types[]=$_['phone_types'][strtoupper($type)]; } else{ $types[]=$l->t(ucwords(strtolower($type))); } - endforeach; + } $label = join(' ', $types); ?> (<?php echo $label; ?>) diff --git a/apps/contacts/templates/part.setpropertyform.php b/apps/contacts/templates/part.setpropertyform.php index 8635d7db1ce..3e0b8d49b52 100644 --- a/apps/contacts/templates/part.setpropertyform.php +++ b/apps/contacts/templates/part.setpropertyform.php @@ -45,7 +45,7 @@ <p class="contacts_property_name"><label for="tel"><?php echo $l->t('Phone'); ?></label></p> <p class="contacts_property_data"><input id="tel" type="phone" name="value" value="<?php echo $_['property']['value'] ?>"> <select id="tel_type<?php echo $_['property']['checksum'] ?>" name="parameters[TYPE][]" multiple="multiple" data-placeholder="<?php echo $l->t('Type') ?>"> - <?php echo html_select_options($_['phone_types'], isset($_['property']['parameters']['TYPE'])?$_['property']['parameters']['TYPE']:'') ?> + <?php echo html_select_options($_['phone_types'], isset($_['property']['parameters']['TYPE'])?$_['property']['parameters']['TYPE']:array()) ?> </select></p> <?php elseif($_['property']['name']=='EMAIL'): ?> <p class="contacts_property_name"><label for="email"><?php echo $l->t('Email'); ?></label></p> |