EIOS/rabprog/tpl/rpd_praktik/mod_rpd_razdel6.html

35 lines
1.5 KiB
HTML
Raw Permalink Normal View History

2023-12-28 15:39:22 +03:00
<div class="col-md-12">
<h3>6. Формы отчетности практики</h3>
<label for="razdel6_1" class="form-label">
<a href="#" class="btn btn-sm btn-danger btnsave" data-itemid="razdel6_1" data-bs-toggle="tooltip" data-bs-placement="bottom" title="сохранение"><i class="bi bi-save"></i></a>
<strong></strong>
</label>
<textarea class="form-control" name="razdel6_1" id="razdel6_1" placeholder="Данный раздел преподаватель заполняет самостоятельно.">{if isset($save)&&count($save)}{$save.razdel6_1}{/if}</textarea>
</div>
{literal}<script>$(document).ready(function(){
var $summernote1_1 = $('#razdel6_1').summernote({
placeholder: $("#razdel6_1").attr("placeholder"),
fontNames: ['Arial', 'Arial Black', 'Comic Sans MS', 'Courier New'],
tabsize: 2,height: 300,lang: 'ru-RU',
callbacks: {
onImageUpload: function(files) {
sendFile(files[0],$summernote1_1);
}
}
});
function sendFile(file,summernote) {
data = new FormData();
data.append("ajdes", "uploadFileEditor");
data.append("file", file);
$.ajax({data: data,datatype:'json',type: "POST",cache: false,contentType: false,processData: false,
url: "/rabprog/rpd/",
success: function(data) {
if(data.err==0) {
summernote.summernote('insertImage', data.url);
}
}
});
}
})</script>{/literal}