Added checkbox toggle

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2025-07-07 15:51:24 +01:00
parent 8e38b3898e
commit 24c6e836dd
@@ -88,12 +88,14 @@
</div>
</div>
<div class="col-md-12" style="padding-top: 20px">
<label class="form-control">
<input type="checkbox" value="1" name="send_copy" checked="checked" aria-label="send_copy">
{{ trans('mail.send_pdf_copy') }} ({{ auth()->user()->email }})
</label>
</div>
@if (auth()->user()->email!='')
<div class="col-md-12" style="padding-top: 20px; display: none;" id="toggleShow">
<label class="form-control">
<input type="checkbox" value="1" name="send_copy" id="send_copy" checked="checked" aria-label="send_copy">
{{ trans('mail.send_pdf_copy') }} ({{ auth()->user()->email }})
</label>
</div>
@endif
@endif
</div> <!-- / box-body -->
@@ -111,6 +113,9 @@
<script nonce="{{ csrf_token() }}">
var wrapper = document.getElementById("signature-pad"),
clearButton = wrapper.querySelector("[data-action=clear]"),
saveButton = wrapper.querySelector("[data-action=save]"),
@@ -149,6 +154,17 @@
}
});
$('[name="asset_acceptance"]').on('change', function(){
if ($(this).is(':checked') && $(this).attr('id') == 'accepted' ) {
$("#toggleShow").show();
}
else{
$("#toggleShow").hide();
}
});
</script>
@stop