adjust db_hostname tooltip and replace hostname % with localhost

This commit is contained in:
HB9HIL
2024-07-27 07:58:37 +02:00
parent 6cddb7b199
commit 831bfd568a

View File

@@ -414,7 +414,7 @@ if (!file_exists('.lock')) {
<div class="row">
<div class="col">
<div class="mb-3">
<label for="db_hostname" class="form-label required"><?= __("Hostname or IP"); ?></label><i id="callbook_tooltip" data-bs-toggle="tooltip" data-bs-placement="top" title="Directory Hint" class="fas fa-question-circle text-muted ms-2" data-bs-custom-class="custom-tooltip" data-bs-html="true" data-bs-title="<?= __("Usually 'localhost'. Optional with '...:[port]'. Default Port: 3306. In a docker compose install type 'wavelog-db'."); ?>"></i>
<label for="db_hostname" class="form-label required"><?= __("Hostname or IP"); ?></label><i id="callbook_tooltip" data-bs-toggle="tooltip" data-bs-placement="top" title="Directory Hint" class="fas fa-question-circle text-muted ms-2" data-bs-custom-class="custom-tooltip" data-bs-html="true" data-bs-title="<?= __("Usually 'localhost'.<br>Optional with '[host]:[port]'. Default port: 3306.<br>In a docker compose install type 'wavelog-db'."); ?>"></i>
<input type="text" id="db_hostname" placeholder="localhost" class="form-control" name="db_hostname" />
</div>
</div>
@@ -1479,6 +1479,10 @@ if (!file_exists('.lock')) {
return;
}
if (db_hostname.val() === '%') {
db_hostname.val('localhost');
}
var originalButtonText = $('#db_connection_test_button').html();
$('#db_connection_test_button').html('<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span> <?= __("Connecting..."); ?>').prop('disabled', true);