WIP: Backup upload
This commit is contained in:
parent
c828ca2061
commit
2521b32f13
|
@ -259,6 +259,7 @@ echo '</form>';
|
|||
|
||||
echo '<h3 class="error invisible" id="message"> </h3>';
|
||||
|
||||
ui_require_javascript_file('massive_operations');
|
||||
ui_require_jquery_file('form');
|
||||
ui_require_jquery_file('pandora.controls');
|
||||
?>
|
||||
|
@ -276,7 +277,7 @@ $(document).ready (function () {
|
|||
get_parameters_count + post_parameters_count;
|
||||
|
||||
if (count_parameters > limit_parameters_massive) {
|
||||
alert("<?php echo __('Unsucessful sending the data, please contact with your administrator or make with less elements.'); ?>");
|
||||
showMassiveOperationMessage();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1185,6 +1185,7 @@ $table->data['edit1'][1] = '<table width="100%">';
|
|||
// Hack to translate text "none" in PHP to javascript
|
||||
echo '<span id ="none_text" style="display: none;">'.__('None').'</span>';
|
||||
echo '<span id ="select_agent_first_text" style="display: none;">'.__('Please, select an agent first').'</span>';
|
||||
ui_require_javascript_file('massive_operations');
|
||||
ui_require_jquery_file('pandora.controls');
|
||||
|
||||
if ($selection_mode == 'modules') {
|
||||
|
@ -1213,7 +1214,7 @@ $(document).ready (function () {
|
|||
get_parameters_count + post_parameters_count;
|
||||
|
||||
if (count_parameters > limit_parameters_massive) {
|
||||
alert("<?php echo __('Unsucessful sending the data, please contact with your administrator or make with less elements.'); ?>");
|
||||
showMassiveOperationMessage('<?php echo __('Unsucessful sending the data, please contact with your administrator or make with less elements.'); ?>');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -316,11 +316,15 @@ $submit_template_enabled = get_parameter('id_alert_template_enabled');
|
|||
$submit_template_not_standby = get_parameter('id_alert_template_not_standby');
|
||||
$submit_template_standby = get_parameter('id_alert_template_standby');
|
||||
$submit_add = get_parameter('crtbutton');
|
||||
|
||||
echo '<div id="loading" display="none">';
|
||||
echo html_print_image('images/wait.gif', true, ['border' => '0']).'<br />';
|
||||
echo '<strong>'.__('Please wait...').'</strong>';
|
||||
echo '</div>';
|
||||
// Waiting spinner.
|
||||
ui_print_spinner(__('Loading'));
|
||||
// Modal for show messages.
|
||||
html_print_div(
|
||||
[
|
||||
'id' => 'massive_modal',
|
||||
'content' => '',
|
||||
]
|
||||
);
|
||||
?>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
@ -338,12 +342,12 @@ echo '</div>';
|
|||
confirm_status =
|
||||
confirm("<?php echo __('Are you sure?'); ?>");
|
||||
if (confirm_status)
|
||||
$("#loading").css("display", "");
|
||||
showSpinner();
|
||||
else
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#loading").css("display", "none");
|
||||
hideSpinner();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -6273,3 +6273,55 @@ function ui_print_reveal_password(string $name, bool $return=false)
|
|||
|
||||
echo $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generate a spinner box for waiting times
|
||||
*
|
||||
* @param string $text Text for show in spinner. English Loading for default.
|
||||
* @param boolean $return If true, return the string with the formed element.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function ui_print_spinner(string $text='Loading', bool $return=false)
|
||||
{
|
||||
$output = '';
|
||||
|
||||
$output .= '<center>';
|
||||
|
||||
$output .= html_print_div(
|
||||
[
|
||||
'id' => 'loading_spinner',
|
||||
'class' => 'white_box invisible',
|
||||
'content' => '<span style="font-size:25px;">'.$text.'...</span>'.html_print_image(
|
||||
'images/spinner.gif',
|
||||
true,
|
||||
[
|
||||
'border' => '0',
|
||||
'width' => '25px',
|
||||
'heigth' => '25px',
|
||||
]
|
||||
),
|
||||
],
|
||||
true
|
||||
);
|
||||
|
||||
$output .= '</center>';
|
||||
|
||||
$output .= '
|
||||
<script type="text/javascript">
|
||||
function hideSpinner() {
|
||||
document.getElementById("loading_spinner").classList.add("invisible");
|
||||
}
|
||||
function showSpinner() {
|
||||
document.getElementById("loading_spinner").classList.remove("invisible");
|
||||
}
|
||||
</script>
|
||||
';
|
||||
|
||||
if ($return === true) {
|
||||
return $output;
|
||||
} else {
|
||||
echo $output;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -792,6 +792,7 @@ p.center {
|
|||
cursor: help;
|
||||
}
|
||||
|
||||
/* Legacy spinner */
|
||||
#loading {
|
||||
position: fixed;
|
||||
width: 200px;
|
||||
|
@ -802,6 +803,18 @@ p.center {
|
|||
padding: 20px;
|
||||
}
|
||||
|
||||
/* New standard spinner */
|
||||
#loading_spinner {
|
||||
position: fixed;
|
||||
margin-left: 30%;
|
||||
text-align: center;
|
||||
top: 50%;
|
||||
background-color: #fff;
|
||||
border: 2px solid #82b92e;
|
||||
box-shadow: 2px 2px 2px #9dbba1;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.tactical_set legend {
|
||||
text-align: left;
|
||||
color: #3f3f3f;
|
||||
|
|
Loading…
Reference in New Issue