diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2013-11-21 13:56:03 -0800 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2013-11-21 13:56:03 -0800 |
commit | be33d37c897510e5d6b51780d838114664c2565c (patch) | |
tree | c2e8d43b141a7ad5ca0267a54a7ad15a76a43b36 | |
parent | 38994965f2065771db39dc55ae9b5755940465ab (diff) | |
parent | 253f8d75934492a460a9e38cb948f792e01096f5 (diff) | |
download | forums-be33d37c897510e5d6b51780d838114664c2565c.tar forums-be33d37c897510e5d6b51780d838114664c2565c.tar.gz forums-be33d37c897510e5d6b51780d838114664c2565c.tar.bz2 forums-be33d37c897510e5d6b51780d838114664c2565c.tar.xz forums-be33d37c897510e5d6b51780d838114664c2565c.zip |
Merge pull request #1856 from prototech/ticket/12001
[ticket/12001] Ensure that form data is sent to server in AJAX requests.
-rw-r--r-- | phpBB/assets/javascript/core.js | 2 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/confirm_body.html | 17 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/confirm_delete_body.html | 40 |
3 files changed, 31 insertions, 28 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 98f00e1d58..8d0db5da1a 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -336,7 +336,7 @@ phpbb.ajaxify = function(options) { $.ajax({ url: res.S_CONFIRM_ACTION, type: 'POST', - data: data + '&confirm=' + res.YES_VALUE, + data: data + '&confirm=' + res.YES_VALUE + '&' + $('#phpbb_confirm form').serialize(), success: returnHandler, error: errorHandler }); diff --git a/phpBB/styles/prosilver/template/confirm_body.html b/phpBB/styles/prosilver/template/confirm_body.html index bf575c20fa..a0428025cf 100644 --- a/phpBB/styles/prosilver/template/confirm_body.html +++ b/phpBB/styles/prosilver/template/confirm_body.html @@ -1,12 +1,13 @@ <!-- IF S_AJAX_REQUEST --> - - <h3>{MESSAGE_TITLE}</h3> - <p>{MESSAGE_TEXT}</p> - - <fieldset class="submit-buttons"> - <input type="button" name="confirm" value="{L_YES}" class="button2" /> - <input type="button" name="cancel" value="{L_NO}" class="button2" /> - </fieldset> + <form action="{S_CONFIRM_ACTION}" method="post"> + <h3>{MESSAGE_TITLE}</h3> + <p>{MESSAGE_TEXT}</p> + + <fieldset class="submit-buttons"> + <input type="button" name="confirm" value="{L_YES}" class="button2" /> + <input type="button" name="cancel" value="{L_NO}" class="button2" /> + </fieldset> + </form> <!-- ELSE --> diff --git a/phpBB/styles/prosilver/template/confirm_delete_body.html b/phpBB/styles/prosilver/template/confirm_delete_body.html index 759b6b46b2..dc09974d1c 100644 --- a/phpBB/styles/prosilver/template/confirm_delete_body.html +++ b/phpBB/styles/prosilver/template/confirm_delete_body.html @@ -1,27 +1,29 @@ <!-- IF S_AJAX_REQUEST --> - <p>{MESSAGE_TEXT}</p> + <form action="{S_CONFIRM_ACTION}" method="post"> + <p>{MESSAGE_TEXT}</p> - <!-- IF not S_SOFTDELETED and (S_DELETE_REASON or (S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE)) --> - <!-- IF S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE --> - <label> - <strong>{L_DELETE_PERMANENTLY}{L_COLON}</strong> - <input id="delete_permanent" name="delete_permanent" type="checkbox" value="1" {S_CHECKED_PERMANENT} /> - <!-- IF S_TOPIC_MODE -->{L_DELETE_TOPIC_PERMANENTLY}<!-- ELSE -->{L_DELETE_POST_PERMANENTLY}<!-- ENDIF --> - </label> - <!-- ENDIF --> + <!-- IF not S_SOFTDELETED and (S_DELETE_REASON or (S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE)) --> + <!-- IF S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE --> + <label> + <strong>{L_DELETE_PERMANENTLY}{L_COLON}</strong> + <input id="delete_permanent" name="delete_permanent" type="checkbox" value="1" {S_CHECKED_PERMANENT} /> + <!-- IF S_TOPIC_MODE -->{L_DELETE_TOPIC_PERMANENTLY}<!-- ELSE -->{L_DELETE_POST_PERMANENTLY}<!-- ENDIF --> + </label> + <!-- ENDIF --> - <!-- IF S_DELETE_REASON --> - <label for="delete_reason"> - <strong>{L_DELETE_REASON}{L_COLON}</strong><br /><span>{L_DELETE_REASON_EXPLAIN}</span><br /> - <input type="text" name="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" /> - </label> + <!-- IF S_DELETE_REASON --> + <label for="delete_reason"> + <strong>{L_DELETE_REASON}{L_COLON}</strong><br /><span>{L_DELETE_REASON_EXPLAIN}</span><br /> + <input type="text" name="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" /> + </label> + <!-- ENDIF --> <!-- ENDIF --> - <!-- ENDIF --> - <fieldset class="submit-buttons"> - <input type="button" name="confirm" value="{L_YES}" class="button1" /> - <input type="button" name="cancel" value="{L_NO}" class="button2" /> - </fieldset> + <fieldset class="submit-buttons"> + <input type="button" name="confirm" value="{L_YES}" class="button1" /> + <input type="button" name="cancel" value="{L_NO}" class="button2" /> + </fieldset> + </form> <!-- ELSE --> |