fix paste button for comment review spring
This commit is contained in:
@@ -177,7 +177,10 @@ $lockAttr = $scoresLocked ? 'disabled' : '';
|
|||||||
</td>
|
</td>
|
||||||
<?php elseif ($semester === 'Spring'): ?>
|
<?php elseif ($semester === 'Spring'): ?>
|
||||||
<td>
|
<td>
|
||||||
|
<?php $finalCommentId = 'final-comment-' . $studentId; ?>
|
||||||
|
<?php $finalReviewId = 'final-review-' . $studentId; ?>
|
||||||
<textarea
|
<textarea
|
||||||
|
id="<?= esc($finalCommentId) ?>"
|
||||||
name="comments[<?= $studentId ?>][final]"
|
name="comments[<?= $studentId ?>][final]"
|
||||||
rows="2"
|
rows="2"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
@@ -186,7 +189,6 @@ $lockAttr = $scoresLocked ? 'disabled' : '';
|
|||||||
maxlength="350"
|
maxlength="350"
|
||||||
placeholder="Enter Final comment" <?= $lockAttr ?>><?= esc($comments[$studentId]['final']['comment'] ?? '') ?></textarea>
|
placeholder="Enter Final comment" <?= $lockAttr ?>><?= esc($comments[$studentId]['final']['comment'] ?? '') ?></textarea>
|
||||||
</td>
|
</td>
|
||||||
<?php $finalReviewId = 'final-review-' . $studentId; ?>
|
|
||||||
<td>
|
<td>
|
||||||
<div class="d-flex gap-2 align-items-start">
|
<div class="d-flex gap-2 align-items-start">
|
||||||
<textarea
|
<textarea
|
||||||
@@ -196,6 +198,13 @@ $lockAttr = $scoresLocked ? 'disabled' : '';
|
|||||||
class="form-control review-field"
|
class="form-control review-field"
|
||||||
placeholder="Enter Final review" <?= $lockAttr ?>><?= esc($comments[$studentId]['final']['comment_review'] ?? '') ?></textarea>
|
placeholder="Enter Final review" <?= $lockAttr ?>><?= esc($comments[$studentId]['final']['comment_review'] ?? '') ?></textarea>
|
||||||
<div class="d-flex flex-column gap-1 align-items-stretch">
|
<div class="d-flex flex-column gap-1 align-items-stretch">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn btn-outline-secondary btn-sm copy-final-btn"
|
||||||
|
data-copy-source="#<?= esc($finalCommentId) ?>"
|
||||||
|
data-copy-target="#<?= esc($finalReviewId) ?>" <?= $lockAttr ?>>
|
||||||
|
Paste
|
||||||
|
</button>
|
||||||
<div class="small text-muted proofread-status" data-status-for="<?= esc($finalReviewId) ?>"></div>
|
<div class="small text-muted proofread-status" data-status-for="<?= esc($finalReviewId) ?>"></div>
|
||||||
<ul class="proofread-list small mb-0" data-list-for="<?= esc($finalReviewId) ?>"></ul>
|
<ul class="proofread-list small mb-0" data-list-for="<?= esc($finalReviewId) ?>"></ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -474,18 +483,9 @@ $lockAttr = $scoresLocked ? 'disabled' : '';
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
document.querySelectorAll('.copy-ptap-btn').forEach(button => {
|
wireCopyButtons('.copy-ptap-btn');
|
||||||
button.addEventListener('click', function() {
|
|
||||||
const source = document.querySelector(this.dataset.copySource || '');
|
|
||||||
const target = document.querySelector(this.dataset.copyTarget || '');
|
|
||||||
if (!source || !target) return;
|
|
||||||
target.value = source.value;
|
|
||||||
target.style.height = 'auto';
|
|
||||||
target.style.height = (target.scrollHeight) + 'px';
|
|
||||||
target.focus();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
wireCopyButtons('.copy-midterm-btn');
|
wireCopyButtons('.copy-midterm-btn');
|
||||||
|
wireCopyButtons('.copy-final-btn');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user