mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Fixed issue with "Save" button and "Show text = 0". Hide "Preview" button when "Show text = 0".
This commit is contained in:
parent
4af237d43a
commit
3c6435e3a8
@ -70,15 +70,18 @@ function asend() {
|
||||
|
||||
// get all form fields
|
||||
var f = new FormData(document.form1);
|
||||
var t;
|
||||
|
||||
// append text for CKEDITOR and textarea, respectively
|
||||
if (typeof f.delete == 'function') // not avalable in all browsers
|
||||
f.delete("Text");
|
||||
if (typeof(CKEDITOR) != 'undefined')
|
||||
t = CKEDITOR.instances.Text.getData();
|
||||
else
|
||||
else if (document.form1.Text != undefined)
|
||||
t = document.form1.Text.value;
|
||||
f.append("Text", t);
|
||||
|
||||
if (t != undefined)
|
||||
f.append("Text", t);
|
||||
|
||||
// add jcmd
|
||||
f.append("jcmd", "Save");
|
||||
|
||||
@ -10435,7 +10435,9 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
||||
loc("Submit"));
|
||||
rsprintf("<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return save_draft();\">\n",
|
||||
loc("Save"));
|
||||
rsprintf("<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return mark_submitted();\">\n",
|
||||
|
||||
if (!getcfg(lbs->name, "Show text", str, sizeof(str)) || atoi(str) == 1)
|
||||
rsprintf("<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return mark_submitted();\">\n",
|
||||
loc("Preview"));
|
||||
rsprintf("<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return mark_submitted();\">\n",
|
||||
loc("Back"));
|
||||
@ -11948,8 +11950,11 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
||||
loc("Submit"));
|
||||
rsprintf("<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return save_draft();\">\n",
|
||||
loc("Save"));
|
||||
rsprintf("<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return mark_submitted();\">\n",
|
||||
|
||||
if (!getcfg(lbs->name, "Show text", str, sizeof(str)) || atoi(str) == 1)
|
||||
rsprintf("<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return mark_submitted();\">\n",
|
||||
loc("Preview"));
|
||||
|
||||
rsprintf("<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return mark_submitted();\">\n",
|
||||
loc("Back"));
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user