fixed typos, reordered jquery, fixed migrations

This commit is contained in:
Godfrey M 2024-03-18 12:36:54 -07:00
parent 01afa9a749
commit 8b52d5da85
3 changed files with 20 additions and 19 deletions

View file

@ -14,7 +14,7 @@ class AddDeclineMsgToCheckoutAcceptanceTable extends Migration
public function up()
{
Schema::table('checkout_acceptances', function (Blueprint $table) {
$table->string('declined_msg')->after('signature_filename');
$table->string('declined_msg')->after('signature_filename')->nullable();
});
}

View file

@ -49,7 +49,7 @@ return [
'default_eula_text' => 'Default EULA',
'default_language' => 'Default Language',
'default_eula_help_text' => 'You can also associate custom EULAs to specific asset categories.',
'decline_msg' => 'Add details to why you cant accept this (Optional)',
'decline_msg' => 'Add details to why you can\'t accept this (Optional)',
'display_asset_name' => 'Display Asset Name',
'display_checkout_date' => 'Display Checkout Date',
'display_eol' => 'Display EOL in table view',

View file

@ -103,6 +103,24 @@
@section('moar_scripts')
<script nonce="{{ csrf_token() }}">
$(document).ready(function(){
// Initially hide the div
$('#declined_msg').hide();
$('#declined_msg_label').hide();
$('input[id="declined"]').change(function(){
if($(this).is(':checked')){
$('#declined_msg_label').show();
$('#declined_msg').show();
}
else {
$('#declined_msg_label').hide();
$('#declined_msg').hide();
}
});
});
var wrapper = document.getElementById("signature-pad"),
clearButton = wrapper.querySelector("[data-action=clear]"),
saveButton = wrapper.querySelector("[data-action=save]"),
@ -139,24 +157,7 @@
$('#signature_output').val(signaturePad.toDataURL());
}
});
$(document).ready(function(){
// Initially hide the div
$('#declined_msg').hide();
$('#declined_msg_label').hide();
$('input[id="declined"]').change(function(){
if($(this).is(':checked')){
$('#declined_msg_label').show();
$('#declined_msg').show();
}
else {
$('#declined_msg_label').hide();
$('#declined_msg').hide();
}
});
});
</script>
@stop