');
}
}
final protected function AddForceUninstallFlagOption(WebPage $oPage): void
{
$sChecked = $this->oWizard->GetParameter('force-uninstall', false) ? ' checked ' : '';
$oPage->add('');
$oPage->add_style(
<<add_ready_script(
<<<'JS'
$("[data-role=\"setup-collapsable-options--toggler\"").on('click', function() {
var $tbody = $(this).closest("div");
$tbody.children().not(":first-child").toggle();
$tbody.toggleClass('setup-is-opened');
});
$("#force-uninstall").on("click", function() {
let $this = $(this);
let bForceUninstall = $this.prop("checked");
if( bForceUninstall && !confirm('Beware, uninstalling extensions flagged as non uninstallable may result in data corruption and application crashes. Are you sure you want to continue ?')){
$this.prop("checked",false);
}
});
JS
);
}
}