summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Hernandez <jhernandez@soleta.eu>2023-11-30 11:30:46 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2023-11-30 11:35:30 +0100
commit0340c17dc3533b939df3a169632c3b63f10e607c (patch)
treee668dae46b5bbd459f31c1b9b3a59e10b3ddc4ef
parent7f932216171f98c5806b364cf6abfeb9f662b425 (diff)
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.
-rw-r--r--ogcp/views.py2
1 files changed, 2 insertions, 0 deletions
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']