|
@@ -2598,33 +2598,43 @@ class iassign {
|
|
|
|
|
|
//if (!empty($history_comment)) {
|
|
//if (!empty($history_comment)) {
|
|
$output .= " <table id='outlinetable' class='generaltable boxaligncenter' cellpadding='5' width='100%'> \n";
|
|
$output .= " <table id='outlinetable' class='generaltable boxaligncenter' cellpadding='5' width='100%'> \n";
|
|
- $output .= " <tr><th>" . get_string('history_comments', 'iassign') . "</th></tr>";
|
|
|
|
- $output .= $history_comment;
|
|
|
|
|
|
+ $output .= " <tr><th><i style='font-size: 20px' class='icon fa fa-comments-o'></i>" . get_string('history_comments', 'iassign') . "</th></tr>";
|
|
$output .= "</table>";
|
|
$output .= "</table>";
|
|
|
|
|
|
print " <script type='text/javascript'>
|
|
print " <script type='text/javascript'>
|
|
//<![CDATA[
|
|
//<![CDATA[
|
|
function submit_comment(url) {
|
|
function submit_comment(url) {
|
|
|
|
+ if (document.formEnvioComment.submission_comment.value.length < 1) return;
|
|
|
|
+
|
|
var formData = new FormData();
|
|
var formData = new FormData();
|
|
formData.append('submission_comment', document.formEnvioComment.submission_comment.value);
|
|
formData.append('submission_comment', document.formEnvioComment.submission_comment.value);
|
|
var request = new XMLHttpRequest();
|
|
var request = new XMLHttpRequest();
|
|
request.open('POST', url);
|
|
request.open('POST', url);
|
|
|
|
+ document.getElementById('comments_history').innerHTML = '';
|
|
request.onload = function (e) {
|
|
request.onload = function (e) {
|
|
if (request.readyState === 4) {
|
|
if (request.readyState === 4) {
|
|
if (request.status === 200) {
|
|
if (request.status === 200) {
|
|
- alert(request.responseText);
|
|
|
|
|
|
+ document.getElementById('comments_history').innerHTML = request.responseText;
|
|
|
|
+ document.getElementById('check-message-success').style.visibility = 'visible';
|
|
|
|
+ setTimeout(function(){
|
|
|
|
+ document.getElementById('check-message-success').style.visibility = 'hidden';
|
|
|
|
+ }, 3000);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- };
|
|
|
|
|
|
+ };
|
|
|
|
+ document.formEnvioComment.submission_comment.value = '';
|
|
request.send(formData);
|
|
request.send(formData);
|
|
}
|
|
}
|
|
//]]>
|
|
//]]>
|
|
</script>";
|
|
</script>";
|
|
|
|
|
|
$output .= "<center><form name='formEnvioComment' id='formEnvioComment1' enctype='multipart/form-data'>\n";
|
|
$output .= "<center><form name='formEnvioComment' id='formEnvioComment1' enctype='multipart/form-data'>\n";
|
|
- $output .= "<br><p><textarea rows='2' cols='60' name='submission_comment'></textarea></p>\n";
|
|
|
|
- $output .= "<p><input onclick=\"submit_comment('$enderecoPOSTcomment')\" type=button value='" . get_string('submit_comment', 'iassign') . "'\></p>\n";
|
|
|
|
- $output .= "</form></center>\n";
|
|
|
|
|
|
+ $output .= "<br><p><textarea class='form-control w-50' rows='2' cols='60' name='submission_comment'></textarea></p>\n";
|
|
|
|
+ $output .= "<p><button class='btn btn-primary' onclick=\"submit_comment('$enderecoPOSTcomment')\" type=button value='" . get_string('submit_comment', 'iassign') . "'>".get_string('submit_comment', 'iassign')."</button> <i id='check-message-success' class='fa fa-check' aria-hidden='true' style='position: absolute; color: green; font-size: 2.0rem; margin-left: 1rem; visibility: hidden;'></i> </p> \n";
|
|
|
|
+
|
|
|
|
+ $output .= "</form> </center>\n";
|
|
|
|
+
|
|
|
|
+ $output .= "<table id='comments_history' class='generaltable boxaligncenter' cellpadding='5' width='100%'>".$history_comment."</table>";
|
|
|
|
|
|
// }
|
|
// }
|
|
$output .= $OUTPUT->box_end();
|
|
$output .= $OUTPUT->box_end();
|