noti
This commit is contained in:
@@ -55,6 +55,56 @@
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<% if (currentUser && currentUser.role === 'Admin') { %>
|
||||
<div id="systemNotificationModal" class="modal-backdrop" role="dialog" aria-modal="true" aria-labelledby="systemNotificationModalTitle">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div>
|
||||
<h3 id="systemNotificationModalTitle">Đăng thông báo hệ thống</h3>
|
||||
<p>Thông báo sẽ được gửi tới tất cả tài khoản đang hoạt động.</p>
|
||||
</div>
|
||||
<button class="icon-button subtle" type="button" data-modal-close aria-label="Đóng">
|
||||
<span class="material-symbols-outlined">close</span>
|
||||
</button>
|
||||
</div>
|
||||
<form class="modal-form" data-system-notification-form>
|
||||
<div class="form-stack">
|
||||
<label class="form-field">
|
||||
<span>Tiêu đề</span>
|
||||
<input type="text" name="title" maxlength="200" required placeholder="Ví dụ: Hệ thống đã cập nhật phiên bản 1.2.0">
|
||||
</label>
|
||||
<label class="form-field">
|
||||
<span>Mức độ</span>
|
||||
<select name="severity" required>
|
||||
<option value="info">Thông tin</option>
|
||||
<option value="success">Cập nhật thành công</option>
|
||||
<option value="warning">Quan trọng / bảo trì</option>
|
||||
<option value="error">Khẩn cấp / sự cố</option>
|
||||
</select>
|
||||
</label>
|
||||
<label class="form-field">
|
||||
<span>Nội dung</span>
|
||||
<textarea name="message" rows="6" maxlength="1000" required placeholder="Mô tả nội dung cập nhật, ảnh hưởng và việc người dùng cần thực hiện."></textarea>
|
||||
<small>Tối đa 1000 ký tự. Không nhập mật khẩu, token hoặc thông tin nhạy cảm.</small>
|
||||
</label>
|
||||
<label class="form-field">
|
||||
<span>Đường dẫn nội bộ (không bắt buộc)</span>
|
||||
<input type="text" name="actionUrl" maxlength="1000" placeholder="Ví dụ: /applications hoặc /agent">
|
||||
<small>Chỉ chấp nhận đường dẫn trong website bắt đầu bằng dấu /.</small>
|
||||
</label>
|
||||
</div>
|
||||
<div class="modal-actions">
|
||||
<button class="btn btn-secondary" type="button" data-modal-close>Hủy</button>
|
||||
<button class="btn btn-primary" type="submit" data-system-notification-submit>
|
||||
<span class="material-symbols-outlined">send</span>
|
||||
Gửi cho mọi người
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<script src="/vendor/notiflix/notiflix-<%= notiflixVersion %>.min.js"></script>
|
||||
<script src="/js/app.js"></script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user