From 9e95bed1544c45795a692ab5440b975721a7961a Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Fri, 19 Mar 2004 11:12:00 +0000 Subject: [PATCH] Implemented 'extendable options' for MOptions SVN revision: 838 --- src/elogd.c | 113 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 70 insertions(+), 43 deletions(-) diff --git a/src/elogd.c b/src/elogd.c index 235bf376..53691efc 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.302 2004/03/19 11:12:00 midas + Implemented 'extendable options' for MOptions + Revision 1.301 2004/03/19 10:30:56 midas Fixed bug with topgroup initialization @@ -6870,7 +6873,23 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL ("\n", ua); } else { - if (attr_flags[index] & AF_MULTI) { + + sprintf(str, loc("Add %s"), attr_list[index]); + if (strieq(getparam("extend"), str)) { + + rsprintf("\n"); + rsprintf(""); + rsprintf(loc("Add new option here"), attr_list[index]); + rsprintf(" : \n"); + + rsprintf + ("\n", + input_maxlen, ua, attrib[index]); + + rsprintf("\n"); + + } else if (attr_flags[index] & AF_MULTI) { + /* display multiple check boxes */ rsprintf("\n"); @@ -6893,7 +6912,13 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL rsprintf("
"); } + if (attr_flags[index] & AF_EXTENDABLE) { + sprintf(str, loc("Add %s"), attr_list[index]); + rsprintf("\n", str); + } + rsprintf("\n"); + } else if (attr_flags[index] & AF_RADIO) { /* display radio buttons */ rsprintf("\n"); @@ -6915,7 +6940,13 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL rsprintf("
"); } + if (attr_flags[index] & AF_EXTENDABLE) { + sprintf(str, loc("Add %s"), attr_list[index]); + rsprintf("\n", str); + } + rsprintf("\n"); + } else if (attr_flags[index] & AF_ICON) { /* display icons */ rsprintf("\n"); @@ -6949,56 +6980,41 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL rsprintf("\n"); - sprintf(str, loc("Add %s"), attr_list[index]); - if (strieq(getparam("extend"), str)) { + /* display drop-down box */ + rsprintf("\n", - input_maxlen, ua, attrib[index]); + /* display emtpy option */ + rsprintf("