mirror of
https://github.com/pdxlocations/contact.git
synced 2026-05-04 04:22:15 +02:00
Merge pull request #41 from pdxlocations/fix-repeated-input
ignore-incoming work - still not saving
This commit is contained in:
@@ -102,7 +102,7 @@ def get_repeated_input(current_value):
|
||||
repeated_win.clear()
|
||||
repeated_win.border()
|
||||
repeated_win.addstr(1, 2, "Enter comma-separated values:", curses.A_BOLD)
|
||||
repeated_win.addstr(3, 2, f"Current: {', '.join(current_value)}")
|
||||
repeated_win.addstr(3, 2, f"Current: {', '.join(map(str, current_value))}")
|
||||
repeated_win.addstr(5, 2, f"New value: {user_input}")
|
||||
repeated_win.refresh()
|
||||
|
||||
|
||||
@@ -173,6 +173,7 @@ def settings_menu(sdscr, interface):
|
||||
|
||||
elif field.label == field.LABEL_REPEATED: # Handle repeated field
|
||||
new_value = get_repeated_input(current_value)
|
||||
new_value = current_value if new_value is None else [int(item) for item in new_value]
|
||||
|
||||
elif field.enum_type: # Enum field
|
||||
enum_options = [v.name for v in field.enum_type.values]
|
||||
|
||||
Reference in New Issue
Block a user