diff options
author | Javier Hernandez <jhernandez@soleta.eu> | 2023-11-30 11:30:46 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2023-11-30 11:35:30 +0100 |
commit | 0340c17dc3533b939df3a169632c3b63f10e607c (patch) | |
tree | e668dae46b5bbd459f31c1b9b3a59e10b3ddc4ef /ogcp/views.py | |
parent | 7f932216171f98c5806b364cf6abfeb9f662b425 (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.
Diffstat (limited to 'ogcp/views.py')
-rw-r--r-- | ogcp/views.py | 2 |
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'] |