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 @@ ...@@ -62,12 +62,21 @@
</button> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p>Sila konfirmasi penghapusan akun dengan tekan tombol hapus di bawah</p> <p>Anda akan menghapus akun admin dengan email
</div> <span class="bg-danger pr-1 pl-1 text-white" style="text-transform: lowercase">{{current.email}}</span>
<div class="modal-footer"> . Lakukan konfirmasi penghapusan dengan mengetik: </p>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Batal</button> <p class="bg-danger text-white p-1"> {{current.email}} </p>
<a href="/administration/hapus-admin/{{current.id}}/" type="button" class="btn btn-danger">Hapus</a>
</div> </div>
{% 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}}/" id="btn-hapus-{{current.id}}" type="button" class="btn btn-danger disabled">Hapus</a>
</div> </div>
</div> </div>
</div> </div>
...@@ -118,4 +127,14 @@ ...@@ -118,4 +127,14 @@
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript">
function checkValue(element){
buttonElement = document.getElementById("btn-hapus-" + element.id)
if(element.value != element.name) {
} else {
{% endblock %} {% 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