mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Wizard: Use a constant for the name and id of the progress element
refs #8369
This commit is contained in:
parent
7dd3fc6c78
commit
7244906515
@ -38,6 +38,11 @@ class Wizard
|
|||||||
*/
|
*/
|
||||||
const BTN_PREV = 'btn_prev';
|
const BTN_PREV = 'btn_prev';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name and id of the element for showing the user an activity indicator when advancing the wizard
|
||||||
|
*/
|
||||||
|
const PROGRESS_ELEMENT = 'wizard_progress';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This wizard's parent
|
* This wizard's parent
|
||||||
*
|
*
|
||||||
@ -655,21 +660,21 @@ class Wizard
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$page->setAttrib('data-progress-element', 'wizard-progress');
|
$page->setAttrib('data-progress-element', static::PROGRESS_ELEMENT);
|
||||||
$page->addElement(
|
$page->addElement(
|
||||||
'note',
|
'note',
|
||||||
'progress',
|
static::PROGRESS_ELEMENT,
|
||||||
array(
|
array(
|
||||||
'order' => 99,
|
'order' => 99, // Ensures that it's shown on the right even if a sub-class adds another button
|
||||||
'decorators' => array(
|
'decorators' => array(
|
||||||
'ViewHelper',
|
'ViewHelper',
|
||||||
array('Spinner', array('id' => 'wizard-progress'))
|
array('Spinner', array('id' => static::PROGRESS_ELEMENT))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$page->addDisplayGroup(
|
$page->addDisplayGroup(
|
||||||
array(static::BTN_PREV, static::BTN_NEXT, 'progress'),
|
array(static::BTN_PREV, static::BTN_NEXT, static::PROGRESS_ELEMENT),
|
||||||
'buttons',
|
'buttons',
|
||||||
array(
|
array(
|
||||||
'decorators' => array(
|
'decorators' => array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user