Commit 57214b03e7605f44b2e058b21c3fd8d7b093c580

Authored by nbm
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
templates/ktcore/document/add.smarty
... ... @@ -60,7 +60,6 @@ addLoadEvent(startupMetadata);
60 60 <form method="POST" action="{$smarty.server.PHP_SELF|addQueryString:"postExpected=1&fFolderId="}{$context->oFolder->getId()}" enctype="multipart/form-data">
61 61 <fieldset><legend>{i18n}Add a document{/i18n}</legend>
62 62 <input type="hidden" name="action" value="upload">
63   -<input type="hidden" name="postReceived" value="1">
64 63 <input type="hidden" name="fFolderId" value="{$context->oFolder->getId()}">
65 64  
66 65 {foreach from=$add_fields item=oWidget }
... ... @@ -78,6 +77,7 @@ addLoadEvent(startupMetadata);
78 77 </div>
79 78  
80 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 81 </div>
  82 +<input type="hidden" name="postReceived" value="1" />
83 83 </form>
... ...
templates/ktcore/folder/bulkUpload.smarty
... ... @@ -44,7 +44,7 @@ addLoadEvent(startupMetadata);
44 44 {/capture}
45 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 48 <fieldset><legend>{i18n}Bulk import{/i18n}</legend>
49 49 <p class="descriptiveText">{i18n}The bulk upload facility allows for a number
50 50 of documents to be added to the document management system.
... ... @@ -72,4 +72,5 @@ management system.{/i18n}&lt;/p&gt;
72 72 <div class="form_actions">
73 73 <input type="submit" name="submit" value="{i18n}Upload{/i18n}" />
74 74 </div>
  75 +<input type="hidden" name="postReceived" value="1" />
75 76 </form>
... ...