Merge branch '3153-Modificar-instalador-de-consola' into 'develop'
Show popup before drop database - #3153 See merge request artica/pandorafms!2042
This commit is contained in:
commit
ea1eea5446
|
@ -205,3 +205,67 @@ div.installation_step {
|
|||
color:white;
|
||||
}
|
||||
|
||||
:focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
/* POPUP */
|
||||
.popup-lightbox{
|
||||
position: fixed;
|
||||
z-index: 8888;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #000;
|
||||
opacity: 0.6;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.popup{
|
||||
max-height: 450px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
background-color: #FFF;
|
||||
z-index: 9999;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.popup-title{
|
||||
background-color: #82b92e;
|
||||
padding: 10px 20px;
|
||||
color: #FFF;
|
||||
font-size:12pt;
|
||||
text-align: center;
|
||||
font-family:Sans, Arial, sans;
|
||||
}
|
||||
|
||||
.popup-inner{
|
||||
max-height: 350px;
|
||||
background: #FFF;
|
||||
/* overflow-y: scroll;*/
|
||||
padding: 25px 35px;
|
||||
font-size: 11pt;
|
||||
}
|
||||
|
||||
.popup-button-green{
|
||||
background-color: #82B92E;
|
||||
border: 1px solid transparent;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.popup-button-green span{
|
||||
color: #FFF !important;
|
||||
}
|
||||
|
||||
.popup-button-green:hover{
|
||||
background-color: transparent !important;
|
||||
border: 1px solid #82B92E;
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
.popup-button-green:hover span{
|
||||
color: #82B92E !important;
|
||||
}
|
||||
/* POPUP -END */
|
||||
|
|
|
@ -66,8 +66,37 @@
|
|||
document.getElementById('tr_dbgrant').style["display"] = "none";
|
||||
}
|
||||
}
|
||||
function popupShow(){
|
||||
document.getElementsByTagName('body')[0].style["margin"] = "0";
|
||||
document.getElementById('install_container').style["padding-top"] = "45px";
|
||||
document.getElementById('install_container').style["margin-top"] = "0";
|
||||
document.getElementById('add-lightbox').style["visibility"] = "visible";
|
||||
document.getElementById('open_popup').style["display"] = "block";
|
||||
document.getElementById('open_popup').style["visibility"] = "visible";
|
||||
}
|
||||
function popupClose(){
|
||||
document.getElementById('add-lightbox').style["visibility"] = "hidden";
|
||||
document.getElementById('open_popup').style["display"] = "none";
|
||||
document.getElementById('open_popup').style["visibility"] = "hidden";
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
<div id='add-lightbox' onclick='popupClose();' class='popup-lightbox'></div>
|
||||
<div id='open_popup' class='popup' style='visibility:hidden;display: block;'>
|
||||
<div class='popup-title'>
|
||||
<span id='title_popup'>Warning</span>
|
||||
<a href='#' onclick='popupClose();'><img src='./images/icono_cerrar.png' alt='close' title='Close' style='float:right;'/></a>
|
||||
</div>
|
||||
<div id='editor_section' class='popup-inner' style='padding: 20px 40px;'>
|
||||
<?php
|
||||
echo "<p><strong>Attention</strong>, you are going to <strong>overwrite the data</strong> of your current installation.</p><p>This means that if you do not have a backup <strong>you will irremissibly LOSE ALL THE STORED DATA</strong>, the configuration and everything relevant to your installation.</p><p><strong>Are you sure of what you are going to do?</strong></p>";
|
||||
echo "<div style='text-align:right;';>";
|
||||
echo "<a id='step4popup' href='install.php?step=4'><button type='submit' class='btn_install_next'><span class='btn_install_next_text'>Yes, I'm sure I want to delete everything</span></button></a>";
|
||||
echo "<a href='javascript:popupClose();'><button type='submit' class='btn_install_next popup-button-green'><span class='btn_install_next_text'>Cancel</span></button></a>";
|
||||
echo "</div>";
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '7.0NG.729';
|
||||
|
@ -343,7 +372,7 @@ function adjust_paths_for_freebsd($engine, $connection = false) {
|
|||
|
||||
function install_step1() {
|
||||
global $banner;
|
||||
|
||||
|
||||
echo "
|
||||
<div id='install_container'>
|
||||
<div id='wizard'>
|
||||
|
@ -608,7 +637,7 @@ function install_step3() {
|
|||
|
||||
|
||||
echo " <td valign=top>Drop Database if exists<br>
|
||||
<input class='login' type='checkbox' name='drop' value=1>
|
||||
<input class='login' type='checkbox' name='drop' id='drop' value=1>
|
||||
</td>";
|
||||
|
||||
echo "<td>Full path to HTTP publication directory<br>
|
||||
|
@ -637,8 +666,23 @@ function install_step3() {
|
|||
if (!$error) {
|
||||
echo "<div style='text-align:right; width:100%;'>";
|
||||
echo "<a id='step4' href='install.php?step=4'>
|
||||
<button class='btn_install_next' type='submit'><span class='btn_install_next_text'>Next</span></button></a>";
|
||||
<button class='btn_install_next' type='submit' id='step4button'><span class='btn_install_next_text'>Next</span></button></a>";
|
||||
echo "</div>";
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
var checkDrop = document.getElementById('step4button').addEventListener("click", function(event){
|
||||
if(document.getElementById("drop").checked){
|
||||
popupShow();
|
||||
}
|
||||
else{
|
||||
document.getElementsByName('step2_form')[0].submit();
|
||||
}
|
||||
event.preventDefault();
|
||||
});
|
||||
var step3_form = document.getElementsByName('step2_form')[0];
|
||||
step3_form.addEventListener("submit", checkDrop, true);
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
echo "</div>";
|
||||
|
|
Loading…
Reference in New Issue