diff --git a/code/Controller/AssetAdmin.php b/code/Controller/AssetAdmin.php index 7714fc4ff..fdf5370da 100644 --- a/code/Controller/AssetAdmin.php +++ b/code/Controller/AssetAdmin.php @@ -819,10 +819,10 @@ public function providePermissions() { return array( "CMS_ACCESS_AssetAdmin" => array( - 'name' => _t('SilverStripe\\CMS\\Controllers\\CMSMain.ACCESS', "Access to '{title}' section", array( + 'name' => _t(LeftAndMain::class . '.ACCESS', "Access to '{title}' section", array( 'title' => static::menu_title() )), - 'category' => _t('SilverStripe\\Security\\Permission.CMS_ACCESS_CATEGORY', 'CMS Access') + 'category' => _t(LeftAndMain::class . '.CMS_ACCESS_CATEGORY', 'CMS Access') ) ); } diff --git a/code/Forms/AssetFormFactory.php b/code/Forms/AssetFormFactory.php index 13b2e55a7..390203f5d 100644 --- a/code/Forms/AssetFormFactory.php +++ b/code/Forms/AssetFormFactory.php @@ -21,7 +21,7 @@ use SilverStripe\Forms\OptionsetField; use SilverStripe\Forms\PopoverField; use SilverStripe\Forms\ReadonlyField; -use SilverStripe\Forms\RequiredFields; +use SilverStripe\Forms\Validation\RequiredFieldsValidator; use SilverStripe\Forms\Tab; use SilverStripe\Forms\TabSet; use SilverStripe\Forms\TextField; @@ -108,11 +108,11 @@ public function getForm(?RequestHandler $controller = null, $name = FormFactory: * @param RequestHandler $controller * @param $formName * @param $context - * @return RequiredFields + * @return RequiredFieldsValidator */ protected function getValidator(?RequestHandler $controller, $formName, $context = []) { - $validator = new RequiredFields('Name'); + $validator = new RequiredFieldsValidator('Name'); return $validator; } diff --git a/code/Forms/FileFormFactory.php b/code/Forms/FileFormFactory.php index 57bee0abe..a25a2d9e7 100644 --- a/code/Forms/FileFormFactory.php +++ b/code/Forms/FileFormFactory.php @@ -13,7 +13,7 @@ use SilverStripe\Forms\HeaderField; use SilverStripe\Forms\HiddenField; use SilverStripe\Forms\LiteralField; -use SilverStripe\Forms\RequiredFields; +use SilverStripe\Forms\Validation\RequiredFieldsValidator; use SilverStripe\Forms\Tab; use SilverStripe\Forms\TabSet; use SilverStripe\Forms\TextField; @@ -503,7 +503,7 @@ public function getRequiredContext() * @param RequestHandler $controller * @param $formName * @param $context - * @return RequiredFields + * @return RequiredFieldsValidator */ protected function getValidator(?RequestHandler $controller, $formName, $context = []) { diff --git a/code/Forms/RemoteFileFormFactory.php b/code/Forms/RemoteFileFormFactory.php index f44590111..78c22e2e6 100644 --- a/code/Forms/RemoteFileFormFactory.php +++ b/code/Forms/RemoteFileFormFactory.php @@ -18,7 +18,7 @@ use SilverStripe\Forms\HiddenField; use SilverStripe\Forms\LiteralField; use SilverStripe\Forms\OptionsetField; -use SilverStripe\Forms\RequiredFields; +use SilverStripe\Forms\Validation\RequiredFieldsValidator; use SilverStripe\Forms\TextField; use SilverStripe\View\Embed\Embeddable; @@ -109,8 +109,7 @@ public function getForm(?RequestHandler $controller = null, $name = RemoteFileFo $fields = $this->getFormFields($controller, $name, $context); $actions = $this->getFormActions($controller, $name, $context); - $validator = new RequiredFields(); - $form = Form::create($controller, $name, $fields, $actions, $validator); + $form = Form::create($controller, $name, $fields, $actions); $form->addExtraClass('form--fill-height'); $form->addExtraClass('form--no-dividers'); $form->addExtraClass('insert-embed-modal--'. strtolower($context['type'] ?? '')); diff --git a/code/Forms/UploadField.php b/code/Forms/UploadField.php index 6919fc9f6..26a23e9ec 100644 --- a/code/Forms/UploadField.php +++ b/code/Forms/UploadField.php @@ -11,7 +11,7 @@ use SilverStripe\Forms\FileHandleField; use SilverStripe\Forms\FileUploadReceiver; use SilverStripe\Forms\FormField; -use SilverStripe\Forms\Validator; +use SilverStripe\Forms\Validation\Validator; use SilverStripe\ORM\DataObject; use SilverStripe\Model\List\SS_List; diff --git a/yarn.lock b/yarn.lock index 29ea3104d..c0eeab470 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3089,9 +3089,9 @@ create-react-class@^15.7.0: object-assign "^4.1.1" cross-spawn@^7.0.2, cross-spawn@^7.0.3: - version "7.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.5.tgz#910aac880ff5243da96b728bc6521a5f6c2f2f82" - integrity sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug== + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0"