Loading src/Form/ReactionRuleEditForm.php +1 −0 Changes for src/Form/ReactionRuleEditForm.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -97,6 +97,7 @@ class ReactionRuleEditForm extends RulesComponentFormBase { $actions['submit']['#value'] = $this->t('Save'); $actions['cancel'] = [ '#type' => 'submit', '#limit_validation_errors' => [['locked']], '#value' => $this->t('Cancel'), '#submit' => ['::cancel'], ]; Loading src/Form/TempStoreTrait.php +1 −1 Changes for src/Form/TempStoreTrait.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -238,7 +238,7 @@ trait TempStoreTrait { */ public function validateLock(array &$form, FormStateInterface $form_state) { if ($this->isLocked()) { $form_state->setError($form, $this->lockInformationMessage()); $form_state->setErrorByName('locked', $this->lockInformationMessage()); } } Loading tests/modules/rules_test_ui_embed/src/Form/SettingsForm.php +16 −0 Changes for tests/modules/rules_test_ui_embed/src/Form/SettingsForm.php: 16 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -68,6 +68,13 @@ class SettingsForm extends ConfigFormBase { $form['conditions'] = $this->rulesUiHandler->getForm() ->buildForm([], $form_state); $form['actions']['cancel'] = [ '#type' => 'submit', '#limit_validation_errors' => [['locked']], '#value' => $this->t('Cancel'), '#submit' => ['::cancel'], ]; return $form; } Loading Loading @@ -97,4 +104,13 @@ class SettingsForm extends ConfigFormBase { parent::submitForm($form, $form_state); } /** * Form submission handler for the 'cancel' action. */ public function cancel(array $form, FormStateInterface $form_state) { $this->rulesUiHandler->clearTemporaryStorage(); drupal_set_message($this->t('Canceled.')); $form_state->setRedirectUrl($this->rulesUiHandler->getBaseRouteUrl()); } } src/Form/EmbeddedComponentForm.php +1 −1 File changed.Contains only whitespace changes. Show changes Loading
src/Form/ReactionRuleEditForm.php +1 −0 Changes for src/Form/ReactionRuleEditForm.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -97,6 +97,7 @@ class ReactionRuleEditForm extends RulesComponentFormBase { $actions['submit']['#value'] = $this->t('Save'); $actions['cancel'] = [ '#type' => 'submit', '#limit_validation_errors' => [['locked']], '#value' => $this->t('Cancel'), '#submit' => ['::cancel'], ]; Loading
src/Form/TempStoreTrait.php +1 −1 Changes for src/Form/TempStoreTrait.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -238,7 +238,7 @@ trait TempStoreTrait { */ public function validateLock(array &$form, FormStateInterface $form_state) { if ($this->isLocked()) { $form_state->setError($form, $this->lockInformationMessage()); $form_state->setErrorByName('locked', $this->lockInformationMessage()); } } Loading
tests/modules/rules_test_ui_embed/src/Form/SettingsForm.php +16 −0 Changes for tests/modules/rules_test_ui_embed/src/Form/SettingsForm.php: 16 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -68,6 +68,13 @@ class SettingsForm extends ConfigFormBase { $form['conditions'] = $this->rulesUiHandler->getForm() ->buildForm([], $form_state); $form['actions']['cancel'] = [ '#type' => 'submit', '#limit_validation_errors' => [['locked']], '#value' => $this->t('Cancel'), '#submit' => ['::cancel'], ]; return $form; } Loading Loading @@ -97,4 +104,13 @@ class SettingsForm extends ConfigFormBase { parent::submitForm($form, $form_state); } /** * Form submission handler for the 'cancel' action. */ public function cancel(array $form, FormStateInterface $form_state) { $this->rulesUiHandler->clearTemporaryStorage(); drupal_set_message($this->t('Canceled.')); $form_state->setRedirectUrl($this->rulesUiHandler->getBaseRouteUrl()); } }