diff options
Diffstat (limited to 'apps/contacts/templates/part.selectaddressbook.php')
-rw-r--r-- | apps/contacts/templates/part.selectaddressbook.php | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/apps/contacts/templates/part.selectaddressbook.php b/apps/contacts/templates/part.selectaddressbook.php index 4b152a6e1d3..812a3b891ff 100644 --- a/apps/contacts/templates/part.selectaddressbook.php +++ b/apps/contacts/templates/part.selectaddressbook.php @@ -1,16 +1,33 @@ <div id="selectaddressbook_dialog" title="<?php echo $l->t("Select Address Books"); ?>"> +<script type="text/javascript"> +$(document).ready(function() { + $('input.name,input.desc').on('focus', function(e) { + $('#book_new').prop('checked', true); + }); +}); +</script> <form> -<table> +<table style="width: 100%"> <?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> + <label for="book_<?php echo $addressbook['id']; ?>"><?php echo $addressbook['displayname']; ?></label> </td> + <td><?php echo $addressbook['description']; ?></td> </tr> <?php } ?> + <tr> + <td> + <input id="book_new" name="book" type="radio" value="new"> + </td> + <th> + <input type="text" class="name" name="displayname" placeholder="<?php echo $l->t("Enter name"); ?>" /> + </th> + <td><input type="text" class="desc" name="description" placeholder="<?php echo $l->t("Enter description"); ?>" /></td> + </tr> </table> </form> </div> |