forked from ZwiiCMS-Team/ZwiiCMS
[9.1.00] Form : pb avec désactivation option de redirection
This commit is contained in:
parent
41a9f603d2
commit
7c11c8350b
@ -68,6 +68,12 @@ class form extends common {
|
||||
// Soumission du formulaire
|
||||
if($this->isPost()) {
|
||||
// Configuration
|
||||
// Option sélectionnée sans page choisie
|
||||
$pageId = '';
|
||||
if ($this->getInput('formConfigPageId', helper::FILTER_ID) !== null) {
|
||||
// Option désactivée, réinitialiser l'id de la page sélectionnée.
|
||||
$pageId = $this->getInput('formConfigPageIdToggle', helper::FILTER_BOOLEAN) === true ? $this->getInput('formConfigPageId', helper::FILTER_ID) : '';
|
||||
}
|
||||
$this->setData([
|
||||
'module',
|
||||
$this->getUrl(0),
|
||||
@ -78,7 +84,7 @@ class form extends common {
|
||||
'group' => $this->getInput('formConfigGroup', helper::FILTER_INT),
|
||||
'user' => self::$listUsers [$this->getInput('formConfigUser', helper::FILTER_INT)],
|
||||
'mail' => $this->getInput('formConfigMail') ,
|
||||
'pageId' => $this->getInput('formConfigPageId', helper::FILTER_ID),
|
||||
'pageId' => $pageId,
|
||||
'subject' => $this->getInput('formConfigSubject')
|
||||
]
|
||||
]);
|
||||
|
@ -158,6 +158,8 @@ $("#formConfigPageIdToggle").on("change", function() {
|
||||
else {
|
||||
$("#formConfigPageIdWrapper").slideUp(function() {
|
||||
$("#formConfigPageId").val("");
|
||||
console.log($("#formConfigPageId").val());
|
||||
});
|
||||
}
|
||||
}).trigger("change");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user