';
/*
// Ref customer
- $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
- $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
+ $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
+ $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
// Thirdparty
- $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
+ $morehtmlref .= '
'.$object->thirdparty->getNomUrl(1, 'customer');
+ if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
+ $morehtmlref .= ' (
'.$langs->trans("OtherOrders").')';
+ }
// Project
- if (!empty($conf->project->enabled)) {
- $langs->load("projects");
- $morehtmlref .= '
'.$langs->trans('Project') . ' ';
- if ($permissiontoadd) {
- //if ($action != 'classify') $morehtmlref.='
' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' ';
- $morehtmlref .= ' : ';
- if ($action == 'classify') {
- //$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 0, 1, '', 'maxwidth300');
- $morehtmlref .= '
';
- } else {
- $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1, '', 'maxwidth300');
- }
- } else {
- if (!empty($object->fk_project)) {
- $proj = new Project($db);
- $proj->fetch($object->fk_project);
- $morehtmlref .= ': '.$proj->getNomUrl();
- } else {
- $morehtmlref .= '';
- }
- }
- }*/
+ if (isModEnabled('project')) {
+ $langs->load("projects");
+ $morehtmlref .= '
';
+ if ($permissiontoadd) {
+ $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
+ if ($action != 'classify') {
+ $morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' ';
+ }
+ $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
+ } else {
+ if (!empty($object->fk_project)) {
+ $proj = new Project($db);
+ $proj->fetch($object->fk_project);
+ $morehtmlref .= $proj->getNomUrl(1);
+ if ($proj->title) {
+ $morehtmlref .= '
- '.dol_escape_htmltag($proj->title).'';
+ }
+ }
+ }
+ }
+ */
$morehtmlref .= '
';
if (!isset($npfilter)) {
$npfilter = "";
@@ -632,8 +638,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$relativepath = $objref.'/'.$objref.'.pdf';
$filedir = $conf->partnership->dir_output.'/'.$object->element.'/'.$objref;
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
- $genallowed = $user->rights->partnership->read; // If you can read, you can build the PDF to read content
- $delallowed = $user->rights->partnership->write; // If you can create/edit, you can remove a file on card
+ $genallowed = $permissiontoread; // If you can read, you can build the PDF to read content
+ $delallowed = $permissiontoadd; // If you can create/edit, you can remove a file on card
print $formfile->showdocuments('partnership:Partnership', $object->element.'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
}
@@ -651,7 +657,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// List of actions on element
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
- $somethingshown = $formactions->showactions($object, $object->element, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter);
+ $somethingshown = $formactions->showactions($object, $object->element.'@'.$object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter);
print '';
}
diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php
index ac88f7b638f..f67894988c9 100644
--- a/htdocs/public/onlinesign/newonlinesign.php
+++ b/htdocs/public/onlinesign/newonlinesign.php
@@ -160,6 +160,9 @@ if ($source == 'proposal') {
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('onlinesign'));
+$error = 0;
+
+
/*
* Actions
*/
@@ -191,10 +194,6 @@ if ($action == 'confirm_refusepropal' && $confirm == 'yes') {
if ($result < 0) {
$error++;
}
- $result = $object->call_trigger('PROPAL_CLOSE_REFUSED_WEB', $user);
- if ($result < 0) {
- $error++;
- }
}
} else {
$db->rollback();
diff --git a/htdocs/public/partnership/new.php b/htdocs/public/partnership/new.php
index 9891a9f3c9d..fdc62ce366a 100644
--- a/htdocs/public/partnership/new.php
+++ b/htdocs/public/partnership/new.php
@@ -270,6 +270,7 @@ if (empty($reshook) && $action == 'add') {
$company->zip = GETPOST('zipcode');
$company->town = GETPOST('town');
$company->email = GETPOST('email');
+ $company->url = GETPOST('url');
$company->country_id = GETPOST('country_id', 'int');
$company->state_id = GETPOST('state_id', 'int');
$company->name_alias = dolGetFirstLastname(GETPOST('firstname'), GETPOST('lastname'));
@@ -303,12 +304,16 @@ if (empty($reshook) && $action == 'add') {
if (empty($company->email)) {
$company->email = GETPOST('email');
}
+ if (empty($company->url)) {
+ $company->url = GETPOST('url');
+ }
if (empty($company->state_id)) {
$company->state_id = GETPOST('state_id', 'int');
}
if (empty($company->name_alias)) {
$company->name_alias = dolGetFirstLastname(GETPOST('firstname'), GETPOST('lastname'));
}
+
$company->update(0);
}
@@ -617,6 +622,20 @@ print '