geoip and config editor online
This commit is contained in:
@@ -87,7 +87,7 @@
|
||||
</span>
|
||||
<div style="display:flex;gap:8px;align-items:center">
|
||||
<button type="button" class="btn-ghost-sm" onclick="toggleAll()">Select all</button>
|
||||
<button type="submit" class="btn-danger-sm" onclick="return confirmBulkDelete()">Delete selected</button>
|
||||
<button type="submit" class="btn-danger-sm" data-confirm-fn="confirmBulkDelete">Delete selected</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -111,7 +111,9 @@
|
||||
{{range .Decisions}}
|
||||
<tr>
|
||||
<td><input type="checkbox" name="id" value="{{.ID}}" class="row-chk"></td>
|
||||
<td style="font-family:'JetBrains Mono',monospace;font-size:12px">{{.Value}}</td>
|
||||
<td style="font-family:'JetBrains Mono',monospace;font-size:12px">
|
||||
{{if eq .Scope "Country"}}{{countryFlag .Value}} {{end}}{{.Value}}
|
||||
</td>
|
||||
<td><span class="badge {{decisionBadgeClass .Type}}">{{.Type}}</span></td>
|
||||
<td><span class="badge badge-gray">{{.Scope}}</span></td>
|
||||
<td><span class="badge {{originBadgeClass .Origin}}">{{.Origin}}</span></td>
|
||||
@@ -122,7 +124,7 @@
|
||||
<form method="POST" action="/decisions/delete" style="display:inline">
|
||||
<input type="hidden" name="_csrf" value="{{$.CSRFToken}}">
|
||||
<input type="hidden" name="id" value="{{.ID}}">
|
||||
<button type="submit" class="btn-danger-sm" onclick="return confirm('Delete this decision?')">Delete</button>
|
||||
<button type="submit" class="btn-danger-sm" data-confirm="Delete this decision?">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -169,8 +171,8 @@ function toggleAll() {
|
||||
}
|
||||
function confirmBulkDelete() {
|
||||
var n = document.querySelectorAll('.row-chk:checked').length;
|
||||
if (n === 0) { alert('Select at least one decision.'); return false; }
|
||||
return confirm('Delete ' + n + ' decision(s)?');
|
||||
if (n === 0) { appModal.info('Select at least one decision.'); return null; }
|
||||
return 'Delete ' + n + ' decision(s)? This cannot be undone.';
|
||||
}
|
||||
</script>
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user