]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
ids.cgi: Allow to split working_notice function into two parts.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 10 Apr 2022 09:19:41 +0000 (11:19 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 10 Apr 2022 09:19:41 +0000 (11:19 +0200)
This allows to open the notice and close it at a later time.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/ids.cgi

index 3a2e492b93bac765ce488a54dc466eecfb315adb..56bb5712ef467b050eca5bf1d4e9a1b50b11d9ef 100644 (file)
@@ -1830,6 +1830,16 @@ END
 sub working_notice ($) {
        my ($message) = @_;
 
+       &_open_working_notice ($message);
+       &_close_working_notice();
+}
+
+#
+## Private function to lock the page and tell the user what is going on.
+#
+sub _open_working_notice ($) {
+       my ($message) = @_;
+
        &Header::openpage($Lang::tr{'intrusion detection system'}, 1, '');
        &Header::openbigbox('100%', 'left', '', $errormessage);
        &Header::openbox( 'Waiting', 1,);
@@ -1839,8 +1849,15 @@ sub working_notice ($) {
                                        <td><img src='/images/indicator.gif' alt='$Lang::tr{'aktiv'}' /></td>
                                        <td>$message</td>
                                </tr>
-                       </table>
 END
+}
+
+#
+## Private function to close a working notice.
+#
+sub _close_working_notice () {
+       print "</table>\n";
+
        &Header::closebox();
        &Header::closebigbox();
        &Header::closepage();