diff --git a/code/controllers/AssetAdmin.php b/code/controllers/AssetAdmin.php index 9b88a028..e083c1ea 100644 --- a/code/controllers/AssetAdmin.php +++ b/code/controllers/AssetAdmin.php @@ -213,11 +213,12 @@ JS new FieldList( ), new FieldList( - $btn = new FormAction('doSync', _t('FILESYSTEMSYNC','Look for new files')) + FormAction::create('doSync', _t('FILESYSTEMSYNC','Look for new files')) + ->describe(_t('AssetAdmin_left.ss.FILESYSTEMSYNC_DESC', 'SilverStripe maintains its own database of the files & images stored in your assets/ folder. Click this button to update that database, if files are added to the assets/ folder from outside SilverStripe, for example, if you have uploaded files via FTP.')) + ->setUseButtonTag(true) ) ); $form->setFormMethod('GET'); - $btn->describe(_t('AssetAdmin_left.ss.FILESYSTEMSYNC_DESC', 'SilverStripe maintains its own database of the files & images stored in your assets/ folder. Click this button to update that database, if files are added to the assets/ folder from outside SilverStripe, for example, if you have uploaded files via FTP.')); return $form; } diff --git a/code/controllers/CMSMain.php b/code/controllers/CMSMain.php index b092bf5a..9903f0f0 100644 --- a/code/controllers/CMSMain.php +++ b/code/controllers/CMSMain.php @@ -205,10 +205,13 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr $dateTo->setConfig('showcalendar', true); $actions = new FieldList( - $resetAction = new ResetFormAction('clear', _t('CMSMain_left.ss.CLEAR', 'Clear')), - $searchAction = new FormAction('doSearch', _t('CMSMain_left.ss.SEARCH', 'Search')) + Object::create('ResetFormAction', 'clear', _t('CMSMain_left.ss.CLEAR', 'Clear')) + ->addExtraClass('ss-ui-action-minor'), + FormAction::create('doSearch', _t('CMSMain_left.ss.SEARCH', 'Search')) ); - $resetAction->addExtraClass('ss-ui-action-minor'); + + // Use