adds a text field and jquery to show/hide text field

This commit is contained in:
Godfrey M 2024-03-18 09:36:09 -07:00
parent 4cd4a936d8
commit 0fd99d410e

View file

@ -64,6 +64,14 @@
</label>
</div>
<div class="form-group">
<div class="col-md-3" style="display:block; text-align:center;">
{{ Form::label('decline_msg', trans('admin/settings/general.decling_msg')) }}
</div>
<div class="col-md-8">
<textarea id="decline_msg" name="decline_msg" rows="4" cols="50"></textarea>
</div>
</div>
@if ($snipeSettings->require_accept_signature=='1')
<div class="col-md-12">
@ -130,6 +138,20 @@
$('#signature_output').val(signaturePad.toDataURL());
}
});
$(document).ready(function(){
// Initially hide the div
$('#decline_msg').hide();
$('input[id="declined"]').change(function(){
if($(this).is(':checked')){
$('#decline_msg').show();
}
else {
$('#decline_msg').hide();
}
});
});
</script>
@stop