handlerpageedit: Retain comment when clicking preview
This commit is contained in:
parent
00392e2469
commit
e4562809a0
@ -114,7 +114,7 @@ Response HandlerPageEdit::handleRequest(PageDao &pageDao, std::string pagename,
|
|||||||
templatePage.setVar("content", newContent);
|
templatePage.setVar("content", newContent);
|
||||||
setPageVars(templatePage, pagename);
|
setPageVars(templatePage, pagename);
|
||||||
templatePage.setVar("title", createPageTitle("Preview: " + pagename));
|
templatePage.setVar("title", createPageTitle("Preview: " + pagename));
|
||||||
|
templatePage.setVar("comment", r.post("comment"));
|
||||||
Response response;
|
Response response;
|
||||||
response.setBody(templatePage.render());
|
response.setBody(templatePage.render());
|
||||||
return response;
|
return response;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<button type="submit" name="do" value="preview">Preview</button>
|
<button type="submit" name="do" value="preview">Preview</button>
|
||||||
<textarea name="content" style="width: 100%;" rows=70>{qswiki:var:content}</textarea>
|
<textarea name="content" style="width: 100%;" rows=70>{qswiki:var:content}</textarea>
|
||||||
<br><b>Comment:</b><br>
|
<br><b>Comment:</b><br>
|
||||||
<input type="text" name="comment" size=50><br>
|
<input type="text" name="comment" size="50" value="{qswiki:var:comment}"/><br>
|
||||||
<input type="hidden" name="csrf_token" value="{qswiki:var:csrf_token}"></input>
|
<input type="hidden" name="csrf_token" value="{qswiki:var:csrf_token}"></input>
|
||||||
<button type="submit" name="do" value="submit">Submit</button>
|
<button type="submit" name="do" value="submit">Submit</button>
|
||||||
<button type="submit" name="do" value="preview">Preview</button>
|
<button type="submit" name="do" value="preview">Preview</button>
|
||||||
|
@ -8,7 +8,7 @@ This is a preview of your changes:<br>
|
|||||||
<button type="submit" name="do" value="preview">Preview</button>
|
<button type="submit" name="do" value="preview">Preview</button>
|
||||||
<textarea name="content" style="width: 100%;" rows=70>{qswiki:var:content}</textarea>
|
<textarea name="content" style="width: 100%;" rows=70>{qswiki:var:content}</textarea>
|
||||||
<br><b>Comment:</b><br>
|
<br><b>Comment:</b><br>
|
||||||
<input type="text" name="comment" size=50><br>
|
<input type="text" name="comment" size="50" value="{qswiki:var:comment}"/><br>
|
||||||
<input type="hidden" name="csrf_token" value="{qswiki:var:csrf_token}"></input>
|
<input type="hidden" name="csrf_token" value="{qswiki:var:csrf_token}"></input>
|
||||||
<button type="submit" name="do" value="submit">Submit</button>
|
<button type="submit" name="do" value="submit">Submit</button>
|
||||||
<button type="submit" name="do" value="preview">Preview</button>
|
<button type="submit" name="do" value="preview">Preview</button>
|
||||||
|
Loading…
Reference in New Issue
Block a user