From 00275d61ebf42978bf7f8625a12d24b294883c3b Mon Sep 17 00:00:00 2001 From: Oliver Date: Mon, 11 Oct 2021 10:25:36 +1100 Subject: [PATCH] Auto-focus on the 'sub_part' field --- InvenTree/part/templates/part/detail.html | 1 + InvenTree/templates/js/translated/bom.js | 1 + 2 files changed, 2 insertions(+) diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html index d240b53601..80762e437a 100644 --- a/InvenTree/part/templates/part/detail.html +++ b/InvenTree/part/templates/part/detail.html @@ -552,6 +552,7 @@ fields: fields, method: 'POST', title: '{% trans "Create BOM Item" %}', + focus: 'sub_part', onSuccess: function() { $('#bom-table').bootstrapTable('refresh'); } diff --git a/InvenTree/templates/js/translated/bom.js b/InvenTree/templates/js/translated/bom.js index ec37f71d15..dedf84e423 100644 --- a/InvenTree/templates/js/translated/bom.js +++ b/InvenTree/templates/js/translated/bom.js @@ -576,6 +576,7 @@ function loadBomTable(table, options) { constructForm(`/api/bom/${pk}/`, { fields: fields, title: '{% trans "Edit BOM Item" %}', + focus: 'sub_part', onSuccess: function() { reloadBomTable(table); }