mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-28 16:21:33 +01:00
Fix addressbook checkvalue for duplication, egw_getegw_json_getFormValues is depricated
This commit is contained in:
parent
0fa870d53f
commit
4604d2b90f
@ -192,8 +192,7 @@ app.classes.addressbook = AppJS.extend(
|
|||||||
|
|
||||||
check_value: function(input, own_id)
|
check_value: function(input, own_id)
|
||||||
{
|
{
|
||||||
var values = egw_json_getFormValues(input.form).exec; // todo use eT2 method, if running under et2
|
if(typeof etemplate2 != 'undefined') {
|
||||||
if(typeof values == 'undefined' && typeof etemplate2 != 'undefined') {
|
|
||||||
var template = etemplate2.getByApplication('addressbook')[0];
|
var template = etemplate2.getByApplication('addressbook')[0];
|
||||||
values = template.getValues(template.widgetContainer);
|
values = template.getValues(template.widgetContainer);
|
||||||
}
|
}
|
||||||
@ -218,26 +217,19 @@ app.classes.addressbook = AppJS.extend(
|
|||||||
name.value = value;
|
name.value = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
egw.json('addressbook.addressbook_ui.ajax_check_values', [values, input.name, own_id]).sendRequest(true, function(data) {
|
var request = new egw_json_request ('addressbook.addressbook_ui.ajax_check_values', [values, input.name, own_id])
|
||||||
|
request.sendRequest(true, function(data) {
|
||||||
if (data.msg && confirm(data.msg))
|
if (data.msg && confirm(data.msg))
|
||||||
{
|
{
|
||||||
for(var id in data.doublicates)
|
for(var id in data.doublicates)
|
||||||
{
|
{
|
||||||
egw.open(id, 'addressbook');
|
egw.open(id, 'addressbook');
|
||||||
//opener.egw_openWindowCentered2(egw_webserverUrl+'/index.php?menuaction=addressbook.addressbook_ui.edit&contact_id='+id, '_blank', 870, 480, 'yes', 'addressbook');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (typeof data.fileas_options == 'object')
|
if (typeof data.fileas_options == 'object')
|
||||||
{
|
{
|
||||||
var selbox = document.getElementById("exec[fileas_type]");
|
var selbox = {};
|
||||||
if (selbox)
|
(template && (selbox = template.widgetContainer.getWidgetById('fileas_type')))
|
||||||
{
|
|
||||||
for (var i=0; i < data.fileas_options.length; i++)
|
|
||||||
{
|
|
||||||
selbox.options[i].text = data.fileas_options[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (template && (selbox = template.widgetContainer.getWidgetById('fileas_type')))
|
|
||||||
{
|
{
|
||||||
selbox.set_select_options(data.fileas_sel_options);
|
selbox.set_select_options(data.fileas_sel_options);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user