mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-26 03:09:10 +02:00
Adjust disabled input style sheets & remove unnecessary control structure within the WelcomeForm::onSuccess()
method
This commit is contained in:
parent
af062b8cb2
commit
0c91a8a283
@ -28,7 +28,7 @@ class WelcomeForm extends Form
|
||||
|
||||
public function hasBeenSubmitted()
|
||||
{
|
||||
return parent::hasBeenSubmitted() || $this->getPressedSubmitElement();
|
||||
return parent::hasBeenSent() && $this->getPopulatedValue('btn_use_defaults');
|
||||
}
|
||||
|
||||
protected function assemble()
|
||||
@ -53,7 +53,6 @@ class WelcomeForm extends Form
|
||||
|
||||
protected function onSuccess()
|
||||
{
|
||||
if ($this->getPopulatedValue('btn_use_defaults')) {
|
||||
$home = $this->dashboard->getEntry(DashboardHome::DEFAULT_HOME);
|
||||
$conn = DBUtils::getConn();
|
||||
$conn->beginTransaction();
|
||||
@ -76,5 +75,4 @@ class WelcomeForm extends Form
|
||||
|
||||
Notification::success(t('Imported system defaults successfully.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
/*! Icinga Web 2 | (c) 2022 Icinga GmbH | GPLv2+ */
|
||||
|
||||
// Welcome view and introduction
|
||||
|
||||
.welcome-view {
|
||||
@ -35,15 +37,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
input[disabled] {
|
||||
input[name="btn_use_defaults"]:disabled {
|
||||
cursor: default;
|
||||
border: 1px solid @control-disabled-color;
|
||||
}
|
||||
|
||||
input[disabled], input[disabled]:hover {
|
||||
&, &:hover {
|
||||
background: @body-bg-color;
|
||||
color: @control-disabled-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sortable dashboard styles
|
||||
|
Loading…
x
Reference in New Issue
Block a user