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()
|
public function hasBeenSubmitted()
|
||||||
{
|
{
|
||||||
return parent::hasBeenSubmitted() || $this->getPressedSubmitElement();
|
return parent::hasBeenSent() && $this->getPopulatedValue('btn_use_defaults');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function assemble()
|
protected function assemble()
|
||||||
@ -53,7 +53,6 @@ class WelcomeForm extends Form
|
|||||||
|
|
||||||
protected function onSuccess()
|
protected function onSuccess()
|
||||||
{
|
{
|
||||||
if ($this->getPopulatedValue('btn_use_defaults')) {
|
|
||||||
$home = $this->dashboard->getEntry(DashboardHome::DEFAULT_HOME);
|
$home = $this->dashboard->getEntry(DashboardHome::DEFAULT_HOME);
|
||||||
$conn = DBUtils::getConn();
|
$conn = DBUtils::getConn();
|
||||||
$conn->beginTransaction();
|
$conn->beginTransaction();
|
||||||
@ -77,4 +76,3 @@ class WelcomeForm extends Form
|
|||||||
Notification::success(t('Imported system defaults successfully.'));
|
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 and introduction
|
||||||
|
|
||||||
.welcome-view {
|
.welcome-view {
|
||||||
@ -35,16 +37,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
input[disabled] {
|
input[name="btn_use_defaults"]:disabled {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
border: 1px solid @control-disabled-color;
|
border: 1px solid @control-disabled-color;
|
||||||
}
|
|
||||||
|
|
||||||
input[disabled], input[disabled]:hover {
|
&, &:hover {
|
||||||
background: @body-bg-color;
|
background: @body-bg-color;
|
||||||
color: @control-disabled-color;
|
color: @control-disabled-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Sortable dashboard styles
|
// Sortable dashboard styles
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user