Menu "Ganti password" menjadi "Pengaturan" + panduan menghubungkan akun Google
- Menu profil kini "Pengaturan" (ikon settings); halaman berjudul Pengaturan dengan kartu Akun Google di atas kartu Ganti password. - Masuk dengan Google yang belum terhubung tidak lagi berupa galat merah: halaman login menampilkan pengumuman langkah (masuk NIP/NPM → Pengaturan → Hubungkan akun Google), dan masuk NIP/NPM dari halaman itu langsung diteruskan ke Pengaturan #akun-google. - Uji: pengumuman, penerusan ke Pengaturan, label menu. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
080f6bf9ab
commit
602a9c98b9
+19
-19
@@ -1,14 +1,30 @@
|
||||
{% extends "base.html" %}
|
||||
{% import "_ui.html" as ui %}
|
||||
{% block judul %}Akun — RPS & Portofolio UNTAN{% endblock %}
|
||||
{% block judul %}Pengaturan — RPS & Portofolio UNTAN{% endblock %}
|
||||
{% block halaman_judul %}
|
||||
{{ ui.judul_halaman('Akun Saya', sub=user.nama ~ ' · ' ~ user.username) }}
|
||||
{{ ui.judul_halaman('Pengaturan', sub=user.nama ~ ' · ' ~ user.username) }}
|
||||
{% endblock %}
|
||||
{% block isi %}
|
||||
<div class="row"><div class="col-lg-6">
|
||||
{% if pesan %}{% call ui.alert('success') %}{{ pesan }}{% endcall %}{% endif %}
|
||||
{% if galat %}{% call ui.alert('danger') %}{{ galat }}{% endcall %}{% endif %}
|
||||
<div class="card">
|
||||
{% if google_aktif %}
|
||||
<div class="card mb-6" id="akun-google">
|
||||
{{ ui.card_header('Akun Google', sub='Masuk tanpa password memakai akun Google kampus (@' ~ google_domain ~ ' dan subdomainnya). Login NIP/NPM tetap bisa dipakai.', ikon='brand-google') }}
|
||||
<div class="card-body">
|
||||
{% if google_terhubung %}
|
||||
<p class="mb-4"><span class="badge bg-label-success me-2"><i class="icon-base ti tabler-circle-check icon-xs"></i> Terhubung</span>{{ email_akun }}</p>
|
||||
<form method="post" action="/akun/google/putus" onsubmit="return confirm('Putus akun Google? Anda tetap bisa masuk dengan NIP/NPM dan password.')">
|
||||
<button class="btn btn-label-danger" type="submit"><i class="icon-base ti tabler-unlink icon-sm me-1"></i>Putus akun Google</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<p class="mb-4 text-body-secondary">Belum terhubung.{% if email_akun %} Email terdaftar: <b>{{ email_akun }}</b> — masuk dengan Google memakai email ini akan terhubung otomatis.{% endif %}</p>
|
||||
<a class="btn btn-primary" href="/auth/google?tujuan=hubung"><i class="icon-base ti tabler-brand-google icon-sm me-1"></i>Hubungkan akun Google</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="card" id="akun-password">
|
||||
{{ ui.card_header('Ganti password', sub='Password awal sama dengan NIP/NPM. Sebaiknya segera diganti.', ikon='key') }}
|
||||
<div class="card-body">
|
||||
<form method="post" action="/akun">
|
||||
@@ -28,21 +44,5 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% if google_aktif %}
|
||||
<div class="card mt-6" id="akun-google">
|
||||
{{ ui.card_header('Akun Google', sub='Masuk tanpa password memakai akun Google kampus (@' ~ google_domain ~ ' dan subdomainnya). Login NIP/NPM tetap bisa dipakai.', ikon='brand-google') }}
|
||||
<div class="card-body">
|
||||
{% if google_terhubung %}
|
||||
<p class="mb-4"><span class="badge bg-label-success me-2"><i class="icon-base ti tabler-circle-check icon-xs"></i> Terhubung</span>{{ email_akun }}</p>
|
||||
<form method="post" action="/akun/google/putus" onsubmit="return confirm('Putus akun Google? Anda tetap bisa masuk dengan NIP/NPM dan password.')">
|
||||
<button class="btn btn-label-danger" type="submit"><i class="icon-base ti tabler-unlink icon-sm me-1"></i>Putus akun Google</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<p class="mb-4 text-body-secondary">Belum terhubung.{% if email_akun %} Email terdaftar: <b>{{ email_akun }}</b> — masuk dengan Google memakai email ini akan terhubung otomatis.{% endif %}</p>
|
||||
<a class="btn btn-primary" href="/auth/google?tujuan=hubung"><i class="icon-base ti tabler-brand-google icon-sm me-1"></i>Hubungkan akun Google</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div></div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
</div>
|
||||
</li>
|
||||
<li><div class="dropdown-divider my-1 mx-n2"></div></li>
|
||||
<li><a class="dropdown-item" href="/akun"><i class="icon-base ti tabler-key icon-md me-3"></i><span>Ganti password</span></a></li>
|
||||
<li><a class="dropdown-item" href="/akun"><i class="icon-base ti tabler-settings icon-md me-3"></i><span>Pengaturan</span></a></li>
|
||||
<li><a class="dropdown-item" href="/keluar"><i class="icon-base ti tabler-logout icon-md me-3"></i><span>Keluar</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@@ -21,13 +21,24 @@
|
||||
akses memerlukan akun. Hubungi kaprodi bila belum punya.</p>
|
||||
{% endif %}
|
||||
|
||||
{% if pesan %}
|
||||
{% if info == 'hubung' %}
|
||||
<div class="alert alert-info mb-6" role="status">
|
||||
<div class="d-flex align-items-center gap-2 fw-medium mb-2"><i class="icon-base ti tabler-brand-google icon-md"></i>Akun Google belum terhubung</div>
|
||||
{% if pesan %}<p class="small mb-2">{{ pesan }}</p>{% endif %}
|
||||
<ol class="small ps-3 mb-0">
|
||||
<li>Masuk sekali dengan <b>NIP/NPM dan password</b> di bawah.</li>
|
||||
<li>Buka <b>Pengaturan</b> — klik foto/inisial Anda di pojok kanan atas → <b>Pengaturan</b>. (Setelah masuk dari halaman ini, Anda langsung dibawa ke sana.)</li>
|
||||
<li>Pada kartu <b>Akun Google</b>, klik <b>Hubungkan akun Google</b>. Berikutnya cukup <b>Masuk dengan Google UNTAN</b>.</li>
|
||||
</ol>
|
||||
</div>
|
||||
{% elif pesan %}
|
||||
<div class="alert alert-danger d-flex align-items-center gap-2 py-2" role="alert">
|
||||
<i class="icon-base ti tabler-alert-triangle icon-md"></i>{{ pesan }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post" action="{{ '/setup' if mode == 'setup' else '/login' }}">
|
||||
{% if info == 'hubung' %}<input type="hidden" name="lanjut" value="pengaturan">{% endif %}
|
||||
{% if mode == 'setup' %}
|
||||
<div class="mb-4">
|
||||
<label class="form-label" for="nama">Nama lengkap (dengan gelar)</label>
|
||||
@@ -56,7 +67,7 @@
|
||||
<div class="divider my-5"><div class="divider-text">atau</div></div>
|
||||
<a class="btn btn-label-secondary d-flex align-items-center justify-content-center gap-2 w-100" href="/auth/google">
|
||||
<i class="icon-base ti tabler-brand-google icon-md"></i>Masuk dengan Google UNTAN</a>
|
||||
<div class="form-text text-center mt-2">Akun Google kampus yang sudah dihubungkan di menu Akun, atau yang emailnya terdaftar di aplikasi.</div>
|
||||
<div class="form-text text-center mt-2">Akun Google kampus yang sudah dihubungkan di menu <b>Pengaturan</b>, atau yang emailnya terdaftar di aplikasi.</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user