diff --git a/src/elogd.c b/src/elogd.c index a0adcbf0..9a35330b 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -9998,7 +9998,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL rsprintf(" last_key = 0;\n"); rsprintf(" return false;\n"); rsprintf(" }\n"); - rsprintf(" }\n"); + rsprintf(" }\n\n"); for (i = 0; i < n_attr; i++) { if ((attr_flags[i] & AF_REQUIRED) && !(attr_flags[i] & AF_LOCKED)) { @@ -10007,20 +10007,22 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL strcpy(ua, attr_list[i]); stou(ua); + rsprintf(" try {\n"); // try-catch block in case attributes are not there (conditional) + if (attr_flags[i] & AF_MULTI) { rsprintf(" if (\n"); for (j = 0; j < MAX_N_LIST && attr_options[i][j][0]; j++) { sprintf(str, "%s_%d", ua, j); - rsprintf(" !document.form1.%s.checked", str); + rsprintf(" !document.form1.%s.checked", str); if (attr_options[i][j + 1][0]) rsprintf(" &&\n"); } rsprintf(") {\n"); sprintf(str, loc("Please select at least one '%s'"), attr_list[i]); - rsprintf(" alert(\"%s\");\n", str); - rsprintf(" document.form1.%s_0.focus();\n", ua); - rsprintf(" return false;\n"); - rsprintf(" }\n"); + rsprintf(" alert(\"%s\");\n", str); + rsprintf(" document.form1.%s_0.focus();\n", ua); + rsprintf(" return false;\n"); + rsprintf(" }\n"); } else if (attr_flags[i] & (AF_MUSERLIST | AF_MUSEREMAIL)) { rsprintf(" if (\n"); @@ -10030,111 +10032,120 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL get_user_line(lbs, login_name, NULL, NULL, NULL, NULL, NULL, NULL); sprintf(str, "%s_%d", ua, j); - rsprintf(" !document.form1.%s.checked", str); + rsprintf(" !document.form1.%s.checked", str); if (enum_user_line(lbs, j + 1, login_name, sizeof(login_name))) rsprintf(" &&\n"); } rsprintf(") {\n"); sprintf(str, loc("Please select at least one '%s'"), attr_list[i]); - rsprintf(" alert(\"%s\");\n", str); - rsprintf(" document.form1.%s_0.focus();\n", ua); - rsprintf(" return false;\n"); - rsprintf(" }\n"); + rsprintf(" alert(\"%s\");\n", str); + rsprintf(" document.form1.%s_0.focus();\n", ua); + rsprintf(" return false;\n"); + rsprintf(" }\n"); } else if (attr_flags[i] & AF_RADIO) { - rsprintf(" for (var i=0 ; i \"9\")) { break }\n", ua); - rsprintf(" if (i \"9\")) { break }\n", ua); + rsprintf(" if (i \"9\")) { break }\n", i); - rsprintf(" if (i \"9\")) { break }\n", i); + rsprintf(" if (iIDESourceControlProjectIdentifier 81431534-03C4-4F18-8910-AA341A0BBED2 IDESourceControlProjectName - project + elogd IDESourceControlProjectOriginsDictionary 4A8AA611133AD3F7E07C7C33DCF50244FB7A1AB5 @@ -16,7 +16,7 @@ bitbucket.org:ritt/elog.git IDESourceControlProjectPath - xcode/elogd.xcodeproj/project.xcworkspace + xcode/elogd.xcodeproj IDESourceControlProjectRelativeInstallPathDictionary 4A8AA611133AD3F7E07C7C33DCF50244FB7A1AB5