mirror of
https://github.com/silverstripe/silverstripe-multiform
synced 2024-10-22 11:05:49 +02:00
ENHANCEMENT: enabled MultiForm to use customised action (actions_exempt_from_validation).
Changed has been done in the constructor to read the static variables (incl. overwritten variables).
This commit is contained in:
parent
95bae6450c
commit
a907cc6493
@ -102,8 +102,9 @@ abstract class MultiForm extends Form {
|
||||
$applyValidation = true;
|
||||
|
||||
// Check if the $_REQUEST action that user clicked is an exempt one
|
||||
if(self::$actions_exempt_from_validation) {
|
||||
foreach(self::$actions_exempt_from_validation as $exemptAction) {
|
||||
$actionNames = Object::get_static(get_class($this),'actions_exempt_from_validation');
|
||||
if( $actionNames ) {
|
||||
foreach( $actionNames as $exemptAction) {
|
||||
if(!empty($_REQUEST[$exemptAction])) {
|
||||
$applyValidation = false;
|
||||
break;
|
||||
@ -371,6 +372,7 @@ abstract class MultiForm extends Form {
|
||||
* @param object $form The form that the action was called on
|
||||
*/
|
||||
public function next($data, $form) {
|
||||
|
||||
// Get the next step class
|
||||
$nextStepClass = $this->getCurrentStep()->getNextStep();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user