show saved values in options
This commit is contained in:
parent
0199f585df
commit
8781703a69
1 changed files with 13 additions and 4 deletions
17
setup.php
17
setup.php
|
@ -83,46 +83,55 @@ function abook_carddav_optpage() {
|
||||||
global $optpage_data;
|
global $optpage_data;
|
||||||
global $username, $data_dir;
|
global $username, $data_dir;
|
||||||
|
|
||||||
|
$abook_uri = getPref($data_dir, $username, 'plugin_abook_carddav_abook_uri');
|
||||||
|
$abook_base_uri = getPref($data_dir, $username, 'plugin_abook_carddav_base_uri');
|
||||||
|
$abook_username = getPref($data_dir, $username, 'plugin_abook_carddav_username');
|
||||||
|
$abook_password = getPref($data_dir, $username, 'plugin_abook_carddav_password');
|
||||||
|
$abook_writeable = getPref($data_dir, $username, 'plugin_abook_carddav_writeable');
|
||||||
|
$abook_listing = getPref($data_dir, $username, 'plugin_abook_carddav_listing');
|
||||||
sq_change_text_domain('abook_carddav');
|
sq_change_text_domain('abook_carddav');
|
||||||
$optpage_data['grps']['abook_carddav'] = _("CardDAV Address Book");
|
$optpage_data['grps']['abook_carddav'] = _("CardDAV Address Book");
|
||||||
$optpage_data['vals']['abook_carddav'][] = array(
|
$optpage_data['vals']['abook_carddav'][] = array(
|
||||||
'name' => 'plugin_abook_carddav_abook_uri',
|
'name' => 'plugin_abook_carddav_abook_uri',
|
||||||
'caption' => _("URI of addressbook"),
|
'caption' => _("URI of addressbook"),
|
||||||
'type' => SMOPT_TYPE_STRING,
|
'type' => SMOPT_TYPE_STRING,
|
||||||
// 'initial_value' => $abook_uri,
|
'initial_value' => $abook_uri,
|
||||||
);
|
);
|
||||||
$optpage_data['vals']['abook_carddav'][] = array(
|
$optpage_data['vals']['abook_carddav'][] = array(
|
||||||
'name' => 'plugin_abook_carddav_base_uri',
|
'name' => 'plugin_abook_carddav_base_uri',
|
||||||
'caption' => _("base URI"),
|
'caption' => _("base URI"),
|
||||||
'type' => SMOPT_TYPE_STRING,
|
'type' => SMOPT_TYPE_STRING,
|
||||||
// 'initial_value' => $abook_uri,
|
'initial_value' => $abook_base_uri,
|
||||||
);
|
);
|
||||||
$optpage_data['vals']['abook_carddav'][] = array(
|
$optpage_data['vals']['abook_carddav'][] = array(
|
||||||
'name' => 'plugin_abook_carddav_dicsover_link',
|
'name' => 'plugin_abook_carddav_dicsover_link',
|
||||||
'caption' => _("Discover"),
|
'caption' => _("Discover"),
|
||||||
'type' => SMOPT_TYPE_COMMENT,
|
'type' => SMOPT_TYPE_COMMENT,
|
||||||
'comment' => _("Use <a href=\"...\">discover</a> page to get these values"),
|
'comment' => _("Use <a href=\"...\">discover</a> page to get these values"),
|
||||||
// 'initial_value' => $abook_uri,
|
|
||||||
);
|
);
|
||||||
$optpage_data['vals']['abook_carddav'][] = array(
|
$optpage_data['vals']['abook_carddav'][] = array(
|
||||||
'name' => 'plugin_abook_carddav_username',
|
'name' => 'plugin_abook_carddav_username',
|
||||||
'caption' => _("Username"),
|
'caption' => _("Username"),
|
||||||
'type' => SMOPT_TYPE_STRING,
|
'type' => SMOPT_TYPE_STRING,
|
||||||
|
'initial_value' => $abook_username,
|
||||||
);
|
);
|
||||||
$optpage_data['vals']['abook_carddav'][] = array(
|
$optpage_data['vals']['abook_carddav'][] = array(
|
||||||
'name' => 'plugin_abook_carddav_password',
|
'name' => 'plugin_abook_carddav_password',
|
||||||
'caption' => _("Password"),
|
'caption' => _("Password"),
|
||||||
'type' => SMOPT_TYPE_STRING,
|
'type' => SMOPT_TYPE_STRING,
|
||||||
|
'initial_value' => $abook_password,
|
||||||
);
|
);
|
||||||
$optpage_data['vals']['abook_carddav'][] = array(
|
$optpage_data['vals']['abook_carddav'][] = array(
|
||||||
'name' => 'plugin_abook_carddav_writeable',
|
'name' => 'plugin_abook_carddav_writeable',
|
||||||
'caption' => _("Writeable (nickname field shows part of vcard URI)"),
|
'caption' => _("Writeable (nickname field reserved for vcard URI)"),
|
||||||
'type' => SMOPT_TYPE_BOOLEAN,
|
'type' => SMOPT_TYPE_BOOLEAN,
|
||||||
|
'initial_value' => $abook_writeable,
|
||||||
);
|
);
|
||||||
$optpage_data['vals']['abook_carddav'][] = array(
|
$optpage_data['vals']['abook_carddav'][] = array(
|
||||||
'name' => 'plugin_abook_carddav_listing',
|
'name' => 'plugin_abook_carddav_listing',
|
||||||
'caption' => _("Listing allowed (otherwise, only addressbook search is useful)"),
|
'caption' => _("Listing allowed (otherwise, only addressbook search is useful)"),
|
||||||
'type' => SMOPT_TYPE_BOOLEAN,
|
'type' => SMOPT_TYPE_BOOLEAN,
|
||||||
|
'initial_value' => $abook_listing,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue