Merge pull request #2635 from FHenry/develop

fix typo
This commit is contained in:
Laurent Destailleur 2015-04-18 17:45:25 +02:00
commit 873899a5d4
10 changed files with 40 additions and 4 deletions

View File

@ -1730,6 +1730,9 @@ if ($action == 'create')
/*
* Action presend
*/
if (!empty(GETPOST('modelselected'))) {
$action = 'presend';
}
if ($action == 'presend')
{
$object->fetch_projet();
@ -1802,6 +1805,7 @@ if ($action == 'create')
// Tableau des parametres complementaires
$formmail->param['action'] = 'send';
$formmail->param['models'] = 'askpricesupplier_send';
$formmail->param['models_id']=GETPOST('modelmailselected','int');
$formmail->param['id'] = $object->id;
$formmail->param['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
// Init list of files

View File

@ -2307,6 +2307,10 @@ if ($action == 'create')
/*
* Action presend
*/
//Select mail models is same action as presend
if (!empty(GETPOST('modelselected'))) {
$action = 'presend';
}
if ($action == 'presend')
{
$object->fetch_projet();
@ -2401,6 +2405,7 @@ if ($action == 'create')
// Tableau des parametres complementaires
$formmail->param['action'] = 'send';
$formmail->param['models'] = 'propal_send';
$formmail->param['models_id']=GETPOST('modelmailselected','int');
$formmail->param['id'] = $object->id;
$formmail->param['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
// Init list of files

View File

@ -2396,6 +2396,7 @@ if ($action == 'create' && $user->rights->commande->creer)
// Tableau des parametres complementaires
$formmail->param['action'] = 'send';
$formmail->param['models'] = 'order_send';
$formmail->param['models_id']=GETPOST('modelmailselected','int');
$formmail->param['orderid'] = $object->id;
$formmail->param['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id;

View File

@ -3733,6 +3733,10 @@ if ($action == 'create')
}
print '<br>';
//Select mail models is same action as presend
if (!empty(GETPOST('modelselected'))) {
$action = 'presend';
}
if ($action != 'prerelance' && $action != 'presend')
{
print '<div class="fichecenter"><div class="fichehalfleft">';
@ -3953,6 +3957,7 @@ if ($action == 'create')
// Tableau des parametres complementaires du post
$formmail->param['action'] = $action;
$formmail->param['models'] = $modelmail;
$formmail->param['models_id']=GETPOST('modelmailselected','int');
$formmail->param['facid'] = $object->id;
$formmail->param['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id;

View File

@ -530,6 +530,9 @@ if ($resql)
print '<form id="form_unpaid" method="POST" action="'.$_SERVER["PHP_SELF"].'?sortfield='. $sortfield .'&sortorder='. $sortorder .'">';
if (!empty(GETPOST('modelselected'))) {
$action = 'presend';
}
if (! empty($mode) && $action == 'presend')
{
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
@ -572,6 +575,7 @@ if ($resql)
// Tableau des parametres complementaires du post
$formmail->param['action']=$action;
$formmail->param['models']=$modelmail;
$formmail->param['models_id']=GETPOST('modelmailselected','int');
$formmail->param['facid']=$object->id;
$formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id;

View File

@ -291,7 +291,8 @@ class FormMail extends Form
foreach($this->lines_model as $line) {
$modelmail_array[$line->id]=$line->label;
}
if (count($modelmail_array>0)) {
if (count($modelmail_array)>0) {
$out.= '<table class="nobordernopadding" width="100%"><tr><td width="20%">'."\n";
$out.= $langs->trans('SelectMailModel').':'.$this->selectarray('modelmailselected', $modelmail_array,$model_id);
$out.= '</td>';
@ -857,12 +858,11 @@ class FormMail extends Form
}
}
class ModelMailLine
class ModelMailLine
{
public $id;
public $label;
public $topic;
public $content;
public $lang;
}
}

View File

@ -1513,6 +1513,10 @@ else if ($id || $ref)
/*
* Action presend
*/
//Select mail models is same action as presend
if (!empty(GETPOST('modelselected'))) {
$action = 'presend';
}
if ($action == 'presend')
{
$ref = dol_sanitizeFileName($object->ref);
@ -1611,6 +1615,7 @@ else if ($id || $ref)
// Tableau des parametres complementaires
$formmail->param['action']='send';
$formmail->param['models']='shipping_send';
$formmail->param['models_id']=GETPOST('modelmailselected','int');
$formmail->param['shippingid']=$object->id;
$formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id;

View File

@ -1732,6 +1732,9 @@ else if ($id > 0 || ! empty($ref))
/*
* Action presend
*/
if (!empty(GETPOST('modelselected'))) {
$action = 'presend';
}
if ($action == 'presend')
{
$ref = dol_sanitizeFileName($object->ref);
@ -1819,6 +1822,7 @@ else if ($id > 0 || ! empty($ref))
// Tableau des parametres complementaires
$formmail->param['action']='send';
$formmail->param['models']='fichinter_send';
$formmail->param['models_id']=GETPOST('modelmailselected','int');
$formmail->param['fichinter_id']=$object->id;
$formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id;

View File

@ -2246,6 +2246,9 @@ elseif (! empty($object->id))
/*
* Action presend
*/
if (!empty(GETPOST('modelselected'))) {
$action = 'presend';
}
if ($action == 'presend')
{
$ref = dol_sanitizeFileName($object->ref);
@ -2338,6 +2341,7 @@ elseif (! empty($object->id))
// Tableau des parametres complementaires
$formmail->param['action']='send';
$formmail->param['models']='order_supplier_send';
$formmail->param['models_id']=GETPOST('modelmailselected','int');
$formmail->param['orderid']=$object->id;
$formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id;

View File

@ -2499,6 +2499,9 @@ else
/*
* Show mail form
*/
if (!empty(GETPOST('modelselected'))) {
$action = 'presend';
}
if ($action == 'presend')
{
$ref = dol_sanitizeFileName($object->ref);
@ -2585,6 +2588,7 @@ else
// Tableau des parametres complementaires
$formmail->param['action']='send';
$formmail->param['models']='invoice_supplier_send';
$formmail->param['models_id']=GETPOST('modelmailselected','int');
$formmail->param['facid']=$object->id;
$formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id;