handlerpageedit: Retain comment when clicking preview
This commit is contained in:
vanhempi
00392e2469
commit
e4562809a0
@ -114,7 +114,7 @@ Response HandlerPageEdit::handleRequest(PageDao &pageDao, std::string pagename,
|
||||
templatePage.setVar("content", newContent);
|
||||
setPageVars(templatePage, pagename);
|
||||
templatePage.setVar("title", createPageTitle("Preview: " + pagename));
|
||||
|
||||
templatePage.setVar("comment", r.post("comment"));
|
||||
Response response;
|
||||
response.setBody(templatePage.render());
|
||||
return response;
|
||||
|
@ -5,10 +5,10 @@
|
||||
<button type="submit" name="do" value="preview">Preview</button>
|
||||
<textarea name="content" style="width: 100%;" rows=70>{qswiki:var:content}</textarea>
|
||||
<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>
|
||||
<button type="submit" name="do" value="submit">Submit</button>
|
||||
<button type="submit" name="do" value="preview">Preview</button>
|
||||
</form>
|
||||
</main>
|
||||
{qswiki:include:general_footer}
|
||||
{qswiki:include:general_footer}
|
||||
|
@ -8,10 +8,10 @@ This is a preview of your changes:<br>
|
||||
<button type="submit" name="do" value="preview">Preview</button>
|
||||
<textarea name="content" style="width: 100%;" rows=70>{qswiki:var:content}</textarea>
|
||||
<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>
|
||||
<button type="submit" name="do" value="submit">Submit</button>
|
||||
<button type="submit" name="do" value="preview">Preview</button>
|
||||
</form>
|
||||
</main>
|
||||
{qswiki:include:general_footer}
|
||||
{qswiki:include:general_footer}
|
||||
|
Ladataan…
Viittaa uudesa ongelmassa
Block a user