summaryrefslogtreecommitdiff
path: root/plugins/kolab_addressbook/kolab_addressbook.php
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-11-21 16:47:51 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-11-21 16:47:51 +0000
commitc1bccb67c48ffb82e3e836a8f10e8c0dfb7430bc (patch)
treeb0d9bf8117baf3ebb53e3fab4ef6936ecb1841e7 /plugins/kolab_addressbook/kolab_addressbook.php
parent9f64e4feacdc8cbbe2dd6711c946cb173c1f8a93 (diff)
Map more fields of the Kolab contact format (still read-only)
git-svn-id: https://svn.roundcube.net/trunk@4244 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/kolab_addressbook/kolab_addressbook.php')
-rw-r--r--plugins/kolab_addressbook/kolab_addressbook.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/plugins/kolab_addressbook/kolab_addressbook.php b/plugins/kolab_addressbook/kolab_addressbook.php
index 27f30cb12..4c5a84e5f 100644
--- a/plugins/kolab_addressbook/kolab_addressbook.php
+++ b/plugins/kolab_addressbook/kolab_addressbook.php
@@ -29,6 +29,7 @@ class kolab_addressbook extends rcube_plugin
$this->add_hook('addressbooks_list', array($this, 'address_sources'));
$this->add_hook('addressbook_get', array($this, 'get_address_book'));
+ $this->add_hook('contact_form', array($this, 'contact_form'));
// extend include path to load bundled Horde classes
$include_path = $this->home . '/lib' . PATH_SEPARATOR . ini_get('include_path');
@@ -112,5 +113,24 @@ class kolab_addressbook extends rcube_plugin
return $this->sources;
}
+
+
+ /**
+ * Plugin hook called before rendering the contact form or detail view
+ */
+ public function contact_form($p)
+ {
+ // extend the list of contact fields to be displayed in the 'info' section
+ if (is_array($p['form']['info'])) {
+ $p['form']['info']['content']['initials'] = array('size' => 6);
+ $p['form']['info']['content']['anniversary'] = array('size' => 12, 'render_func' => 'rcmail_format_date_col');
+
+ // TODO: add more Kolab-specific fields
+
+ // TODO: re-order fields
+ }
+
+ return $p;
+ }
}