fix(idk):
This commit is contained in:
50 files changed
+14655
-585
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,101 @@
|
||||
<!-- Attendance Modal -->
|
||||
<div class="modal fade" id="attendanceModal" tabindex="-1" aria-labelledby="attendanceModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-primary text-white">
|
||||
<h5 class="modal-title" id="attendanceModalLabel">
|
||||
<i class="fas fa-clipboard-check me-2"></i>Take Attendance
|
||||
</h5>
|
||||
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="attendanceForm">
|
||||
<input type="hidden" name="routine_id" id="routineId">
|
||||
<div class="mb-4">
|
||||
<h6 class="mb-3">Class Information</h6>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<p class="mb-1"><strong>Subject:</strong> <span id="subjectName"></span></p>
|
||||
<p class="mb-1"><strong>Course:</strong> <span id="courseName"></span></p>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<p class="mb-1"><strong>Time:</strong> <span id="classTime"></span></p>
|
||||
<p class="mb-1"><strong>Date:</strong> <span id="classDate"></span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<h6 class="mb-3">Students List</h6>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Student ID</th>
|
||||
<th>Name</th>
|
||||
<th>Status</th>
|
||||
<th>Remarks</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="studentsList">
|
||||
<!-- Students will be populated here -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="remarks" class="form-label">General Remarks</label>
|
||||
<textarea class="form-control" id="remarks" name="remarks" rows="2" placeholder="Add any general remarks about the class"></textarea>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
|
||||
<i class="fas fa-times me-2"></i>Cancel
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" id="saveAttendance">
|
||||
<i class="fas fa-save me-2"></i>Save Attendance
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
#attendanceModal .modal-content {
|
||||
border: none;
|
||||
box-shadow: var(--shadow-lg);
|
||||
}
|
||||
|
||||
#attendanceModal .modal-header {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#attendanceModal .modal-body {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
#attendanceModal .table th {
|
||||
background-color: var(--light);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
#attendanceModal .table td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#attendanceModal .btn {
|
||||
padding: 0.5rem 1rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
#attendanceModal .form-control {
|
||||
border-radius: var(--border-radius-md);
|
||||
}
|
||||
|
||||
#attendanceModal .form-control:focus {
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,19 @@
|
||||
<!-- Confirmation Modal -->
|
||||
<div id="confirmationModal" style="display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0,0,0,0.5); z-index: 10000;" onclick="if(event.target === this) closeConfirmationModal();">
|
||||
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90%; max-width: 400px; background-color: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.2);">
|
||||
<div style="background-color: #f44336; color: white; padding: 15px; border-top-left-radius: 8px; border-top-right-radius: 8px; display: flex; justify-content: space-between; align-items: center;">
|
||||
<h5 style="margin: 0; font-size: 18px;">Confirm Deletion</h5>
|
||||
<button style="background: none; border: none; color: white; font-size: 24px; cursor: pointer; line-height: 24px;" onclick="closeConfirmationModal()">×</button>
|
||||
</div>
|
||||
<div style="padding: 20px;">
|
||||
<p class="mb-4">Are you sure you want to delete this file? This action cannot be undone.</p>
|
||||
|
||||
<div class="d-flex justify-content-end">
|
||||
<button type="button" class="btn btn-secondary me-2" onclick="closeConfirmationModal()">Cancel</button>
|
||||
<button type="button" class="btn btn-danger" id="confirmDeleteBtn">
|
||||
<i class="fas fa-trash me-1"></i> Delete
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,109 @@
|
||||
<!-- Teacher Feedback Modal -->
|
||||
<div id="feedbackModal" style="display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0,0,0,0.5); z-index: 10000;" onclick="if(event.target === this) closeFeedbackModal();">
|
||||
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90%; max-width: 600px; background-color: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.2);">
|
||||
<div style="background-color: #3F51B5; color: white; padding: 15px; border-top-left-radius: 8px; border-top-right-radius: 8px; display: flex; justify-content: space-between; align-items: center;">
|
||||
<h5 style="margin: 0; font-size: 18px;">Give Institute Feedback</h5>
|
||||
<button style="background: none; border: none; color: white; font-size: 24px; cursor: pointer; line-height: 24px;" onclick="closeFeedbackModal()">×</button>
|
||||
</div>
|
||||
<div style="padding: 20px;">
|
||||
<form method="post" action="{% url 'submit_staff_institute_feedback' %}" id="instituteFeedbackForm">
|
||||
{% csrf_token %}
|
||||
<div class="mb-3">
|
||||
<label for="feedback_type" class="form-label">Feedback Type</label>
|
||||
<select class="form-select" id="feedback_type" name="feedback_type" required>
|
||||
<option value="">Select Type</option>
|
||||
{% for value, name in feedback_types %}
|
||||
<option value="{{ value }}">{{ name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Rating</label>
|
||||
<div class="rating-stars d-flex">
|
||||
<i class="far fa-star fs-4 text-warning rating-star" data-value="1" onclick="selectRatingTeacher(this, 'teacher_modal_rating')"></i>
|
||||
<i class="far fa-star fs-4 text-warning rating-star" data-value="2" onclick="selectRatingTeacher(this, 'teacher_modal_rating')"></i>
|
||||
<i class="far fa-star fs-4 text-warning rating-star" data-value="3" onclick="selectRatingTeacher(this, 'teacher_modal_rating')"></i>
|
||||
<i class="far fa-star fs-4 text-warning rating-star" data-value="4" onclick="selectRatingTeacher(this, 'teacher_modal_rating')"></i>
|
||||
<i class="far fa-star fs-4 text-warning rating-star" data-value="5" onclick="selectRatingTeacher(this, 'teacher_modal_rating')"></i>
|
||||
<input type="hidden" name="rating" id="teacher_modal_rating" value="" required>
|
||||
<div class="invalid-feedback d-block" id="teacher-modal-rating-error" style="display: none;">Please select a rating</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="feedback_text" class="form-label">Feedback</label>
|
||||
<textarea class="form-control" id="feedback_text" name="feedback_text" rows="4" required></textarea>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 form-check">
|
||||
<input type="checkbox" class="form-check-input" id="is_anonymous" name="is_anonymous">
|
||||
<label class="form-check-label" for="is_anonymous">Submit anonymously</label>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-end gap-2">
|
||||
<button type="button" class="btn" style="background-color: #9E9E9E; color: white;" onclick="closeFeedbackModal()">Cancel</button>
|
||||
<button type="submit" class="btn" style="background-color: #3F51B5; color: white;">Submit Feedback</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Teacher Feedback Modal Scripts -->
|
||||
<script>
|
||||
function openFeedbackModal() {
|
||||
document.getElementById('feedbackModal').style.display = 'block';
|
||||
document.body.style.overflow = 'hidden';
|
||||
}
|
||||
|
||||
function closeFeedbackModal() {
|
||||
document.getElementById('feedbackModal').style.display = 'none';
|
||||
document.body.style.overflow = '';
|
||||
}
|
||||
|
||||
function selectRatingTeacher(star, inputId) {
|
||||
const value = parseInt(star.getAttribute('data-value'));
|
||||
document.getElementById(inputId).value = value;
|
||||
|
||||
// Update star display
|
||||
const allStars = star.parentNode.querySelectorAll('.rating-star');
|
||||
allStars.forEach(s => {
|
||||
const starValue = parseInt(s.getAttribute('data-value'));
|
||||
if (starValue <= value) {
|
||||
s.classList.remove('far');
|
||||
s.classList.add('fas');
|
||||
s.classList.add('selected');
|
||||
} else {
|
||||
s.classList.remove('fas');
|
||||
s.classList.add('far');
|
||||
s.classList.remove('selected');
|
||||
}
|
||||
});
|
||||
|
||||
// Hide error message if any
|
||||
const errorId = 'teacher-modal-rating-error';
|
||||
document.getElementById(errorId).style.display = 'none';
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Additional Feedback Styles -->
|
||||
<style>
|
||||
.rating-stars {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.rating-star {
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.rating-star:hover,
|
||||
.rating-star.active,
|
||||
.rating-star.selected {
|
||||
color: #FFD700 !important;
|
||||
transform: scale(1.1);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,49 @@
|
||||
<!-- Upload File Modal -->
|
||||
<div id="uploadFileModal" style="display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0,0,0,0.5); z-index: 10000;" onclick="if(event.target === this) closeUploadModal();">
|
||||
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90%; max-width: 600px; background-color: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.2);">
|
||||
<div style="background-color: #3F51B5; color: white; padding: 15px; border-top-left-radius: 8px; border-top-right-radius: 8px; display: flex; justify-content: space-between; align-items: center;">
|
||||
<h5 style="margin: 0; font-size: 18px;">Upload Study Material</h5>
|
||||
<button style="background: none; border: none; color: white; font-size: 24px; cursor: pointer; line-height: 24px;" onclick="closeUploadModal()">×</button>
|
||||
</div>
|
||||
<div style="padding: 20px;">
|
||||
<form id="uploadFileForm" method="post" action="/app/manage-subject-files/" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="subject_id" class="form-label">Subject</label>
|
||||
<select class="form-select" id="subject_id" name="subject_id" required>
|
||||
<option value="">Select a subject</option>
|
||||
{% for subject in teacher_subjects %}
|
||||
<option value="{{ subject.subject.id }}">{{ subject.subject.name }} ({{ subject.course.name }})</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="title" class="form-label">Title</label>
|
||||
<input type="text" class="form-control" id="title" name="title" required placeholder="e.g. Chapter 1 Notes">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="description" class="form-label">Description (Optional)</label>
|
||||
<textarea class="form-control" id="description" name="description" rows="2" placeholder="Brief description of the material"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="file" class="form-label">File</label>
|
||||
<input type="file" class="form-control" id="file" name="file" required>
|
||||
<div class="form-text">Upload PDF, DOCX, PPT or other study materials. Max file size: 10MB</div>
|
||||
</div>
|
||||
|
||||
<div id="uploadResponse" style="display: none;" class="alert mb-3"></div>
|
||||
|
||||
<div class="d-flex justify-content-end">
|
||||
<button type="button" class="btn btn-secondary me-2" onclick="closeUploadModal()">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fas fa-upload me-1"></i> Upload
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user