]> source.dussan.org Git - nextcloud-server.git/commitdiff
Idiot proof dialog ;-)
authorThomas Tanghus <thomas@tanghus.net>
Mon, 25 Jun 2012 17:33:51 +0000 (19:33 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Mon, 25 Jun 2012 17:33:51 +0000 (19:33 +0200)
apps/contacts/js/contacts.js
apps/contacts/templates/part.selectaddressbook.php

index 2a37a7ff9e480515ba15000778fdcdd1beed97c3..a87f7ca10d6aa111ae45f781d1f2d7035b7958de 100644 (file)
@@ -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'); }
index 38b8a4b767edd79fe9a92789d5d13af0a64dc7dd..4b152a6e1d344ee24ee7a826dac215daee63977b 100644 (file)
@@ -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>