Merge branch 'master' of bitbucket.org:colosa/processmaker into BUG-12021

This commit is contained in:
norahmollo
2014-10-07 16:19:19 -04:00
5 changed files with 66 additions and 33 deletions

View File

@@ -929,6 +929,17 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
$Fields['APP_DOC_UID'] = $_POST['appDocId'];
$Fields['actionType'] = $_POST['actionType'];
$Fields['docVersion'] = $_POST['docVersion'];
$oInputDocument = new InputDocument();
$InpDocData = $oInputDocument->load( $Fields['DOC_UID'] );
$inpDocMaxFilesize = $InpDocData["INP_DOC_MAX_FILESIZE"];
$inpDocMaxFilesizeUnit = $InpDocData["INP_DOC_MAX_FILESIZE_UNIT"];
$inpDocMaxFilesize = $inpDocMaxFilesize * (($inpDocMaxFilesizeUnit == "MB")? 1024 *1024 : 1024); //Bytes
$Fields["INP_DOC_MAX_FILESIZE"] = $inpDocMaxFilesize;
$Fields["INP_DOC_MAX_FILESIZE_LABEL"] = ($inpDocMaxFilesize > 0)? "[" . $InpDocData["INP_DOC_MAX_FILESIZE"] . " " . $InpDocData["INP_DOC_MAX_FILESIZE_UNIT"] . "]" : "";
$Fields['fileTypes'] = $InpDocData['INP_DOC_TYPE_FILE'];
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_AttachInputDocumentGeneral', '', $Fields, 'cases_SupervisorSaveDocument?UID=' . $_POST['docID'] . '&APP_UID=' . $_POST['appDocId'] );
G::RenderPage( 'publish', 'raw' );
break;