Phase 1 fixes: broken dialogs, score width, status badge, MSK date round-trip
- group/lab/labs: move dialogs/scripts INSIDE the #content fragment (they were outside — the layout fragment dropped them, which is why 'add student' did nothing) - group.html toast had swallowed the dialog (th:if createdStudent) — split properly - .input-score width no longer overridden by .inline-form .input-sm (10rem min) - lab page: remove separate 'change status' button — status badge is now a toggle button itself (confirm dialog kept) - DateUtils.localInput/toUtcIso: dates entered in datetime-local are Moscow-local, stored as UTC instant, shown back MSK — correct round-trip both ways - academic parseInstant: naive local datetimes treated as Europe/Moscow - README/module docs left as-is
This commit is contained in:
@@ -106,7 +106,6 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:if="${createdStudent}" class="card import-card toast">
|
||||
<div class="card-body">
|
||||
@@ -115,34 +114,36 @@
|
||||
<p class="text-sm">Логин: <code class="code font-mono" th:text="${createdStudent.studentNo}">—</code></p>
|
||||
<p class="text-sm">Пароль: <code class="code font-mono font-semibold" th:text="${createdStudent.password}">—</code></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<dialog id="modal-add-student" class="modal">
|
||||
<div class="modal-header">
|
||||
<h2 class="modal-title">Добавить студента</h2>
|
||||
<button class="modal-close" type="button" onclick="closeModal('modal-add-student')">✕</button>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-stack" th:action="@{/admin/groups/{gid}/students/create(gid=${group.id})}" method="post">
|
||||
<input type="hidden" name="_csrf" th:value="${csrfToken}">
|
||||
<div class="grid grid-2">
|
||||
<div><label class="label" for="stNo">Студенческий номер (логин)</label>
|
||||
<input class="input" id="stNo" name="studentNo" required></div>
|
||||
<div><label class="label" for="stBasis">Основа обучения</label>
|
||||
<input class="input" id="stBasis" name="basis" placeholder="бюджет"></div>
|
||||
</div>
|
||||
<div><label class="label" for="stLast">Фамилия</label>
|
||||
<input class="input" id="stLast" name="lastName" required></div>
|
||||
<div class="grid grid-2">
|
||||
<div><label class="label" for="stFirst">Имя</label>
|
||||
<input class="input" id="stFirst" name="firstName"></div>
|
||||
<div><label class="label" for="stMiddle">Отчество</label>
|
||||
<input class="input" id="stMiddle" name="middleName"></div>
|
||||
</div>
|
||||
<p class="hint">Пароль будет сгенерирован автоматически.</p>
|
||||
<button class="btn btn-primary" type="submit">Добавить</button>
|
||||
</form>
|
||||
</div>
|
||||
</dialog>
|
||||
<dialog id="modal-add-student" class="modal">
|
||||
<div class="modal-header">
|
||||
<h2 class="modal-title">Добавить студента</h2>
|
||||
<button class="modal-close" type="button" onclick="closeModal('modal-add-student')">✕</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-stack" th:action="@{/admin/groups/{gid}/students/create(gid=${group.id})}" method="post">
|
||||
<input type="hidden" name="_csrf" th:value="${csrfToken}">
|
||||
<div class="grid grid-2">
|
||||
<div><label class="label" for="stNo">Студенческий номер (логин)</label>
|
||||
<input class="input" id="stNo" name="studentNo" required></div>
|
||||
<div><label class="label" for="stBasis">Основа обучения</label>
|
||||
<input class="input" id="stBasis" name="basis" placeholder="бюджет"></div>
|
||||
</div>
|
||||
<div><label class="label" for="stLast">Фамилия</label>
|
||||
<input class="input" id="stLast" name="lastName" required></div>
|
||||
<div class="grid grid-2">
|
||||
<div><label class="label" for="stFirst">Имя</label>
|
||||
<input class="input" id="stFirst" name="firstName"></div>
|
||||
<div><label class="label" for="stMiddle">Отчество</label>
|
||||
<input class="input" id="stMiddle" name="middleName"></div>
|
||||
</div>
|
||||
<p class="hint">Пароль будет сгенерирован автоматически.</p>
|
||||
<button class="btn btn-primary" type="submit">Добавить</button>
|
||||
</form>
|
||||
</div>
|
||||
</dialog>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user