fix multiple things in EditHandler

This commit is contained in:
Thomas Portelange 2024-09-19 16:45:50 +02:00 committed by GitHub
parent e639dd4d83
commit 901c64f7a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,7 +107,7 @@ class EditHandler extends Handler
*/
public function Link($action = null)
{
return Controller::join_links(parent::Link(), $this->stat('url_segment'), $action);
return Controller::join_links(parent::Link(), static::config()->url_segment, $action);
}
/**
@ -129,7 +129,7 @@ class EditHandler extends Handler
FormAction::create('doSave', _t('GRIDFIELD_BULKMANAGER_EDIT_HANDLER.SAVE_BTN_LABEL', 'Save all'))
->setAttribute('id', 'bulkEditingSaveBtn')
->addExtraClass('btn btn-success')
->setAttribute('data-icon', 'accept')
// ->setAttribute('data-icon', 'accept')
->setUseButtonTag(true)
);
@ -137,7 +137,7 @@ class EditHandler extends Handler
FormAction::create('Cancel', _t('GRIDFIELD_BULKMANAGER_EDIT_HANDLER.CANCEL_BTN_LABEL', 'Cancel'))
->setAttribute('id', 'bulkEditingUpdateCancelBtn')
->addExtraClass('btn btn-danger cms-panel-link')
->setAttribute('data-icon', 'decline')
// ->setAttribute('data-icon', 'decline')
->setAttribute('href', $one_level_up->Link)
->setUseButtonTag(true)
->setAttribute('src', '')//changes type to image so isn't hooked by default actions handlers
@ -364,7 +364,7 @@ class EditHandler extends Handler
'type' => 'Includes',
'SilverStripe\\Admin\\LeftAndMain_EditForm',
]);
$form->addExtraClass('center cms-content');
$form->addExtraClass('center cms-content flexbox-area-grow fill-height');
$form->setAttribute('data-pjax-fragment', 'CurrentForm Content');
Requirements::javascript('colymba/gridfield-bulk-editing-tools:client/dist/js/main.js');