File: /var/www/plan-b.bradford/storage/framework/views/3c935208a675c989c2f4b9635d10bdb58cdbbbd8.php
<script src="//cdn.ckeditor.com/4.19.0/full-all/ckeditor.js"></script>
<script nonce="<?php echo e(app('csp_nonce')); ?>">
$("#contract_format").change(function() {
let contract_format = $(this).val();
if (!contract_format) {
CKEDITOR.instances['description'].setData('');
// toastr.error('Debes seleccionar un formato de documento para continuar.', 'Error de Validación');
return false;
}
$("#modal-students").modal('hide');
cargando('Buscando Formato...');
$.ajax({
url: "<?php echo e(route('contract-format-description')); ?>",
type: "POST",
data: {
id: contract_format,
_token: "<?php echo e(csrf_token()); ?>"
},
dataType: 'json',
success: function(resp) {
setTimeout(function() {
console.log(resp);
swal.close();
if (resp.type == 'error') {
toastr["error"](`${resp.msg}`, "ERROR DE VALIDACIÓN");
return;
}
CKEDITOR.instances['description'].setData(resp.data);
}, 800);
},
error: function(error) {
swal.close();
toastr["error"](`Ocurrió un error. Recargue e intente nuevamente`,
"ERROR INTERNO")
console.log(JSON.stringify(error))
}
});
});
jQuery(document).ready(function() {
CKEDITOR.replace('description', {
height: 450, // Altura inicial
width: 800, // Altura inicial
on: {
instanceReady: function() {
// Establecer un alto mínimo al área editable usando CSS
this.document.getBody().setStyle('min-height', '450px');
this.document.getBody().setStyle('max-width', '810px');
}
}
});
CKEDITOR.instances['description'].on('change', function() {
if (CKEDITOR.instances['description'].getData().length < 1) {
$(".cke_contents").css('border', '1px solid red');
$("#invalid_description").html('Campo Obligatorio');
} else {
$("#invalid_description").html('');
$(".cke_contents").css('border', '0px solid red');
}
});
CKEDITOR.instances['description'].on('keyup', function() {
if (CKEDITOR.instances['description'].getData().length < 1) {
$(".cke_contents").css('border', '1px solid red');
$("#invalid_description").html('Campo Obligatorio');
} else {
$("#invalid_description").html('');
$(".cke_contents").css('border', '0px solid red');
}
});
});
</script>
<?php /**PATH /var/www/plan-b.bradford/resources/views/admin/contracts/sections_contract_edit/format_contract_js.blade.php ENDPATH**/ ?>