prettify client listing page
This commit is contained in:
parent
5e2fc603cd
commit
84fc5afedb
|
@ -74,12 +74,12 @@
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ url_for('developer.client_detail', client_id=client.id) }}" class="btn btn-info">
|
<a href="{{ url_for('developer.client_detail', client_id=client.id) }}" class="icon">
|
||||||
<i class="fe fe-edit"></i>
|
<i class="fe fe-edit"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- TODO: uncomment when bringing back "Discover" feature
|
<!-- TODO: uncomment when bringing back "Discover" feature
|
||||||
<td>
|
<td>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<input type="hidden" name="form-name" value="switch-client-publish">
|
<input type="hidden" name="form-name" value="switch-client-publish">
|
||||||
|
@ -94,14 +94,15 @@
|
||||||
</td>
|
</td>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<form method="post"
|
<form method="post" id="delete-client-form">
|
||||||
onsubmit="return confirm('Please make sure no user is using this client. This operation is not reversible');">
|
|
||||||
<input type="hidden" name="form-name" value="delete-client">
|
<input type="hidden" name="form-name" value="delete-client">
|
||||||
<input type="hidden" name="client-id" value="{{ client.id }}">
|
<input type="hidden" name="client-id" value="{{ client.id }}">
|
||||||
<button type="submit" class="btn btn-danger">
|
<a href="javascript:{}"
|
||||||
|
class="icon delete-client">
|
||||||
<i class="fe fe-trash"></i>
|
<i class="fe fe-trash"></i>
|
||||||
</button>
|
</a>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -137,6 +138,18 @@
|
||||||
overlayClickDismiss: false,
|
overlayClickDismiss: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".delete-client").on("click", function (e) {
|
||||||
|
notie.confirm({
|
||||||
|
text: "This operation is not reversible, please confirm",
|
||||||
|
cancelCallback: () => {
|
||||||
|
// nothing to do
|
||||||
|
},
|
||||||
|
submitCallback: () => {
|
||||||
|
$(this).closest("form").submit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
$(".custom-switch-input").change(function (e) {
|
$(".custom-switch-input").change(function (e) {
|
||||||
// Only ask for confirmation when publishing, not when un-publishing
|
// Only ask for confirmation when publishing, not when un-publishing
|
||||||
if (e.target.checked) {
|
if (e.target.checked) {
|
||||||
|
|
Loading…
Reference in New Issue