diff --git a/addressbook/inc/functions.inc.php b/addressbook/inc/functions.inc.php
index d0428ddbb6..43e8d85941 100755
--- a/addressbook/inc/functions.inc.php
+++ b/addressbook/inc/functions.inc.php
@@ -276,12 +276,12 @@
return $ab_id;
}
- function addressbook_update_entry($id,$userid,$fields,$access,$cat_id,$tid)
+ function addressbook_update_entry($id,$userid,$fields,$access,$cat_id)
{
global $this,$rights;
if ($rights & PHPGW_ACL_EDIT)
{
- $this->update($id,$userid,$fields,$access,$cat_id,$tid);
+ $this->update($id,$userid,$fields,$access,$cat_id);
}
return;
}
@@ -289,13 +289,16 @@
// Folowing used for add/edit
function addressbook_form($format,$action,$title="",$fields="",$customfields="",$cat_id="")
{
- global $phpgw, $phpgw_info,$referer;
+ global $phpgw,$phpgw_info,$referer;
$t = new Template(PHPGW_APP_TPL);
$t->set_file(array('form' => 'form.tpl'));
//$t->set_block('form','add','add');
//$t->set_block('form','edit','edit');
+ $phpgw->config->read_repository();
+ $countrylist = $phpgw->config->config_data['countrylist'];
+
$email = $fields['email'];
$emailtype = $fields['email_type'];
$hemail = $fields['email_home'];
@@ -610,6 +613,14 @@
$t->set_var('bzip',$bzip);
$t->set_var('lang_bcountry',lang('Business Country'));
$t->set_var('bcountry',$bcountry);
+ if ($countrylist)
+ {
+ $t->set_var('bcountry',$phpgw->country->form_select($bcountry,'bcountry'));
+ }
+ else
+ {
+ $t->set_var('bcountry','');
+ }
$t->set_var('lang_badrtype',lang('Address Type'));
$t->set_var('badrtype',$badrtype);
@@ -628,7 +639,14 @@
$t->set_var('lang_hzip',lang('Home Zip Code'));
$t->set_var('hzip',$hzip);
$t->set_var('lang_hcountry',lang('Home Country'));
- $t->set_var('hcountry',$hcountry);
+ if ($countrylist)
+ {
+ $t->set_var('hcountry',$phpgw->country->form_select($hcountry,'hcountry'));
+ }
+ else
+ {
+ $t->set_var('hcountry','');
+ }
$t->set_var('lang_hadrtype',lang('Address Type'));
$t->set_var('hadrtype',$hadrtype);
diff --git a/addressbook/templates/default/edit.tpl b/addressbook/templates/default/edit.tpl
index afca552665..23cdb15adc 100644
--- a/addressbook/templates/default/edit.tpl
+++ b/addressbook/templates/default/edit.tpl
@@ -3,8 +3,6 @@
-
-
@@ -18,8 +16,6 @@
{cancel_link}
-
-
@@ -30,8 +26,6 @@
-
-