mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Fixed problem with numeric attributes and multi edit
SVN revision: 2155
This commit is contained in:
parent
fbc419c45b
commit
ba2c76af62
@ -9584,6 +9584,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
strcpy(ua, attr_list[i]);
|
strcpy(ua, attr_list[i]);
|
||||||
stou(ua);
|
stou(ua);
|
||||||
|
|
||||||
|
rsprintf(" if (document.form1.%s.value != '- %s -') {\n", ua, loc("keep original values"));
|
||||||
rsprintf(" for (var i=0 ; i<document.form1.%s.value.length ; i++)\n", ua);
|
rsprintf(" for (var i=0 ; i<document.form1.%s.value.length ; i++)\n", ua);
|
||||||
rsprintf(" if (document.form1.%s.value.charAt(i) != \",\" &&\n", ua);
|
rsprintf(" if (document.form1.%s.value.charAt(i) != \",\" &&\n", ua);
|
||||||
rsprintf(" document.form1.%s.value.charAt(i) != \".\" &&\n", ua);
|
rsprintf(" document.form1.%s.value.charAt(i) != \".\" &&\n", ua);
|
||||||
@ -9596,6 +9597,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
rsprintf(" document.form1.%s.focus();\n", ua);
|
rsprintf(" document.form1.%s.focus();\n", ua);
|
||||||
rsprintf(" return false;\n");
|
rsprintf(" return false;\n");
|
||||||
rsprintf(" }\n");
|
rsprintf(" }\n");
|
||||||
|
rsprintf(" }\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (attr_flags[i] & (AF_DATE | AF_DATETIME)) {
|
if (attr_flags[i] & (AF_DATE | AF_DATETIME)) {
|
||||||
@ -21664,7 +21666,8 @@ void submit_elog(LOGBOOK * lbs)
|
|||||||
if (!isdigit(str[i]))
|
if (!isdigit(str[i]))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (i < (int) strlen(str) && strcmp(str, "<keep>") != 0) {
|
sprintf(str2, "- %s -", loc("keep original values"));
|
||||||
|
if (i < (int) strlen(str) && strcmp(str, "<keep>") != 0 && strcmp(str, str2) != 0) {
|
||||||
sprintf(error, loc("Error: Attribute <b>%s</b> must be numeric"), attr_list[index]);
|
sprintf(error, loc("Error: Attribute <b>%s</b> must be numeric"), attr_list[index]);
|
||||||
show_error(error);
|
show_error(error);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user