Role management, login logic, and debug improvements. MariaDB login now uses correct syntax.
This commit is contained in:
@@ -25,6 +25,22 @@
|
||||
<a href="{{ url_for('warehouse.import_locations_csv') }}" class="btn" style="padding: 4px 12px; font-size: 0.95em;">Go to Import Page</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Delete Location Area -->
|
||||
{% if session['role'] in ['administrator', 'management'] %}
|
||||
<div style="margin-top: 32px; padding: 12px; border-top: 1px solid #eee;">
|
||||
<label style="font-weight:bold;">Delete location from table</label>
|
||||
<div style="font-size:0.95em; margin-bottom:8px;">To delete a location, enter the ID of the location and press delete.<br>To delete 2 or multiple locations, enter the IDs separated by "," and then press delete.</div>
|
||||
<form method="POST" style="display:flex; gap:8px; align-items:center;" onsubmit="return confirmDeleteLocations();">
|
||||
<input type="text" name="delete_ids" placeholder="e.g. 5,7,12" style="width:160px;">
|
||||
<button type="submit" name="delete_locations" value="1" class="btn" style="padding:4px 16px;">Delete Locations</button>
|
||||
</form>
|
||||
<script>
|
||||
function confirmDeleteLocations() {
|
||||
return confirm('Do you really want to delete the selected locations?');
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<!-- Locations Table Card -->
|
||||
<div class="card scan-table-card">
|
||||
|
||||
Reference in New Issue
Block a user