]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/commitdiff
server-bans: switch title and button value to default
authorValerie Pond <redacted>
Thu, 27 Apr 2023 00:02:42 +0000 (01:02 +0100)
committerValerie Pond <redacted>
Thu, 27 Apr 2023 00:02:42 +0000 (01:02 +0100)
This fixes an issue where the header and button text for the modal for "Add Ban" was still "Edit Ban" after having previously clicked a ban to edit and now clicked "Add Ban" again.

server-bans/index.php

index 64e9ec5afbd7b5b706e2d0ccaeee157b9d8e32f2..b9a9b7ca39e7371f2d6e6ffd90722256bf5feba5 100644 (file)
@@ -96,7 +96,7 @@ if (!empty($_POST))
 ?>
 <h4>Server Bans Overview</h4>
 Here are all your network bans, from K-Lines to G-Lines, it's all here.<br><br>
-
+Click on an entry to edit it.
 <!-- Top add button -->
 <p><div class="btn btn-primary" onclick="add_ban()" <?php echo (current_user_can(PERMISSION_SERVER_BAN_ADD)) ? "" : "disabled"; ?>>
 Add Ban</div></p></table>
@@ -299,6 +299,8 @@ $(document).ready( function () {
                $('#ban_reason').val("");
                $('#ban_soft').prop('checked', false);
                $('#do_del_ban').hide();
+               $('#ban_add_title').html("Add server ban");
+               $('#do_add_ban').html("Add Ban");
                $('#ban_add').modal('show');
        }