Skip to content

Commit

Permalink
Merge branch '7.0' into 7
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 13, 2024
2 parents 861eb20 + 2efc5ea commit bc2d7d6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
6 changes: 0 additions & 6 deletions code/Form/UserFormsRequiredFieldsValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ public function php($data)
$valid = true;
$fields = $this->form->Fields();

foreach ($fields as $field) {
$result = $field->validate();
$valid = $result->isValid() && $valid;
$this->result->combineAnd($result);
}

if (empty($this->required)) {
return $valid;
}
Expand Down
10 changes: 1 addition & 9 deletions code/Model/Recipient/EmailRecipient.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,7 @@ protected function getFormParent()
$formClass = $this->FormClass;
return $formClass::get()->byID($this->FormID);
}

// Revert to checking for a form from the session
// LeftAndMain::sessionNamespace is protected.
$sessionNamespace = $this->config()->get('session_namespace') ?: CMSMain::class;

$formID = Controller::curr()->getRequest()->getSession()->get($sessionNamespace . '.currentPage');
if ($formID) {
return UserDefinedForm::get()->byID($formID);
}
return null;
}

public function getTitle()
Expand Down
2 changes: 1 addition & 1 deletion code/Model/UserDefinedForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class UserDefinedForm extends Page
* @var string
* @deprecated 6.4.0 Will be renamed to cms_icon_class
*/
private static $icon_class = 'font-icon-p-list';
private static $cms_icon_class = 'font-icon-p-list';

private static $class_description = 'Adds a customizable form.';

Expand Down

0 comments on commit bc2d7d6

Please sign in to comment.