diff --git a/class/dolilettersignature.class.php b/class/dolilettersignature.class.php index f8b193e..ee09e08 100644 --- a/class/dolilettersignature.class.php +++ b/class/dolilettersignature.class.php @@ -137,12 +137,6 @@ public function __construct(DoliDB $db) if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) $this->fields['rowid']['visible'] = 0; if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) $this->fields['entity']['enabled'] = 0; - // Example to show how to set values of fields definition dynamically - /*if ($user->rights->doliletterdolibarr->dolilettersignature->read) { - $this->fields['myfield']['visible'] = 1; - $this->fields['myfield']['noteditable'] = 0; - }*/ - // Unset fields that are disabled foreach ($this->fields as $key => $val) { @@ -294,7 +288,6 @@ public function update(User $user, $notrigger = false) public function delete(User $user, $notrigger = false) { return $this->deleteCommon($user, $notrigger); - //return $this->deleteCommon($user, $notrigger, 1); } /** diff --git a/class/envelope.class.php b/class/envelope.class.php index b2c8fe4..ae891af 100644 --- a/class/envelope.class.php +++ b/class/envelope.class.php @@ -126,8 +126,6 @@ class Envelope extends CommonObject public $last_main_doc; public $model_pdf; public $content; - public $sender; - public $sender_service; public $document_url; public $fk_soc; public $fk_user_creat; @@ -151,12 +149,6 @@ public function __construct(DoliDB $db) { $this->fields['entity']['enabled'] = 0; } - // Example to show how to set values of fields definition dynamically - /*if ($user->rights->doliletter->document->read) { - $this->fields['myfield']['visible'] = 1; - $this->fields['myfield']['noteditable'] = 0; - }*/ - // Unset fields that are disabled foreach ($this->fields as $key => $val) { if (isset($val['enabled']) && empty($val['enabled'])) { @@ -301,7 +293,6 @@ public function update(User $user, $notrigger = false) { public function delete(User $user, $notrigger = false) { $this->setStatusCommon($user, 0); $this->call_trigger('ENVELOPE_DELETE', $user); - //return $this->deleteCommon($user, $notrigger); } /** @@ -493,10 +484,6 @@ public function info($id) */ public function initAsSpecimen() { - // Set here init that are not commonf fields - // $this->property1 = ... - // $this->property2 = ... - $this->initAsSpecimenCommon(); } diff --git a/class/envelope_email.class.php b/class/envelope_email.class.php index 101a6a7..badaea2 100644 --- a/class/envelope_email.class.php +++ b/class/envelope_email.class.php @@ -25,6 +25,7 @@ * Class for Groupment */ require_once __DIR__ . "/envelope_sending.class.php"; + class EmailSending extends EnvelopeSending { diff --git a/class/envelope_letter.class.php b/class/envelope_letter.class.php index dd78799..f764022 100644 --- a/class/envelope_letter.class.php +++ b/class/envelope_letter.class.php @@ -25,6 +25,7 @@ * Class for LetterSending */ require_once __DIR__ . "/envelope_sending.class.php"; + class LetterSending extends EnvelopeSending { /** diff --git a/class/envelope_sending.class.php b/class/envelope_sending.class.php index e5065de..0a43574 100644 --- a/class/envelope_sending.class.php +++ b/class/envelope_sending.class.php @@ -214,8 +214,6 @@ public function update(User $user, $notrigger = false) */ public function delete(User $user, $notrigger = false) { - global $conf; - return $this->update($user); } diff --git a/core/modules/modDoliLetter.class.php b/core/modules/modDoliLetter.class.php index 13242f7..8c344b0 100644 --- a/core/modules/modDoliLetter.class.php +++ b/core/modules/modDoliLetter.class.php @@ -49,7 +49,7 @@ public function __construct($db) { $this->descriptionlong = $langs->trans('DoliLetterDescriptionLong'); $this->editor_name = 'Eoxia'; $this->editor_url = 'https://eoxia.com/'; - $this->version = '1.0.0'; + $this->version = '0.0.2'; $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); $this->picto = 'doliletter256px@doliletter'; diff --git a/core/triggers/interface_99_modDoliLetter_DoliLetterTriggers.class.php b/core/triggers/interface_99_modDoliLetter_DoliLetterTriggers.class.php index 0d59708..fe9f122 100644 --- a/core/triggers/interface_99_modDoliLetter_DoliLetterTriggers.class.php +++ b/core/triggers/interface_99_modDoliLetter_DoliLetterTriggers.class.php @@ -47,7 +47,7 @@ public function __construct($db) $this->name = preg_replace('/^Interface/i', '', get_class($this)); $this->family = "demo"; $this->description = "Doliletter triggers."; - $this->version = '1.0.0'; + $this->version = '0.0.2'; $this->picto = 'Doliletter@Doliletter'; } diff --git a/js/doliletter.js.php b/js/doliletter.js.php index e61452f..8335fd6 100644 --- a/js/doliletter.js.php +++ b/js/doliletter.js.php @@ -331,6 +331,7 @@ window.eoxiaJS.signature.createSignature = function() { let elementSignatory = $(this).attr('value'); + let elementRedirect = $(this).find('#redirect' + elementSignatory).attr('value'); let elementZone = $(this).find('#zone' + elementSignatory).attr('value'); let actionContainerSuccess = $('.noticeSignatureSuccess'); @@ -358,7 +359,8 @@ processData: false, contentType: 'application/octet-stream', data: signature, - success: function() { + success: function( resp ) { + $(document).html(resp) if (elementZone == "private") { actionContainerSuccess.load(document.URL + ' .noticeSignatureSuccess .all-notice-content') actionContainerSuccess.removeClass('hidden');