Skip to content
Snippets Groups Projects
Commit 9ce4fea4 authored by Rakesh Kumar Regar's avatar Rakesh Kumar Regar Committed by Kapil Kumar
Browse files

Issue #3392788: Fix Filter form button alignment

parent 68f1cd40
Branches
Tags
1 merge request!14Issue #3392788: Fix Filter form button alignment
......@@ -106,7 +106,7 @@ class ListscriptsForm extends FormBase {
'#options' => [
'0' => $this->t('-Select-'),
'activate' => $this->t('Activate selected scripts'),
'deactivate' => $this->t('Deactivate selected scripts'),
'disable' => $this->t('Disable selected scripts'),
'move_script_to_header' => $this->t('Move scripts to header'),
'move_script_to_body' => $this->t('Move scripts to body'),
'move_script_to_footer' => $this->t('Move scripts to footer'),
......@@ -170,7 +170,7 @@ class ListscriptsForm extends FormBase {
'visibility_section' => $row->visibility_section,
'created' => ($row->created ? date('m/d/Y H:i:s', $row->created) : 'NULL'),
'updated' => ($row->updated ? date('m/d/Y H:i:s', $row->updated) : 'NULL'),
'status' => ($row->status == 1 ? $this->t('active') : $this->t('Disabled')),
'status' => ($row->status == 1 ? $this->t('Active') : $this->t('Disabled')),
'action' => Link::createFromRoute('Edit script', 'advance_script_manager.scripts_form', ['num' => $row->id]),
];
}
......@@ -191,7 +191,7 @@ class ListscriptsForm extends FormBase {
$action = $form_state->getValue('bulk_action_type');
switch ($action) {
case 'deactivate':
case 'disable':
$res = $this->database->update('advance_script_manager')
->fields(['status' => 2])
->condition('id', $item_ids, 'IN')
......
......@@ -68,8 +68,6 @@ class SearchscriptsForm extends FormBase {
$form['container'] = [
'#type' => 'fieldset',
'#prefix' => '<div id="names-fieldset-wrapper">',
'#suffix' => '</div>',
];
// $form['container']['visibility'] = [
......@@ -82,7 +80,6 @@ class SearchscriptsForm extends FormBase {
// 'Body' => $this->t('Body'),
// ],
// '#default_value' => (!empty($visibility)) ? $visibility : 'Any',
// '#prefix' => '<div class="form--inline clearfix">',
// '#size' => 1,
// '#weight' => '0',
// ];
......@@ -97,23 +94,20 @@ class SearchscriptsForm extends FormBase {
'#default_value' => (!empty($status)) ? $status : '',
'#size' => 1,
'#weight' => '0',
'#suffix' => '</div>',
];
$form['container']['submit'] = [
$form['container']['actions']['submit'] = [
'#type' => 'submit',
'#value' => $this->t('Filter'),
'#prefix' => '<div class="form--inline clearfix">',
];
$form['container']['clear'] = [
$form['container']['actions']['clear'] = [
'#type' => 'link',
'#title' => 'Reset',
'#url' => URL::fromRoute('advance_script_manager.advance_script_controller_build'),
'#attributes' => [
'class' => ['button', ' js-form-submit', 'form-submit'],
'class' => ['button', 'js-form-submit', 'form-submit'],
'role' => 'button',
],
'#suffix' => '</div>',
];
return $form;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment