mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 09:28:29 +01:00
Check contact duplication of addressbooks with presets
-Fix addressbook contacts added by add contact plus do not get checked for duplication -Fix another CSP error
This commit is contained in:
parent
bde32aaeeb
commit
639a1b6c03
@ -1717,6 +1717,11 @@ window.egw_LAB.wait(function() {
|
|||||||
{
|
{
|
||||||
case 'save':
|
case 'save':
|
||||||
case 'apply':
|
case 'apply':
|
||||||
|
if ($content['presets_fields'])
|
||||||
|
{
|
||||||
|
// unset the duplicate_filed after submit because we don't need to warn user for second time about contact duplication
|
||||||
|
unset($content['presets_fields']);
|
||||||
|
}
|
||||||
if ($content['delete_photo'])
|
if ($content['delete_photo'])
|
||||||
{
|
{
|
||||||
$content['jpegphoto'] = null;
|
$content['jpegphoto'] = null;
|
||||||
@ -1985,7 +1990,9 @@ window.egw_LAB.wait(function() {
|
|||||||
{
|
{
|
||||||
if (!empty($content[$field]))
|
if (!empty($content[$field]))
|
||||||
{
|
{
|
||||||
egw_framework::set_onload("app.addressbook.check_value(document.getElementById('exec[$field]'),0);");
|
//Set the presets fields in content in order to be able to use them later in client side for checking duplication only on first time load
|
||||||
|
// after save/apply we unset them
|
||||||
|
$content['presets_fields'][]= $field;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,6 +66,14 @@ app.classes.addressbook = AppJS.extend(
|
|||||||
window.app.infolog = new window.app.classes.infolog();
|
window.app.infolog = new window.app.classes.infolog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Call check value if the AB got opened with presets
|
||||||
|
if (window.location.href.match(/&presets\[email\]/g) && content.presets_fields)
|
||||||
|
{
|
||||||
|
for(var i=0;i< content.presets_fields.length;i++)
|
||||||
|
{
|
||||||
|
this.check_value(this.et2.getWidgetById(content.presets_fields),0);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user