Fakultas Ilmu Komputer UI

Commit 0acac0a2 authored by Fadhil's avatar Fadhil
Browse files

Make confirmation input type in delete admin

parent 9c28c3c1
Pipeline #57094 passed with stages
in 7 minutes and 32 seconds
......@@ -62,12 +62,21 @@
<div class="modal-body">
<p>Sila konfirmasi penghapusan akun dengan tekan tombol hapus di bawah</p>
<p>Anda akan menghapus akun admin dengan email
<span class="bg-danger pr-1 pl-1 text-white" style="text-transform: lowercase">{{current.email}}</span>
. Lakukan konfirmasi penghapusan dengan mengetik: </p>
<p class="bg-danger text-white p-1"> {{current.email}} </p>
{% csrf_token %}
<div class="form-group pl-3 pr-3">
<input name="{{ current.email }}" class="form-control" id="{{ current.id }}"required pattern="{{current.email}}" oninput="checkValue(this)">
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Batal</button>
<a href="/administration/hapus-admin/{{current.id}}/" type="button" class="btn btn-danger">Hapus</a>
<a href="/administration/hapus-admin/{{current.id}}/" id="btn-hapus-{{current.id}}" type="button" class="btn btn-danger disabled">Hapus</a>
......@@ -118,4 +127,14 @@
<script type="text/javascript">
function checkValue(element){
buttonElement = document.getElementById("btn-hapus-" + element.id)
if(element.value != element.name) {
} else {
{% endblock %}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment