Skip to content
Snippets Groups Projects
Commit 7c88c39e authored by Rajab Natshah's avatar Rajab Natshah
Browse files

Issue #3459076: Fix regression for the Action buttons in sticky header, which...

Issue #3459076: Fix regression for the Action buttons in sticky header, which Gin provided a new API for sticky form actions
parent 47ff27e6
No related branches found
No related tags found
No related merge requests found
#edit-moderation-state-0--2 {
padding-right: .5rem;
}
#edit-moderation-state-0--2 .form-element--type-select {
#edit-moderation-state-0 .form-element--type-select {
width: 8rem;
}
#edit-moderation-state-0--2 .form-item--moderation-state-0-current {
#edit-moderation-state-0 .form-item--moderation-state-0-current {
display: none;
}
#edit-moderation-state-0--2 .form-item--moderation-state-0-state label {
#edit-moderation-state-0 .form-item--moderation-state-0-state label {
display: none;
}
[dir=rtl] #edit-moderation-state-0--2 {
padding-right: auto;
padding-left: .5rem;
}
#edit-moderation-state-0--2 {
padding-right: 0.5rem;
#edit-moderation-state-0 {
.form-element--type-select {
width: 8rem;
}
......@@ -16,9 +14,3 @@
}
}
[dir="rtl"] {
#edit-moderation-state-0--2 {
padding-right: auto;
padding-left: 0.5rem;
}
}
......@@ -88,6 +88,9 @@ function varbase_workflow_form_alter(array &$form, FormStateInterface $form_stat
// Remove the group to the side for moderation status.
unset($form['moderation_state']['#group']);
// Move moderation state dropdown to be a gin action item.
$form['moderation_state']['#gin_action_item'] = TRUE;
$form['moderation_state']['#weight'] = 50;
// Move moderation status to actions and remove from old location.
......@@ -98,6 +101,16 @@ function varbase_workflow_form_alter(array &$form, FormStateInterface $form_stat
$form['actions']['submit']['#value'] = t('Save as');
$form['actions']['submit']['#weight'] = 40;
// Move unlock to be a gin action item.
if (isset($form['actions']['unlock'])) {
$form['actions']['unlock']['#gin_action_item'] = TRUE;
}
// Move delete to be a gin action item.
if (isset($form['actions']['delete'])) {
$form['actions']['delete']['#gin_action_item'] = TRUE;
}
// Add the Varbase Workflow moderation status theme styling library to fit in with actions.
$form['#attached']['library'][] = 'varbase_workflow/moderation-state';
}
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment