mirror of https://github.com/MISP/MISP
chg: [eventReport:sendToLLM] Added loading text
parent
d4256ad87a
commit
f9cb9109af
|
@ -6,14 +6,22 @@ echo $this->element('genericElements/Form/genericForm', array(
|
||||||
'model' => 'EventReport',
|
'model' => 'EventReport',
|
||||||
'submit' => array(
|
'submit' => array(
|
||||||
'action' => $this->request->params['action'],
|
'action' => $this->request->params['action'],
|
||||||
'ajaxSubmit' => 'confirmSubmissionToLLM()'
|
'ajaxSubmit' => 'confirmSubmissionToLLM(this)'
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function confirmSubmissionToLLM() {
|
function confirmSubmissionToLLM(clicked) {
|
||||||
|
$clicked = $(clicked)
|
||||||
|
$loading = $('<div style="display:flex; align-items: center; flex-direction: column;"></div>').append(
|
||||||
|
$('<h3>Waiting for the robot to do its magic...</h3>'),
|
||||||
|
$('</br>'),
|
||||||
|
$('<i class="fas fa-robot fa-5x fa-spin"></i>'),
|
||||||
|
$('</br>'),
|
||||||
|
)
|
||||||
|
$clicked.parent().parent().find('.modal-body').append($loading)
|
||||||
submitGenericFormInPlace(function(data) {
|
submitGenericFormInPlace(function(data) {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue