QuickForm: postpone default submit button creation

This gives more possibilities to override them at a late stage
This commit is contained in:
Thomas Gelf 2017-01-02 10:14:30 +01:00
parent 188530b3ef
commit c9929f7b17
1 changed files with 2 additions and 2 deletions

View File

@ -309,7 +309,6 @@ abstract class QuickForm extends QuickBaseForm
if (! $this->didSetup) {
$this->beforeSetup();
$this->setup();
$this->addSubmitButtonIfSet();
$this->onSetup();
$this->didSetup = true;
}
@ -326,6 +325,7 @@ abstract class QuickForm extends QuickBaseForm
}
$this->prepareElements();
$this->addSubmitButtonIfSet();
if ($this->hasBeenSent()) {
$post = $request->getPost();
@ -447,8 +447,8 @@ abstract class QuickForm extends QuickBaseForm
}
$this->request = $request;
$this->prepareElements();
$this->onRequest();
$this->prepareElements();
return $this;
}