mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
Harmonize setup look with backoffice one and force navigation buttons to remain at the same position at every setup step 🙉🙉🙉
This commit is contained in:
@@ -190,8 +190,10 @@ class WizardController
|
||||
$oPage->add_linked_script('../setup/setup.js');
|
||||
$oPage->add_script("function CanMoveForward()\n{\n".$oStep->JSCanMoveForward()."\n}\n");
|
||||
$oPage->add_script("function CanMoveBackward()\n{\n".$oStep->JSCanMoveBackward()."\n}\n");
|
||||
$oPage->add('<form id="wiz_form" method="post">');
|
||||
$oPage->add('<form id="wiz_form" class="ibo-setup--wizard" method="post">');
|
||||
$oPage->add('<div class="ibo-setup--wizard--content">');
|
||||
$oStep->Display($oPage);
|
||||
$oPage->add('</div>');
|
||||
|
||||
// Add the back / next buttons and the hidden form
|
||||
// to store the parameters
|
||||
@@ -203,14 +205,14 @@ class WizardController
|
||||
}
|
||||
|
||||
$oPage->add('<input type="hidden" name="_steps" value="'.htmlentities(json_encode($this->aSteps), ENT_QUOTES, 'UTF-8').'"/>');
|
||||
$oPage->add('<table style="width:100%;"><tr>');
|
||||
$oPage->add('<table style="width:100%;" class="ibo-setup--wizard--buttons-container"><tr>');
|
||||
if ((count($this->aSteps) > 0) && ($oStep->CanMoveBackward()))
|
||||
{
|
||||
$oPage->add('<td style="text-align: left"><button id="btn_back" type="submit" name="operation" value="back"> << Back </button></td>');
|
||||
$oPage->add('<td style="text-align: left"><button id="btn_back" class="ibo-button ibo-is-alternative ibo-is-neutral" type="submit" name="operation" value="back"><span class="ibo-button--label">Back</span></button></td>');
|
||||
}
|
||||
if ($oStep->CanMoveForward())
|
||||
{
|
||||
$oPage->add('<td style="text-align:right;"><button id="btn_next" class="default" type="submit" name="operation" value="next">'.htmlentities($oStep->GetNextButtonLabel(), ENT_QUOTES, 'UTF-8').'</button></td>');
|
||||
$oPage->add('<td style="text-align:right;"><button id="btn_next" class="default ibo-button ibo-is-regular ibo-is-primary" type="submit" name="operation" value="next"><span class="ibo-button--label">'.htmlentities($oStep->GetNextButtonLabel(), ENT_QUOTES, 'UTF-8').'</span></button></td>');
|
||||
}
|
||||
$oPage->add('</tr></table>');
|
||||
$oPage->add("</form>");
|
||||
@@ -432,7 +434,7 @@ abstract class WizardStep
|
||||
*/
|
||||
public function GetNextButtonLabel()
|
||||
{
|
||||
return ' Next >> ';
|
||||
return 'Next';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,7 +64,7 @@ class WizStepWelcome extends WizardStep
|
||||
*/
|
||||
public function GetNextButtonLabel()
|
||||
{
|
||||
return ' Continue >> ';
|
||||
return 'Continue';
|
||||
}
|
||||
|
||||
public function GetPossibleSteps()
|
||||
@@ -123,11 +123,11 @@ EOF
|
||||
break;
|
||||
}
|
||||
}
|
||||
$sStyle = 'style="display:none;max-height:196px;overflow:auto;"';
|
||||
$sToggleButtons = '<button type="button" id="show_details" onclick="$(\'#details\').toggle(); $(this).toggle(); $(\'#hide_details\').toggle();">Show details</button><button type="button" id="hide_details" style="display:none;" onclick="$(\'#details\').toggle(); $(this).toggle(); $(\'#show_details\').toggle();">Hide details</button>';
|
||||
$sStyle = 'style="display:none;overflow:auto;"';
|
||||
$sToggleButtons = '<button type="button" id="show_details" class="ibo-button ibo-is-alternative ibo-is-neutral" onclick="$(\'#details\').toggle(); $(this).toggle(); $(\'#hide_details\').toggle();"><span class="ibo-button--icon fa fa-caret-down"></span><span class="ibo-button--label">Show details</span></button><button type="button" id="hide_details" class="ibo-button ibo-is-alternative ibo-is-neutral" style="display:none;" onclick="$(\'#details\').toggle(); $(this).toggle(); $(\'#show_details\').toggle();"><span class="ibo-button--icon fa fa-caret-up"></span><span class="ibo-button--label">Hide details</span></button>';
|
||||
if (count($aErrors)> 0)
|
||||
{
|
||||
$sStyle = 'style="max-height:196px;overflow:auto;"';
|
||||
$sStyle = 'overflow:auto;"';
|
||||
$sTitle = count($aErrors).' Error(s), '.count($aWarnings).' Warning(s).';
|
||||
$sH2Class = 'text-error';
|
||||
}
|
||||
@@ -2155,7 +2155,7 @@ class WizStepSummary extends WizardStep
|
||||
*/
|
||||
public function GetNextButtonLabel()
|
||||
{
|
||||
return ' Install ! ';
|
||||
return 'Install';
|
||||
}
|
||||
|
||||
public function CanMoveForward()
|
||||
@@ -2180,7 +2180,6 @@ class WizStepSummary extends WizardStep
|
||||
$oPage->add_style(
|
||||
<<<CSS
|
||||
#params_summary {
|
||||
height: 200px;
|
||||
overflow: auto;
|
||||
}
|
||||
#params_summary div {
|
||||
@@ -2206,7 +2205,6 @@ class WizStepSummary extends WizardStep
|
||||
padding-left: 20px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
background: url(../images/minus.gif) 2px 2px no-repeat;
|
||||
}
|
||||
#params_summary div.closed .title {
|
||||
background: url(../images/plus.gif) 2px 2px no-repeat;
|
||||
|
||||
Reference in New Issue
Block a user