mirror of
https://github.com/gryf/wicd.git
synced 2025-12-20 04:48:00 +01:00
Make the templating system more robust to custom fields
This commit is contained in:
@@ -403,7 +403,10 @@ class WirelessSettingsDialog(AdvancedSettingsDialog):
|
|||||||
for type_ in ['required', 'optional']:
|
for type_ in ['required', 'optional']:
|
||||||
fields = methods[ID][type_]
|
fields = methods[ID][type_]
|
||||||
for field in fields:
|
for field in fields:
|
||||||
edit = MaskingEdit(('editcp',language[field[1].lower().replace(' ','_')]+': '))
|
try:
|
||||||
|
edit = MaskingEdit(('editcp',language[field[1].lower().replace(' ','_')]+': '))
|
||||||
|
except KeyError:
|
||||||
|
edit = MaskingEdit(('editcp',field[1].replace(' ','_')+': '))
|
||||||
edit.set_mask_mode('no_focus')
|
edit.set_mask_mode('no_focus')
|
||||||
theList.append(edit)
|
theList.append(edit)
|
||||||
# Add the data to any array, so that the information
|
# Add the data to any array, so that the information
|
||||||
|
|||||||
@@ -536,7 +536,10 @@ class WirelessSettingsDialog(AdvancedSettingsDialog):
|
|||||||
for type_ in ['required', 'optional']:
|
for type_ in ['required', 'optional']:
|
||||||
fields = methods[ID][type_]
|
fields = methods[ID][type_]
|
||||||
for field in fields:
|
for field in fields:
|
||||||
field_text = language[field[1].lower().replace(' ','_')]
|
try:
|
||||||
|
field_text = language[field[1].lower().replace(' ','_')]
|
||||||
|
except KeyError:
|
||||||
|
field_text = field[1].replace(' ','_')
|
||||||
|
|
||||||
if field in methods[ID]['protected']:
|
if field in methods[ID]['protected']:
|
||||||
box = ProtectedLabelEntry(field_text)
|
box = ProtectedLabelEntry(field_text)
|
||||||
|
|||||||
Reference in New Issue
Block a user