BUG 8835 In all browsers to choose an output only. Doc or. Pdf Displa... SOLVED
- It was verified that no distinction was being the type of file that was downloaded. - Added code to identify the Tido powerful file so just download and display the correct download link.
This commit is contained in:
@@ -76,8 +76,20 @@ require_once 'classes/model/AppDocument.php';
|
||||
$oAppDocument = new AppDocument();
|
||||
$aFields = $oAppDocument->load($_GET['DOC']);
|
||||
$aFields['VIEW'] = G::LoadTranslation('ID_OPEN');
|
||||
$aFields['FILE1'] = 'cases_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=doc&random=' . rand();
|
||||
$aFields['FILE2'] = 'cases_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=pdf&random=' . rand();
|
||||
switch ($aOD ['OUT_DOC_GENERATE']) {
|
||||
case 'DOC':
|
||||
$aFields['FILE1'] = 'cases_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=doc&random=' . rand();
|
||||
break;
|
||||
case 'PDF':
|
||||
$aFields['FILE2'] = 'cases_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=pdf&random=' . rand();
|
||||
break;
|
||||
case 'BOTH':
|
||||
$aFields['FILE1'] = 'cases_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=doc&random=' . rand();
|
||||
$aFields['FILE2'] = 'cases_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=pdf&random=' . rand();
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
$G_PUBLISH = new Publisher;
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_ViewOutputDocumentToRevise', '', G::array_merges($aOD, $aFields), '');
|
||||
//
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
<FILE2 type="phpVariable"/>
|
||||
|
||||
|
||||
<APP_DOC_FILENAME1 type="link" value="@#VIEW" link="@#FILE1" target="_blank">
|
||||
<en>File (.doc)</en>
|
||||
</APP_DOC_FILENAME1>
|
||||
@@ -30,5 +31,15 @@
|
||||
<BACK type="button" onclick="history.go(-1);return false;">
|
||||
<en>Back</en>
|
||||
</BACK>
|
||||
<JS type="javascript"><![CDATA[
|
||||
if (@@FILE1 == '')
|
||||
{
|
||||
hideRowById('APP_DOC_FILENAME1');
|
||||
}
|
||||
if (@@FILE2 == '')
|
||||
{
|
||||
hideRowById('APP_DOC_FILENAME2');
|
||||
}
|
||||
|
||||
]]></JS>
|
||||
</dynaForm>
|
||||
Reference in New Issue
Block a user