bug f5 après masque de saisie incomplet

This commit is contained in:
Fred Tempez 2020-09-22 18:54:14 +02:00
parent 8398aae329
commit 7e8dbc3f0e
1 changed files with 15 additions and 13 deletions

View File

@ -234,7 +234,7 @@ class gallery extends common {
} }
} }
// Soumission du formulaire d'ajout d'une galerie // Soumission du formulaire d'ajout d'une galerie
if($this->isPost()) { if( $this->isPost() ) {
if (!$this->getInput('galleryConfigFilterResponse')) { if (!$this->getInput('galleryConfigFilterResponse')) {
$galleryId = helper::increment($this->getInput('galleryConfigName', helper::FILTER_ID, true), (array) $this->getData(['module', $this->getUrl(0)])); $galleryId = helper::increment($this->getInput('galleryConfigName', helper::FILTER_ID, true), (array) $this->getData(['module', $this->getUrl(0)]));
// définir une vignette par défaut // définir une vignette par défaut
@ -253,6 +253,7 @@ class gallery extends common {
break; break;
} }
} }
if ( $this->getInput('galleryEditName') ) {
$this->setData(['module', $this->getUrl(0), $galleryId, [ $this->setData(['module', $this->getUrl(0), $galleryId, [
'config' => [ 'config' => [
'name' => $this->getInput('galleryConfigName'), 'name' => $this->getInput('galleryConfigName'),
@ -265,6 +266,7 @@ class gallery extends common {
'legend' => [], 'legend' => [],
'positions' => [] 'positions' => []
]]); ]]);
}
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl() /*. '#galleryConfigForm'*/, 'redirect' => helper::baseUrl() . $this->getUrl() /*. '#galleryConfigForm'*/,