From 4f565255af3f841155012e89478a2fab8396273c Mon Sep 17 00:00:00 2001 From: Javier Hernandez Date: Fri, 24 Nov 2023 13:28:06 +0100 Subject: client: Remove 'netmask' in form Remove unnecessary field 'netmask' from forms used to create and update clients. Netmask is configured in rooms instead. --- ogcp/forms/action_forms.py | 1 - ogcp/views.py | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'ogcp') diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py index 4a18738..1918bf8 100644 --- a/ogcp/forms/action_forms.py +++ b/ogcp/forms/action_forms.py @@ -104,7 +104,6 @@ class ClientDetailsForm(FlaskForm): ip = StringField(label=_l('IP')) mac = StringField(label=_l('MAC')) serial_number = StringField(label=_l('Serial Number')) - netmask = StringField(label=_l('Netmask')) livedir = SelectField(label=_l('ogLive'), choices=[('ogLive', 'Default'),]) remote = BooleanField(label=_l('Remote')) diff --git a/ogcp/views.py b/ogcp/views.py index 72be70a..bf4fdb0 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -865,7 +865,7 @@ def action_client_update(): "maintenance": form.maintenance.data, "netiface": form.netiface.data, "repo_id": int(form.repo.data), - "netmask": form.netmask.data, + "netmask": "0", "remote": form.remote.data, "room": int(form.room.data), "name": form.name.data, @@ -898,7 +898,6 @@ def action_client_update(): form.name.data = db_client['name'] form.mac.data = db_client['mac'] form.serial_number.data = db_client['serial_number'] - form.netmask.data = db_client['netmask'] form.livedir.render_kw = {'readonly': True} form.remote.data = db_client['remote'] form.maintenance.data = db_client['maintenance'] @@ -931,7 +930,7 @@ def action_client_add(): "name": form.name.data, "netdriver": "generic", "netiface": form.netiface.data, - "netmask": form.netmask.data, + "netmask": "0", "remote": form.remote.data, "repo_id": int(form.repo.data), "room": int(form.room.data), -- cgit v1.2.3-18-g5258