Add hidden option MAIN_PROPAL_CHOOSE_ODT_DOCUMENT to enable choice of ODT document to use according to his status
This commit is contained in:
parent
ee52e1a487
commit
1f537300ea
@ -106,9 +106,12 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
$texte.= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
$texte.= '<input type="hidden" name="action" value="setModuleOptions">';
|
||||
$texte.= '<input type="hidden" name="param1" value="PROPALE_ADDON_PDF_ODT_PATH">';
|
||||
$texte.= '<input type="hidden" name="param2" value="PROPALE_ADDON_PDF_ODT_DEFAULT">';
|
||||
$texte.= '<input type="hidden" name="param3" value="PROPALE_ADDON_PDF_ODT_TOBILL">';
|
||||
$texte.= '<input type="hidden" name="param4" value="PROPALE_ADDON_PDF_ODT_CLOSED">';
|
||||
if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0)
|
||||
{
|
||||
$texte.= '<input type="hidden" name="param2" value="PROPALE_ADDON_PDF_ODT_DEFAULT">';
|
||||
$texte.= '<input type="hidden" name="param3" value="PROPALE_ADDON_PDF_ODT_TOBILL">';
|
||||
$texte.= '<input type="hidden" name="param4" value="PROPALE_ADDON_PDF_ODT_CLOSED">';
|
||||
}
|
||||
$texte.= '<table class="nobordernopadding" width="100%">';
|
||||
|
||||
// List of directories area
|
||||
@ -150,27 +153,30 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
{
|
||||
$texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
|
||||
// Model for creation
|
||||
$liste=ModelePDFPropales::liste_modeles($this->db);
|
||||
$texte.= '<table width="50%;">';
|
||||
$texte.= '<tr>';
|
||||
$texte.= '<td width="60%;">'.$langs->trans("DefaultModelPropalCreate").'</td>';
|
||||
$texte.= '<td colspan="">';
|
||||
$texte.= $form->selectarray('value2',$liste,$conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT);
|
||||
$texte.= "</td></tr>";
|
||||
|
||||
$texte.= '<tr>';
|
||||
$texte.= '<td width="60%;">'.$langs->trans("DefaultModelPropalToBill").'</td>';
|
||||
$texte.= '<td colspan="">';
|
||||
$texte.= $form->selectarray('value3',$liste,$conf->global->PROPALE_ADDON_PDF_ODT_TOBILL);
|
||||
$texte.= "</td></tr>";
|
||||
$texte.= '<tr>';
|
||||
|
||||
$texte.= '<td width="60%;">'.$langs->trans("DefaultModelPropalClosed").'</td>';
|
||||
$texte.= '<td colspan="">';
|
||||
$texte.= $form->selectarray('value4',$liste,$conf->global->PROPALE_ADDON_PDF_ODT_CLOSED);
|
||||
$texte.= "</td></tr>";
|
||||
$texte.= '</table>';
|
||||
if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0)
|
||||
{
|
||||
// Model for creation
|
||||
$liste=ModelePDFPropales::liste_modeles($this->db);
|
||||
$texte.= '<table width="50%;">';
|
||||
$texte.= '<tr>';
|
||||
$texte.= '<td width="60%;">'.$langs->trans("DefaultModelPropalCreate").'</td>';
|
||||
$texte.= '<td colspan="">';
|
||||
$texte.= $form->selectarray('value2',$liste,$conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT);
|
||||
$texte.= "</td></tr>";
|
||||
|
||||
$texte.= '<tr>';
|
||||
$texte.= '<td width="60%;">'.$langs->trans("DefaultModelPropalToBill").'</td>';
|
||||
$texte.= '<td colspan="">';
|
||||
$texte.= $form->selectarray('value3',$liste,$conf->global->PROPALE_ADDON_PDF_ODT_TOBILL);
|
||||
$texte.= "</td></tr>";
|
||||
$texte.= '<tr>';
|
||||
|
||||
$texte.= '<td width="60%;">'.$langs->trans("DefaultModelPropalClosed").'</td>';
|
||||
$texte.= '<td colspan="">';
|
||||
$texte.= $form->selectarray('value4',$liste,$conf->global->PROPALE_ADDON_PDF_ODT_CLOSED);
|
||||
$texte.= "</td></tr>";
|
||||
$texte.= '</table>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user