[form] Add support for dynamically created interactive forms

Add support for presenting a dynamic user interface as an interactive
form, alongside the existing support for presenting a dynamic user
interface as a menu.

An interactive form may be used to allow a user to input (or edit)
values for multiple settings on a single screen, as a user-friendly
alternative to prompting for setting values via the "read" command.

In the present implementation, all input fields must fit on a single
screen (with no scrolling), and the only supported widget type is an
editable text box.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2024-05-31 10:10:53 +01:00
parent 1c3c5e2b22
commit f417f0b6a5
6 changed files with 616 additions and 0 deletions

View File

@@ -61,5 +61,6 @@ extern struct dynamic_item * dynui_shortcut ( struct dynamic_ui *dynui,
int key );
extern int show_menu ( struct dynamic_ui *dynui, unsigned long timeout,
const char *select, struct dynamic_item **selected );
extern int show_form ( struct dynamic_ui *dynui );
#endif /* _IPXE_DYNUI_H */

View File

@@ -418,6 +418,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define ERRFILE_des ( ERRFILE_OTHER | 0x00600000 )
#define ERRFILE_editstring ( ERRFILE_OTHER | 0x00610000 )
#define ERRFILE_widget_ui ( ERRFILE_OTHER | 0x00620000 )
#define ERRFILE_form_ui ( ERRFILE_OTHER | 0x00630000 )
/** @} */