Show disabled button if no audit acl
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
This commit is contained in:
parent
80eacfc46d
commit
5b3e284f1b
@ -162,12 +162,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if can_audit %}
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<button data-target="audit-modal" class="modal-trigger orange waves-effect waves-light btn"><i class="material-icons left">done</i>Audit</button>
|
||||
<button {% if can_audit %} data-target="audit-modal" {% else %} disabled="" {% endif %} class="modal-trigger orange waves-effect waves-light btn">
|
||||
<i class="material-icons left">done</i>Audit
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{% if can_audit %}
|
||||
<div id="audit-modal" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4>Check that:</h4>
|
||||
@ -219,6 +221,7 @@ $(function() {
|
||||
});
|
||||
photoInput.change();
|
||||
|
||||
{% if can_audit %}
|
||||
var auditModal = $("div#audit-modal");
|
||||
var auditButton = $("button#audit-modal-send");
|
||||
var auditChecks = $("input.audit-check");
|
||||
@ -235,6 +238,7 @@ $(function() {
|
||||
auditButton.prop("disabled", true);
|
||||
}
|
||||
});
|
||||
{% endif %}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user