From 0340c17dc3533b939df3a169632c3b63f10e607c Mon Sep 17 00:00:00 2001 From: Javier Hernandez Date: Thu, 30 Nov 2023 11:30:46 +0100 Subject: views: Add placeholder for mac field Add a placeholder that shows the user an example of what a valid mac address looks like. By now, mac needs to be specified as AABBCCDDEEFF without : for historical reasons. --- ogcp/views.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ogcp') diff --git a/ogcp/views.py b/ogcp/views.py index 73bc4ba..32ae526 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -896,6 +896,7 @@ def action_client_update(): r = server.get('/client/info', payload) db_client = r.json() + form.mac.render_kw = {'placeholder': 'aabbccddeeaa'} form.server.data = "{0}:{1}".format(server.ip, server.port) form.ip.data = db_client['ip'] form.ip.render_kw = {'readonly': True} @@ -963,6 +964,7 @@ def action_client_add(): r = server.get('/mode') available_modes = [(mode, mode) for mode in r.json()['modes']] form.boot.choices = list(available_modes) + form.mac.render_kw = {'placeholder': 'aabbccddeeaa'} r = server.get('/scopes') room_id = params['scope-room'] -- cgit v1.2.3-18-g5258