mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-25 10:57:40 +02:00
Fix code styling issue
This commit is contained in:
parent
372ffa15c0
commit
1429d4aa65
@ -20,7 +20,7 @@ abstract class BaseSetupDashboard extends BaseDashboardForm
|
|||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
static protected $moduleDashlets = [];
|
protected static $moduleDashlets = [];
|
||||||
|
|
||||||
protected $duplicateCustomDashlet = false;
|
protected $duplicateCustomDashlet = false;
|
||||||
|
|
||||||
@ -64,7 +64,10 @@ abstract class BaseSetupDashboard extends BaseDashboardForm
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($choosenDashlets[$module]) && ! $this->duplicateCustomDashlet) {
|
if (isset($choosenDashlets[$module]) && ! $this->duplicateCustomDashlet) {
|
||||||
$this->duplicateCustomDashlet = array_key_exists($this->getPopulatedValue('dashlet'), $choosenDashlets[$module]);
|
$this->duplicateCustomDashlet = array_key_exists(
|
||||||
|
$this->getPopulatedValue('dashlet'),
|
||||||
|
$choosenDashlets[$module]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +128,8 @@ abstract class BaseSetupDashboard extends BaseDashboardForm
|
|||||||
foreach ($dashlets as $dashlet) {
|
foreach ($dashlets as $dashlet) {
|
||||||
$multi = new DashletListMultiSelect($dashlet);
|
$multi = new DashletListMultiSelect($dashlet);
|
||||||
$multi->setCheckBox($this->createElement(
|
$multi->setCheckBox($this->createElement(
|
||||||
'checkbox', $module . '|' . $dashlet->getName(),
|
'checkbox',
|
||||||
|
$module . '|' . $dashlet->getName(),
|
||||||
['class' => 'sr-only']
|
['class' => 'sr-only']
|
||||||
));
|
));
|
||||||
|
|
||||||
@ -146,7 +150,7 @@ abstract class BaseSetupDashboard extends BaseDashboardForm
|
|||||||
$this->addElement('text', 'pane', [
|
$this->addElement('text', 'pane', [
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'label' => t('Dashboard Title'),
|
'label' => t('Dashboard Title'),
|
||||||
'description' => t('Enter a title for the new dashboard you want to add the dashlets to'),
|
'description' => t('Enter a title for the new dashboard you want to add the dashlets to')
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +166,7 @@ abstract class BaseSetupDashboard extends BaseDashboardForm
|
|||||||
$this->assembleDashletElements();
|
$this->assembleDashletElements();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty(self::$moduleDashlets)) {
|
if (! empty(self::$moduleDashlets)) {
|
||||||
foreach (self::$moduleDashlets as $module => $dashlets) {
|
foreach (self::$moduleDashlets as $module => $dashlets) {
|
||||||
/** @var Dashlet $dashlet */
|
/** @var Dashlet $dashlet */
|
||||||
foreach ($dashlets as $dashlet) {
|
foreach ($dashlets as $dashlet) {
|
||||||
|
@ -59,11 +59,11 @@ class DashletForm extends BaseSetupDashboard
|
|||||||
$this->addElement('hidden', 'org_home', ['required' => false]);
|
$this->addElement('hidden', 'org_home', ['required' => false]);
|
||||||
$this->addElement('hidden', 'org_dashlet', ['required' => false]);
|
$this->addElement('hidden', 'org_dashlet', ['required' => false]);
|
||||||
|
|
||||||
if ($this->isUpdatingADashlet()) {
|
if ($this->isUpdatingADashlet()) {
|
||||||
$this->assembleDashletElements();
|
$this->assembleDashletElements();
|
||||||
|
|
||||||
$this->addHtml(new HtmlElement('hr'));
|
$this->addHtml(new HtmlElement('hr'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->addElement('select', 'home', [
|
$this->addElement('select', 'home', [
|
||||||
'class' => 'autosubmit',
|
'class' => 'autosubmit',
|
||||||
@ -72,7 +72,7 @@ class DashletForm extends BaseSetupDashboard
|
|||||||
'value' => $populatedHome,
|
'value' => $populatedHome,
|
||||||
'multiOptions' => array_merge([self::CREATE_NEW_HOME => self::CREATE_NEW_HOME], $homes),
|
'multiOptions' => array_merge([self::CREATE_NEW_HOME => self::CREATE_NEW_HOME], $homes),
|
||||||
'label' => t('Select Home'),
|
'label' => t('Select Home'),
|
||||||
'description' => t('Select a dashboard home you want to add the dashboard pane to.')
|
'description' => t('Select a dashboard home you want to add the dashboard pane to.')
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (empty($homes) || $populatedHome === self::CREATE_NEW_HOME) {
|
if (empty($homes) || $populatedHome === self::CREATE_NEW_HOME) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user