N°3430 - fix preference page's warning and add missing token generation

- fix the warning (ajax call interrupted) if preference form ajax call is way faster than the one of the 2 other by adding a new timeout_duration option before the redirect.
This commit is contained in:
bruno-ds
2021-02-18 12:18:38 +01:00
parent 83434b5506
commit e9e18513be
7 changed files with 32 additions and 17 deletions

View File

@@ -211,6 +211,7 @@ class UserProfileBrickController extends BrickController
{
$aFormData['validation']['redirection'] = array(
'url' => $oUrlGenerator->generate('p_user_profile_brick'),
'timeout_duration' => 1000, //since there are several ajax request, we use a longer timeout in hope that they will all be finished in time. A promise would have been more reliable, but since this change is made in a minor version, this approach is less error prone.
);
}
}