[dynui] Add concept of a secret user interface item

For interactive forms, the concept of a secret value becomes
meaningful (e.g. for password fields).

Add a flag to indicate that an item represents a secret value, and
allow this flag to be set via the "--secret" option of the "item"
command.

This flag has no meaning for menu items, but is silently accepted
anyway to keep the code size minimal.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2024-06-20 16:21:28 -07:00
parent 039019039e
commit 1c3c5e2b22
2 changed files with 9 additions and 0 deletions
+3
View File
@@ -44,6 +44,9 @@ struct dynamic_item {
/** Dynamic user interface item is default selection */
#define DYNUI_DEFAULT 0x0001
/** Dynamic user interface item represents a secret */
#define DYNUI_SECRET 0x0002
extern struct dynamic_ui * create_dynui ( const char *name, const char *title );
extern struct dynamic_item * add_dynui_item ( struct dynamic_ui *dynui,
const char *name,