diff --git a/kfet/templates/kfet/kpsul.html b/kfet/templates/kfet/kpsul.html
index 9d809bd9..e311318a 100644
--- a/kfet/templates/kfet/kpsul.html
+++ b/kfet/templates/kfet/kpsul.html
@@ -769,7 +769,7 @@ $(document).ready(function() {
// Reset functions
- function coolReset() {
+ function coolReset(give_tri_focus=true) {
resetAccountData();
articleId.val(0);
articleSelect.val('');
@@ -777,16 +777,17 @@ $(document).ready(function() {
displayMatchedArticles(articlesList);
triInput.val('');
resetBasket();
+ if (give_tri_focus)
+ triInput.focus();
}
- function hardReset() {
- coolReset();
+ function hardReset(give_tri_focus=true) {
+ coolReset(give_tri_focus);
articles_container.find('tr').remove();
articlesList = [];
resetCheckoutData();
getArticlesData();
getHistory();
-
}
// Shorcuts
@@ -796,7 +797,6 @@ $(document).ready(function() {
case 112:
// F1 - Cool reset
coolReset();
- triInput.focus();
return false;
case 113:
// F2 - Deposit
@@ -809,7 +809,6 @@ $(document).ready(function() {
case 121:
// F10 - Hard reset
hardReset();
- triInput.focus();
return false;
}
});
@@ -819,7 +818,6 @@ $(document).ready(function() {
// -----
hardReset();
- triInput.focus();
});
diff --git a/kfet/views.py b/kfet/views.py
index 88b6247d..5ea708d3 100644
--- a/kfet/views.py
+++ b/kfet/views.py
@@ -408,7 +408,6 @@ def kpsul(request):
data['checkout_form'] = KPsulCheckoutForm()
operation_formset = KPsulOperationFormSet(queryset=Operation.objects.none())
data['operation_formset'] = operation_formset
- print(operation_formset.empty_form)
return render(request, 'kfet/kpsul.html', data)
@permission_required('kfet.is_team')