Skip to content

Commit

Permalink
Merge branch '3.0' into 3
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Dec 12, 2024
2 parents 41fbeb8 + 6ec0f69 commit cd79890
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
4 changes: 2 additions & 2 deletions code/Controller/AssetAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')
)
);
}
Expand Down
6 changes: 3 additions & 3 deletions code/Forms/AssetFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions code/Forms/FileFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 = [])
{
Expand Down
5 changes: 2 additions & 3 deletions code/Forms/RemoteFileFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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'] ?? ''));
Expand Down
2 changes: 1 addition & 1 deletion code/Forms/UploadField.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit cd79890

Please sign in to comment.