From 18fead559c3143d04fdd6bc686e1aca509e61e50 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 4 Jan 2022 12:56:28 +0100 Subject: [PATCH] first step for render actions view --- ereuse_devicehub/inventory/forms.py | 8 ++++++++ ereuse_devicehub/static/js/main_inventory.js | 4 ++-- ereuse_devicehub/templates/inventory/actions.html | 13 ++++--------- .../templates/inventory/device_list.html | 1 + 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index 8fc94671..ea7f7c4c 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -73,3 +73,11 @@ class LotForm(FlaskForm): return self.instance +class NewActionForm(FlaskForm): + name = StringField(u'Name') + date = StringField(u'Date') + severity = StringField(u'Severity') + description = StringField(u'Description') + + def save(self): + pass diff --git a/ereuse_devicehub/static/js/main_inventory.js b/ereuse_devicehub/static/js/main_inventory.js index f9a3c0bf..1f1b6d4c 100644 --- a/ereuse_devicehub/static/js/main_inventory.js +++ b/ereuse_devicehub/static/js/main_inventory.js @@ -1,4 +1,4 @@ -$(document) .ready(function() { + $(document) .ready(function() { $(".deviceSelect").on("change", deviceSelect); // $('#selectLot').selectpicker(); }) @@ -25,5 +25,5 @@ function deviceSelect() { } function newAction(action) { - return action; + console.log(action); } diff --git a/ereuse_devicehub/templates/inventory/actions.html b/ereuse_devicehub/templates/inventory/actions.html index 3216537a..2800c921 100644 --- a/ereuse_devicehub/templates/inventory/actions.html +++ b/ereuse_devicehub/templates/inventory/actions.html @@ -1,9 +1,9 @@