Fixed problem with self registration

This commit is contained in:
Stefan Ritt 2015-03-25 10:09:03 +01:00
parent 2c76f5ce69
commit 945cd7a80a
2 changed files with 9 additions and 4 deletions

View File

@ -9452,9 +9452,9 @@ int check_drafts(LOGBOOK * lbs)
el_retrieve(lbs, draft_id[i], datetime, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, el_retrieve(lbs, draft_id[i], datetime, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, draft); NULL, NULL, draft);
rsprintf("<tr><td class=\"dlgform\" align=\"center\">"); rsprintf("<tr><td class=\"draftsel\" align=\"center\">");
rsprintf("Draft entry created on %s</td>\n", datetime); rsprintf("Draft entry created on %s</td>\n", datetime);
rsprintf("<td class=\"dlgform\">"); rsprintf("<td class=\"draftsel\">");
rsprintf("<input type=button value=\"%s\" onClick=\"window.location.href='%d?cmd=Edit';\">", rsprintf("<input type=button value=\"%s\" onClick=\"window.location.href='%d?cmd=Edit';\">",
loc("Edit"), draft_id[i]); loc("Edit"), draft_id[i]);
rsprintf("</td></tr>\n"); rsprintf("</td></tr>\n");
@ -27641,7 +27641,7 @@ void interprete(char *lbook, char *path)
return; return;
} }
if (strieq(command, loc("Save")) && !isparam("cfgpage")) { if (strieq(command, loc("Save")) && !isparam("cfgpage") && !isparam("new_user_name")) {
/* save draft message */ /* save draft message */
if (isparam("unm")) if (isparam("unm"))
strlcpy(str, getparam("unm"), sizeof(str)); strlcpy(str, getparam("unm"), sizeof(str));
@ -27779,7 +27779,7 @@ void interprete(char *lbook, char *path)
return; return;
} }
if (strieq(command, loc("Save")) && isparam("cfgpage")) { if (strieq(command, loc("Save")) && (isparam("cfgpage") || isparam("new_user_name"))) {
if (isparam("config") && isparam("new_user_name")) { if (isparam("config") && isparam("new_user_name")) {
if (!strieq(getparam("config"), getparam("new_user_name"))) { if (!strieq(getparam("config"), getparam("new_user_name"))) {
if (get_user_line(lbs, getparam("new_user_name"), NULL, NULL, NULL, NULL, NULL, NULL) == 1) { if (get_user_line(lbs, getparam("new_user_name"), NULL, NULL, NULL, NULL, NULL, NULL) == 1) {

View File

@ -349,6 +349,11 @@ td {
text-align:center; text-align:center;
} }
.draftsel {
background-color:#DDEEBB;
padding:5px;
border-bottom:1px solid #486090;
}
/* attachment line */ /* attachment line */
.attachment { .attachment {