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");
-
- if (is_cond_attr(index)) {
- /* show "update" button only of javascript is not enabled */
- rsprintf("\n");
- }
-
- if (attr_flags[index] & AF_EXTENDABLE) {
- sprintf(str, loc("Add %s"), attr_list[index]);
- rsprintf("\n", str);
- }
+ if (attr_flags[index] & AF_EXTENDABLE) {
+ sprintf(str, loc("Add %s"), attr_list[index]);
+ rsprintf("\n", str);
}
rsprintf(" | \n");
@@ -13176,6 +13192,17 @@ int add_attribute_option(LOGBOOK * lbs, char *attrname, char *attrvalue)
/* find location of options */
sprintf(str, "Options %s", attrname);
p1 = (char *) find_param(buf, lbs->name, str);
+ if (p1 == NULL) {
+ sprintf(str, "MOptions %s", attrname);
+ p1 = (char *) find_param(buf, lbs->name, str);
+ }
+ if (p1 == NULL) {
+ sprintf(str, "ROptions %s", attrname);
+ p1 = (char *) find_param(buf, lbs->name, str);
+ }
+ if (p1 == NULL)
+ return 0;
+
p2 = strchr(p1, '\n');
if (*(p2 - 1) == '\r')
p2--;