Skip to content
Snippets Groups Projects
Commit ebfe8550 authored by hahn's avatar hahn
Browse files

- use formgen.class.php on deploy-page

parent 1c435525
Branches
No related tags found
No related merge requests found
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
###################################################################### */ ###################################################################### */
require_once("./classes/project.class.php"); require_once("./classes/project.class.php");
require_once("./classes/formgen.class.php");
require_once("./inc_functions.php"); require_once("./inc_functions.php");
// --- Checks // --- Checks
...@@ -23,8 +24,8 @@ if (array_key_exists("par3", $aParams)) { ...@@ -23,8 +24,8 @@ if (array_key_exists("par3", $aParams)) {
if (array_key_exists("confirm", $aParams)) { if (array_key_exists("confirm", $aParams)) {
$bIgnoreDeploytimes = false; $bIgnoreDeploytimes = false;
if (array_key_exists("bIgnoreDeploytimes", $aParams)) { if (array_key_exists("aIgnore", $aParams)) {
$bIgnoreDeploytimes = $aParams["bIgnoreDeploytimes"]; $bIgnoreDeploytimes = $aParams["aIgnore"][0] == "bIgnoreDeploytimes";
} }
$sOut.=$oPrj->deploy($sPhase, $bIgnoreDeploytimes); $sOut.=$oPrj->deploy($sPhase, $bIgnoreDeploytimes);
} else { } else {
...@@ -41,18 +42,41 @@ if (array_key_exists("confirm", $aParams)) { ...@@ -41,18 +42,41 @@ if (array_key_exists("confirm", $aParams)) {
'; ';
// Eingabe Kommentare zum Deployment // Eingabe Kommentare zum Deployment
$sOut.=' $i = 0;
<form action="?" method="post" enctype="multipart/form-data"> $aForms = array(
<input type="hidden" name="confirm" value="1"> 'deploy' => array(
<fieldset> 'meta' => array(
<strong>' . t("page-deploy-info-emergeny-only") . '</strong><br> 'method' => 'POST',
<input type="checkbox" name="bIgnoreDeploytimes" value="1"> ' . t("page-deploy-info-ignore-deploytime") . '<br> 'action' => '?',
</fieldset><br> ),
<fieldset> 'validate' => array(),
<button type="submit" class="btn btn-primary btn-large" >' . t("deploy") . '</button> 'form' => array(
</fieldset> 'input' . $i++ => array(
</form> 'type' => 'hidden',
'; 'name' => 'confirm',
'value' => '1',
),
'input' . $i++ => array(
'type' => 'checkbox',
'name' => 'aIgnore',
'label' => '',
'validate' => 'isastring',
'options' => array(
'bIgnoreDeploytimes' => array(
'label' => t("page-deploy-info-ignore-deploytime"),
'checked' => false,
),
),
),
'button' . $i++ => array(
'type' => 'submit',
'value' => t("deploy"),
),
),
),
);
$oForm = new formgen($aForms);
$sOut .= $oForm->renderHtml("deploy");
} else { } else {
$sOut.=$oPrj->getBox("error", t("error-no-phase")); $sOut.=$oPrj->getBox("error", t("error-no-phase"));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment