Commit 57214b03e7605f44b2e058b21c3fd8d7b093c580
1 parent
cba06872
Use postExpected/postReceived trick to check the POST arrived totally
intact. Make sure postReceived is right at the bottom on the off-change it catches more edge cases that way. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4546 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
4 additions
and
3 deletions
templates/ktcore/document/add.smarty
| @@ -60,7 +60,6 @@ addLoadEvent(startupMetadata); | @@ -60,7 +60,6 @@ addLoadEvent(startupMetadata); | ||
| 60 | <form method="POST" action="{$smarty.server.PHP_SELF|addQueryString:"postExpected=1&fFolderId="}{$context->oFolder->getId()}" enctype="multipart/form-data"> | 60 | <form method="POST" action="{$smarty.server.PHP_SELF|addQueryString:"postExpected=1&fFolderId="}{$context->oFolder->getId()}" enctype="multipart/form-data"> |
| 61 | <fieldset><legend>{i18n}Add a document{/i18n}</legend> | 61 | <fieldset><legend>{i18n}Add a document{/i18n}</legend> |
| 62 | <input type="hidden" name="action" value="upload"> | 62 | <input type="hidden" name="action" value="upload"> |
| 63 | -<input type="hidden" name="postReceived" value="1"> | ||
| 64 | <input type="hidden" name="fFolderId" value="{$context->oFolder->getId()}"> | 63 | <input type="hidden" name="fFolderId" value="{$context->oFolder->getId()}"> |
| 65 | 64 | ||
| 66 | {foreach from=$add_fields item=oWidget } | 65 | {foreach from=$add_fields item=oWidget } |
| @@ -78,6 +77,7 @@ addLoadEvent(startupMetadata); | @@ -78,6 +77,7 @@ addLoadEvent(startupMetadata); | ||
| 78 | </div> | 77 | </div> |
| 79 | 78 | ||
| 80 | <div class="form_actions"> | 79 | <div class="form_actions"> |
| 81 | - <input type="submit" name="submit" value="{i18n}Add{/i18n}"> | 80 | + <input type="submit" name="submit" value="{i18n}Add{/i18n}" /> |
| 82 | </div> | 81 | </div> |
| 82 | +<input type="hidden" name="postReceived" value="1" /> | ||
| 83 | </form> | 83 | </form> |
templates/ktcore/folder/bulkUpload.smarty
| @@ -44,7 +44,7 @@ addLoadEvent(startupMetadata); | @@ -44,7 +44,7 @@ addLoadEvent(startupMetadata); | ||
| 44 | {/capture} | 44 | {/capture} |
| 45 | {$context->oPage->requireJSStandalone($sJavascript)} | 45 | {$context->oPage->requireJSStandalone($sJavascript)} |
| 46 | 46 | ||
| 47 | -<form method="POST" action="{$smarty.server.PHP_SELF}" enctype="multipart/form-data"> | 47 | +<form method="POST" action="{$smarty.server.PHP_SELF|addQueryString:"postExpected=1&fFolderId="}{$context->oFolder->getId()}" enctype="multipart/form-data"> |
| 48 | <fieldset><legend>{i18n}Bulk import{/i18n}</legend> | 48 | <fieldset><legend>{i18n}Bulk import{/i18n}</legend> |
| 49 | <p class="descriptiveText">{i18n}The bulk upload facility allows for a number | 49 | <p class="descriptiveText">{i18n}The bulk upload facility allows for a number |
| 50 | of documents to be added to the document management system. | 50 | of documents to be added to the document management system. |
| @@ -72,4 +72,5 @@ management system.{/i18n}</p> | @@ -72,4 +72,5 @@ management system.{/i18n}</p> | ||
| 72 | <div class="form_actions"> | 72 | <div class="form_actions"> |
| 73 | <input type="submit" name="submit" value="{i18n}Upload{/i18n}" /> | 73 | <input type="submit" name="submit" value="{i18n}Upload{/i18n}" /> |
| 74 | </div> | 74 | </div> |
| 75 | +<input type="hidden" name="postReceived" value="1" /> | ||
| 75 | </form> | 76 | </form> |