Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: ChangeLog
This commit is contained in:
commit
2d8b544ace
@ -141,7 +141,7 @@ NEW: Added MMK currency (Myanmar Kyat)
|
||||
|
||||
Modules
|
||||
NEW: Module Partnership Management
|
||||
NEW: Experimental Module Event Organization Management
|
||||
NEW: Module Event Organization Management
|
||||
|
||||
|
||||
For developers or integrators:
|
||||
|
||||
@ -1560,7 +1560,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
// Create form popup
|
||||
$formquestion = array();
|
||||
if ($object->email) {
|
||||
$formquestion[] = array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => ($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL ?true:false));
|
||||
$formquestion[] = array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => (getDolGlobalString('ADHERENT_DEFAULT_SENDINFOBYMAIL') ? true : false));
|
||||
}
|
||||
if (!empty($conf->mailman->enabled) && !empty($conf->global->ADHERENT_USE_MAILMAN)) {
|
||||
$formquestion[] = array('type'=>'other', 'label'=>$langs->transnoentitiesnoconv("SynchroMailManEnabled"), 'value'=>'');
|
||||
@ -1591,7 +1591,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
$outputlangs->loadLangs(array("main", "members"));
|
||||
// Get email content from template
|
||||
$arraydefaultmessage = null;
|
||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_CANCELATION;
|
||||
$labeltouse = getDolGlobalString('ADHERENT_EMAIL_TEMPLATE_CANCELATION');
|
||||
|
||||
if (!empty($labeltouse)) {
|
||||
$arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse);
|
||||
|
||||
@ -972,10 +972,10 @@ class Adherent extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Fonction qui supprime l'adherent et les donnees associees
|
||||
* Fonction to delete a member and its data
|
||||
*
|
||||
* @param int $rowid Id of member to delete
|
||||
* @param User $user User object
|
||||
* @param User $user User object
|
||||
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
||||
* @return int <0 if KO, 0=nothing to do, >0 if OK
|
||||
*/
|
||||
|
||||
@ -440,6 +440,7 @@ class AdherentType extends CommonObject
|
||||
|
||||
/**
|
||||
* Function to delete the member's status
|
||||
* TODO Add param "User $user"
|
||||
*
|
||||
* @return int > 0 if OK, 0 if not found, < 0 if KO
|
||||
*/
|
||||
|
||||
@ -41,6 +41,7 @@ $langs->load("members");
|
||||
$rowid = GETPOST('rowid', 'int');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
$sall = GETPOST("sall", "alpha");
|
||||
@ -202,7 +203,7 @@ if ($action == 'update' && $user->rights->adherent->configurer) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($action == 'confirm_delete' && $user->rights->adherent->configurer) {
|
||||
if ($action == 'confirm_delete' && !empty($user->rights->adherent->configurer)) {
|
||||
$object->fetch($rowid);
|
||||
$res = $object->delete();
|
||||
|
||||
@ -448,7 +449,7 @@ if ($rowid > 0) {
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border centpercent">';
|
||||
print '<table class="tableforfield border centpercent">';
|
||||
|
||||
// Morphy
|
||||
print '<tr><td>'.$langs->trans("MembersNature").'</td><td class="valeur" >'.$object->getmorphylib($object->morphy).'</td>';
|
||||
@ -682,20 +683,23 @@ if ($rowid > 0) {
|
||||
print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
while ($i < $num && $i < $conf->liste_limit) {
|
||||
$adh = new Adherent($db);
|
||||
|
||||
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||
while ($i < $imaxinloop) {
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
$datefin = $db->jdate($objp->datefin);
|
||||
|
||||
$adh = new Adherent($db);
|
||||
$adh->lastname = $objp->lastname;
|
||||
$adh->firstname = $objp->firstname;
|
||||
$adh->datefin = $datefin;
|
||||
$adh->need_subscription = $objp->subscription;
|
||||
$adh->statut = $objp->status;
|
||||
|
||||
// Lastname
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Lastname
|
||||
if ($objp->company != '') {
|
||||
print '<td><a href="card.php?rowid='.$objp->rowid.'">'.img_object($langs->trans("ShowMember"), "user", 'class="paddingright"').$adh->getFullName($langs, 0, -1, 20).' / '.dol_trunc($objp->company, 12).'</a></td>'."\n";
|
||||
} else {
|
||||
@ -703,7 +707,7 @@ if ($rowid > 0) {
|
||||
}
|
||||
|
||||
// Login
|
||||
print "<td>".$objp->login."</td>\n";
|
||||
print "<td>".dol_escape_htmltag($objp->login)."</td>\n";
|
||||
|
||||
// Type
|
||||
/*print '<td class="nowrap">';
|
||||
@ -760,11 +764,15 @@ if ($rowid > 0) {
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($i == 0) {
|
||||
print '<tr><td colspan="7"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
||||
}
|
||||
|
||||
print "</table>\n";
|
||||
print '</div>';
|
||||
print '</form>';
|
||||
|
||||
if ($num > $conf->liste_limit) {
|
||||
if ($num > $limit) {
|
||||
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '');
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('members', 'languages'));
|
||||
|
||||
$id = GETPOST('rowid', 'int');
|
||||
$id = GETPOST('rowid', 'int') ? GETPOST('rowid', 'int') : GETPOST('id', 'int');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
$ref = GETPOST('ref', 'alphanohtml');
|
||||
@ -61,7 +61,12 @@ if ($cancel == $langs->trans("Cancel")) {
|
||||
if ($action == 'delete' && GETPOST('langtodelete', 'alpha')) {
|
||||
$object = new AdherentType($db);
|
||||
$object->fetch($id);
|
||||
$object->delMultiLangs(GETPOST('langtodelete', 'alpha'), $user);
|
||||
$result = $object->delMultiLangs(GETPOST('langtodelete', 'alpha'), $user);
|
||||
if ($result > 0) {
|
||||
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
|
||||
header("Location: ".$_SERVER["PHP_SELF"].'?id='.$id);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Add translation
|
||||
|
||||
@ -228,14 +228,14 @@ if ($action == 'edit') {
|
||||
|
||||
if ($val['type'] == 'textarea') {
|
||||
print '<textarea class="flat" name="'.$constname.'" id="'.$constname.'" cols="50" rows="5" wrap="soft">' . "\n";
|
||||
print $conf->global->{$constname};
|
||||
print getDolGlobalString($constname);
|
||||
print "</textarea>\n";
|
||||
} elseif ($val['type']== 'html') {
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor($constname, $conf->global->{$constname}, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%');
|
||||
$doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%');
|
||||
$doleditor->Create();
|
||||
} elseif ($val['type'] == 'yesno') {
|
||||
print $form->selectyesno($constname, $conf->global->{$constname}, 1);
|
||||
print $form->selectyesno($constname, getDolGlobalString($constname), 1);
|
||||
} elseif (preg_match('/emailtemplate:/', $val['type'])) {
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
|
||||
$formmail = new FormMail($db);
|
||||
@ -255,7 +255,7 @@ if ($action == 'edit') {
|
||||
$arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)) . $moreonlabel;
|
||||
}
|
||||
}
|
||||
print $form->selectarray($constname, $arrayofmessagename, $conf->global->{$constname}, 'None', 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
print $form->selectarray($constname, $arrayofmessagename, getDolGlobalString($constname), 'None', 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
} elseif (preg_match('/category:/', $val['type'])) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
@ -263,13 +263,13 @@ if ($action == 'edit') {
|
||||
|
||||
$tmp = explode(':', $val['type']);
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"');
|
||||
print $formother->select_categories($tmp[1], $conf->global->{$constname}, $constname, 0, $langs->trans('CustomersProspectsCategoriesShort'));
|
||||
print $formother->select_categories($tmp[1], getDolGlobalString($constname), $constname, 0, $langs->trans('CustomersProspectsCategoriesShort'));
|
||||
} elseif (preg_match('/thirdparty_type/', $val['type'])) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
$formcompany = new FormCompany($db);
|
||||
print $formcompany->selectProspectCustomerType($conf->global->{$constname}, $constname, 'customerorprospect', 'form', '', 1);
|
||||
print $formcompany->selectProspectCustomerType(getDolGlobalString($constname), $constname, 'customerorprospect', 'form', '', 1);
|
||||
} elseif ($val['type'] == 'securekey') {
|
||||
print '<input required="required" type="text" class="flat" id="'.$constname.'" name="'.$constname.'" value="'.(GETPOST($constname, 'alpha') ?GETPOST($constname, 'alpha') : $conf->global->{$constname}).'" size="40">';
|
||||
print '<input type="text" class="flat" id="'.$constname.'" name="'.$constname.'" value="'.(GETPOST($constname, 'alpha') ?GETPOST($constname, 'alpha') : getDolGlobalString($constname)).'" size="40">';
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token'.$constname.'" class="linkobject"');
|
||||
}
|
||||
@ -283,7 +283,7 @@ if ($action == 'edit') {
|
||||
$form->select_produits($selected, $constname, '', 0);
|
||||
}
|
||||
} else {
|
||||
print '<input name="' . $constname . '" class="flat ' . (empty($val['css']) ? 'minwidth200' : $val['css']) . '" value="' . $conf->global->{$constname} . '">';
|
||||
print '<input name="' . $constname . '" class="flat ' . (empty($val['css']) ? 'minwidth200' : $val['css']) . '" value="' . getDolGlobalString($constname) . '">';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -309,28 +309,28 @@ if ($action == 'edit') {
|
||||
print '</td><td>';
|
||||
|
||||
if ($val['type'] == 'textarea') {
|
||||
print dol_nl2br($conf->global->{$constname});
|
||||
print dol_nl2br(getDolGlobalString($constname));
|
||||
} elseif ($val['type']== 'html') {
|
||||
print $conf->global->{$constname};
|
||||
print getDolGlobalString($constname);
|
||||
} elseif ($val['type'] == 'yesno') {
|
||||
print ajax_constantonoff($constname);
|
||||
} elseif (preg_match('/emailtemplate:/', $val['type'])) {
|
||||
if (!empty($conf->global->{$constname})) {
|
||||
if (getDolGlobalString($constname)) {
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
|
||||
$formmail = new FormMail($db);
|
||||
|
||||
$tmp = explode(':', $val['type']);
|
||||
|
||||
$template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs, $conf->global->{$constname});
|
||||
$template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs, getDolGlobalString($constname));
|
||||
if ($template < 0) {
|
||||
setEventMessages(null, $formmail->errors, 'errors');
|
||||
}
|
||||
print $langs->trans($template->label);
|
||||
}
|
||||
} elseif (preg_match('/category:/', $val['type'])) {
|
||||
if (!empty($conf->global->{$constname})) {
|
||||
if (getDolGlobalString($constname)) {
|
||||
$c = new Categorie($db);
|
||||
$result = $c->fetch($conf->global->{$constname});
|
||||
$result = $c->fetch(getDolGlobalString($constname));
|
||||
if ($result < 0) {
|
||||
setEventMessages(null, $c->errors, 'errors');
|
||||
}
|
||||
@ -342,25 +342,25 @@ if ($action == 'edit') {
|
||||
print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>';
|
||||
}
|
||||
} elseif (preg_match('/thirdparty_type/', $val['type'])) {
|
||||
if ($conf->global->{$constname}==2) {
|
||||
if (getDolGlobalString($constname)==2) {
|
||||
print $langs->trans("Prospect");
|
||||
} elseif ($conf->global->{$constname}==3) {
|
||||
} elseif (getDolGlobalString($constname)==3) {
|
||||
print $langs->trans("ProspectCustomer");
|
||||
} elseif ($conf->global->{$constname}==1) {
|
||||
} elseif (getDolGlobalString($constname)==1) {
|
||||
print $langs->trans("Customer");
|
||||
} elseif ($conf->global->{$constname}==0) {
|
||||
} elseif (getDolGlobalString($constname)==0) {
|
||||
print $langs->trans("NorProspectNorCustomer");
|
||||
}
|
||||
} elseif ($val['type'] == 'product') {
|
||||
$product = new Product($db);
|
||||
$resprod = $product->fetch($conf->global->{$constname});
|
||||
$resprod = $product->fetch(getDolGlobalString($constname));
|
||||
if ($resprod > 0) {
|
||||
print $product->getNomUrl(1);
|
||||
} elseif ($resprod < 0) {
|
||||
setEventMessages(null, $object->errors, "errors");
|
||||
setEventMessages($product->error, $product->errors, "errors");
|
||||
}
|
||||
} else {
|
||||
print $conf->global->{$constname};
|
||||
print getDolGlobalString($constname);
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -216,7 +216,9 @@ class CActionComm
|
||||
if ($obj->module == 'shipping' && !empty($conf->expedition->enabled) && !empty($user->rights->expedition->lire)) {
|
||||
$qualified = 1;
|
||||
}
|
||||
if (preg_split("/@/", $obj->module, -1)[1] == 'eventorganization' && !empty($conf->eventorganization->enabled)) {
|
||||
// For case module = 'myobject@eventorganization'
|
||||
$tmparray = preg_split("/@/", $obj->module, -1);
|
||||
if (count($tmparray) > 1 && $tmparray[1] == 'eventorganization' && !empty($conf->eventorganization->enabled)) {
|
||||
$qualified = 1;
|
||||
}
|
||||
// For the generic case with type = 'module...' and module = 'myobject@mymodule'
|
||||
|
||||
@ -33,6 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
|
||||
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
@ -46,7 +47,7 @@ if (empty($object->thirdparty)) {
|
||||
$socid = $object->thirdparty->id;
|
||||
|
||||
// Sort & Order fields
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||
@ -230,7 +231,7 @@ if ($type_element == 'fichinter') { // Customer : show products from invoices
|
||||
$tables_from .= ' INNER JOIN '.MAIN_DB_PREFIX.'element_contact ec ON ec.element_id=c.rowid AND ec.fk_socpeople = '.((int) $object->id);
|
||||
$tables_from .= ' INNER JOIN '.MAIN_DB_PREFIX."c_type_contact tc ON (ec.fk_c_type_contact=tc.rowid and tc.element='propal' and tc.source='external' and tc.active=1)";
|
||||
$where = ' WHERE c.entity IN ('.getEntity('propal').')';
|
||||
$datePrint = 'c.datep';
|
||||
$dateprint = 'c.datep';
|
||||
$doc_number = 'c.ref';
|
||||
$thirdTypeSelect = 'customer';
|
||||
} elseif ($type_element == 'order') {
|
||||
@ -443,6 +444,8 @@ if ($sql_select) {
|
||||
|
||||
|
||||
$i = 0;
|
||||
$total_qty = 0;
|
||||
$total_ht = 0;
|
||||
while (($objp = $db->fetch_object($resql)) && $i < min($num, $limit)) {
|
||||
$documentstatic->id = $objp->doc_id;
|
||||
$documentstatic->ref = $objp->doc_number;
|
||||
|
||||
@ -76,7 +76,11 @@ if ($id) {
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
$morehtmlref = '<a href="'.DOL_URL_ROOT.'/contact/vcard.php?id='.$object->id.'" class="refid">';
|
||||
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
|
||||
$morehtmlref .= '</a>';
|
||||
|
||||
$morehtmlref .= '<div class="refidno">';
|
||||
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS) && !empty($socid)) {
|
||||
$object->thirdparty->fetch($socid);
|
||||
// Thirdparty
|
||||
|
||||
@ -44,7 +44,6 @@ if ($result <= 0) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$physicalperson = 1;
|
||||
|
||||
$company = new Societe($db);
|
||||
if ($contact->socid) {
|
||||
@ -107,7 +106,7 @@ if ($company->id) {
|
||||
}
|
||||
|
||||
// Si contact lie a un tiers non de type "particulier"
|
||||
if ($contact->typent_code != 'TE_PRIVATE') {
|
||||
if ($company->typent_code != 'TE_PRIVATE') {
|
||||
$v->setOrg($company->name);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5034,7 +5034,7 @@ class Form
|
||||
$more .= '<div clas="tagtd'.(empty($input['tdclass']) ? '' : (' "'.$input['tdclass'])).'"> </div>';
|
||||
}
|
||||
$more .= '<div class="tagtd'.($i == 0 ? ' tdtop' : '').'"><input type="radio" class="flat'.$morecss.'" id="'.dol_escape_htmltag($input['name'].$selkey).'" name="'.dol_escape_htmltag($input['name']).'" value="'.$selkey.'"'.$moreattr;
|
||||
if ($input['disabled']) {
|
||||
if (!empty($input['disabled'])) {
|
||||
$more .= ' disabled';
|
||||
}
|
||||
if (isset($input['default']) && $input['default'] === $selkey) {
|
||||
|
||||
@ -56,7 +56,7 @@ class modEventOrganization extends DolibarrModules
|
||||
$this->description = "EventOrganizationDescription";
|
||||
$this->descriptionlong = "EventOrganizationDescriptionLong";
|
||||
|
||||
$this->version = 'experimental';
|
||||
$this->version = 'dolibarr';
|
||||
|
||||
|
||||
// Key used in llx_const table to save module status enabled/disabled (where EVENTORGANIZATION is value of property name of module in uppercase)
|
||||
|
||||
@ -3421,7 +3421,7 @@ if ($action == 'editcss') {
|
||||
$maxfilesizearray = getMaxFileSizeArray();
|
||||
$maxmin = $maxfilesizearray['maxmin'];
|
||||
if ($maxmin > 0) {
|
||||
$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
|
||||
print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
|
||||
}
|
||||
print '<input type="file" class="flat minwidth300" name="addedfile" id="addedfile"/>';
|
||||
print '</tr></td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user