N°3923 Fix date picker widget not initialized in ajax forms

This commit is contained in:
Stephen Abello
2021-05-26 10:21:30 +02:00
committed by Eric
parent 2a71a3f153
commit 471ec86c82
2 changed files with 2 additions and 10 deletions

View File

@@ -179,17 +179,7 @@ class AjaxPage extends WebPage implements iTabbedPage
ConsoleBlockRenderer::AddCssJsToPage($this, $this->oContentLayout);
// Render the blocks
// Additional UI widgets to be activated inside the ajax fragment
// Important: Testing the content type is not enough because some ajax handlers have not correctly positionned the flag (e.g json response corrupted by the script)
// TODO 3.0.0 à revoir
if (($this->sContentType == 'text/html') && (preg_match('/class="date-pick"/', $this->s_content) || preg_match('/class="datetime-pick"/', $this->s_content))) {
$this->add_ready_script(
<<<EOF
PrepareWidgets();
EOF
);
}
$this->outputCollapsibleSectionInit();
$aData = [];