diff --git a/css/backoffice/components/_form.scss b/css/backoffice/components/_form.scss index e9f6efe70..14301ac90 100644 --- a/css/backoffice/components/_form.scss +++ b/css/backoffice/components/_form.scss @@ -77,12 +77,18 @@ collection-entry-element { .ibo-form-compact{ - .ibo-content-block{ + .ibo-field{ display: flex; flex-direction: column; + gap: 4px; label{ + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + width: 100%; max-width: unset; padding-right: 0; diff --git a/css/backoffice/layout/dashlet-panel/_dashlet-panel.scss b/css/backoffice/layout/dashlet-panel/_dashlet-panel.scss index 73f76fc96..1ec437906 100644 --- a/css/backoffice/layout/dashlet-panel/_dashlet-panel.scss +++ b/css/backoffice/layout/dashlet-panel/_dashlet-panel.scss @@ -35,4 +35,28 @@ .ibo-center-container:has(ibo-dashboard[data-edit-mode="view"]) .ibo-dashlet-panel{ display: none; +} + +.ibo-dashlet-panel--form-container turbo-frame { + height: 100%; +} +.ibo-dashlet-panel--form-container .ibo-form { + height: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.ibo-dashlet-panel--form-container--buttons { + display: flex; + flex-direction: row !important; + justify-content: end; + align-items: center; + + margin: 0 -16px -16px -16px; + padding: 0 16px; + height: 60px; + + background-color: $ibo-color-grey-50; + border-top: solid 1px $ibo-color-grey-400; } \ No newline at end of file diff --git a/sources/Controller/Base/Layout/DashboardController.php b/sources/Controller/Base/Layout/DashboardController.php index 7576215a3..f5c1ba709 100644 --- a/sources/Controller/Base/Layout/DashboardController.php +++ b/sources/Controller/Base/Layout/DashboardController.php @@ -7,6 +7,7 @@ use Combodo\iTop\Application\UI\Base\Component\Button\ButtonUIBlockFactory; use Combodo\iTop\Application\UI\Base\Component\Dashlet\DashletWrapper; use Combodo\iTop\Application\UI\Base\Component\TurboForm\TurboFormUIBlockFactory; use Combodo\iTop\Application\UI\Base\iUIBlock; +use Combodo\iTop\Application\UI\Base\Layout\UIContentBlockUIBlockFactory; use Combodo\iTop\Application\WebPage\AjaxPage; use Combodo\iTop\Application\WebPage\JsonPage; use Combodo\iTop\Controller\AbstractController; @@ -68,10 +69,12 @@ class DashboardController extends Controller $oPage = new AjaxPage(''); - $oUIBlock = TurboFormUIBlockFactory::MakeForDashletConfiguration($sDashletClass, $aValues); - $oUIBlock->AddSubBlock(ButtonUIBlockFactory::MakeForPrimaryAction('Confirm', 'dashboard_submit', 'dashboard_submit', true)); - $oUIBlock->AddSubBlock(ButtonUIBlockFactory::MakeForSecondaryAction('Cancel', 'dashboard_cancel')); - $oPage->AddUiBlock($oUIBlock); + $oForm = TurboFormUIBlockFactory::MakeForDashletConfiguration($sDashletClass, $aValues); + $oButtonContainer = UIContentBlockUIBlockFactory::MakeStandard(null, ['ibo-dashlet-panel--form-container--buttons']); + $oButtonContainer->AddSubBlock(ButtonUIBlockFactory::MakeForSecondaryAction('Cancel', 'dashboard_cancel')); + $oButtonContainer->AddSubBlock(ButtonUIBlockFactory::MakeForPrimaryAction('Confirm', 'dashboard_submit', 'dashboard_submit', true)); + $oForm->AddSubBlock($oButtonContainer); + $oPage->AddUiBlock($oForm); return $oPage; }