Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-06-25 21:33:51 +0400
committerThomas Tanghus <thomas@tanghus.net>2012-06-25 21:33:51 +0400
commit2ad93849ab72ee60ab0605aee043590dd1e24bec (patch)
tree63b9c3acee54a484317ae44b386912ae3f000c50
parentad5aa5ac15e3df759a7044c6e9ecfd6282c2298a (diff)
Idiot proof dialog ;-)
-rw-r--r--apps/contacts/js/contacts.js2
-rw-r--r--apps/contacts/templates/part.selectaddressbook.php15
2 files changed, 12 insertions, 5 deletions
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js
index 2a37a7ff9e4..a87f7ca10d6 100644
--- a/apps/contacts/js/contacts.js
+++ b/apps/contacts/js/contacts.js
@@ -302,7 +302,7 @@ Contacts={
modal: true, height: 'auto', width: 'auto',
buttons: {
'Ok':function() {
- Contacts.UI.Card.add(';;;;;', '',$('#selectaddressbook_dialog').find('select').val(), true);
+ Contacts.UI.Card.add(';;;;;', '',$('#selectaddressbook_dialog').find('input:checked').val(), true);
$(this).dialog('close');
},
'Cancel':function() { $(this).dialog('close'); }
diff --git a/apps/contacts/templates/part.selectaddressbook.php b/apps/contacts/templates/part.selectaddressbook.php
index 38b8a4b767e..4b152a6e1d3 100644
--- a/apps/contacts/templates/part.selectaddressbook.php
+++ b/apps/contacts/templates/part.selectaddressbook.php
@@ -1,10 +1,17 @@
<div id="selectaddressbook_dialog" title="<?php echo $l->t("Select Address Books"); ?>">
<form>
-<select id="adr_type" name="parameters[ADR][TYPE]" size="1">
- <?php foreach($_['addressbooks'] as $addressbook) { ?>
- <option value="<?php echo $addressbook['id']; ?>"><?php echo $addressbook['name']; ?></option>
+<table>
+ <?php foreach($_['addressbooks'] as $idx => $addressbook) { ?>
+ <tr>
+ <td>
+ <input id="book_<?php echo $addressbook['id']; ?>" name="book" type="radio" value="<?php echo $addressbook['id']; ?>" <?php echo ($idx==0?'checked="checked"':'')?>>
+ </td>
+ <td>
+ <label for="book_<?php echo $addressbook['id']; ?>"><?php echo $addressbook['name']; ?></label>
+ </td>
+ </tr>
<?php } ?>
-</select>
+</table>
</form>
</div>