Save configuration is now disabled when no password is entered

pull/1122/head
Luca Di Leo 2022-01-24 02:04:04 -08:00
rodzic 35f820f082
commit cc226b552f
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -11,7 +11,7 @@ On this screen, you can provide the registry url and credentials to access Drone
{% csrf_token %}
{% include "app/plugins/templates/form.html" %}
<button id="btnVerify" type="button" class="btn btn-success" disabled><i class="fas fa-user-check"></i>&nbsp;&nbsp;Verify Configuration</button>
<button type="submit" class="btn btn-primary"><i class="fa fa-save fa-fw"></i>&nbsp;&nbsp;Save Configuration</button>
<button type="submit" class="btn btn-primary" disabled><i class="fa fa-save fa-fw"></i>&nbsp;&nbsp;Save Configuration</button>
</form>
<div id="alert-result" style="display: none; margin-top: 20px" class="alert" role="alert"></div>
@ -27,7 +27,7 @@ On this screen, you can provide the registry url and credentials to access Drone
var alert = $("#alert-result").hide();
if (timeout != null) clearTimeout(timeout);
$("#btnVerify").prop('disabled',
$("#btnVerify,button[type=submit]").prop('disabled',
$("input[name=registry_url]").val().length == 0 ||
$("input[name=username]").val().length == 0 ||
$("input[name=password]").val().length == 0);