From 1f2fedba95be7bfa90ef42fedbcff82b2822fe61 Mon Sep 17 00:00:00 2001 From: ske087 Date: Wed, 8 Jul 2026 23:06:33 +0300 Subject: [PATCH] IT Assets: bulk-entry mode for Add Asset form - Green info banner explains that hardware fields persist between saves - Identifiers section badge shows 'These fields clear after each save' - MAC Address gets same warning hint - Submit button relabelled 'Save & Add Next' in add mode - 'Reset All' button clears localStorage and the entire form - localStorage saves all shared fields on submit; restores on page load (only Service Tag, Asset Tag and MAC Address are cleared each time) - Cursor auto-focuses Service Tag field for fast keyboard entry - Dell pre-fill still takes priority over stored state --- .../app/templates/assets/form.html | 174 +++++++++++++++--- 1 file changed, 148 insertions(+), 26 deletions(-) diff --git a/IT_asset_management/app/templates/assets/form.html b/IT_asset_management/app/templates/assets/form.html index cffe75a..44048a9 100644 --- a/IT_asset_management/app/templates/assets/form.html +++ b/IT_asset_management/app/templates/assets/form.html @@ -13,36 +13,60 @@
+ {% if not asset and prefill and prefill.service_tag %}
Pre-filled from Dell service tag {{ prefill.service_tag }}. Review the details below before saving.
{% endif %} -
-
Identifiers
+ {# ── Bulk-entry hint (Add mode only) ── #} + {% if not asset %} +
+ + + Bulk-entry mode: after saving, all hardware details are kept so you can + add the next asset from the same batch by only changing the + Service Tag and Asset Tag. + Use Reset All to start a completely new entry. + +
+ {% endif %} + + + + {# ── Identifiers ─────────────────────────────────────────────────── #} +
+
Identifiers
+ {% if not asset %} + + These fields clear after each save + + {% endif %} +
- + placeholder="e.g. ABC1234" required autocomplete="off">
Used as both the service tag and serial number.
- + placeholder="Internal barcode/tag" autocomplete="off">
+ {# ── Classification ──────────────────────────────────────────────── #}
Classification
- {% for t in asset_types %}
+ {# ── Technical Specs ─────────────────────────────────────────────── #}
Technical Specs
-
-
-
-
- + + {% if not asset %} +
Clears after each save
+ {% endif %}
-
+ {# ── Procurement ─────────────────────────────────────────────────── #}
Procurement
-
-
-
- {% for val, label in asset_statuses %} {% endfor %} @@ -129,28 +159,120 @@
-
-
- +
-
+
+ {% if not asset %} + + {% endif %} Cancel + class="btn btn-outline-secondary ms-auto">Cancel
{% endblock %} + +{% block extra_js %} +{% if not asset %} + +{% endif %} +{% endblock %} +