diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 30e5bb5ef6d..aa3112da330 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2782,7 +2782,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi $phototoshow .= ''; } } - } elseif (!$phototoshow) { // example if modulepart = 'societe' or 'photo' + } elseif (!$phototoshow) { // example if modulepart = 'societe' or 'photo' or 'memberphoto' $phototoshow .= $form->showphoto($modulepart, $object, 0, 0, 0, 'photowithmargin photoref', 'small', 1, 0, $maxvisiblephotos); } diff --git a/htdocs/webportal/class/html.formcardwebportal.class.php b/htdocs/webportal/class/html.formcardwebportal.class.php index 6c23369efdd..9e4a5a5c43c 100644 --- a/htdocs/webportal/class/html.formcardwebportal.class.php +++ b/htdocs/webportal/class/html.formcardwebportal.class.php @@ -454,12 +454,18 @@ class FormCardWebPortal // } //} + $html .= ''; $html .= '
'; // Left block - begin $html .= '
'; $html .= '
'; + $form = new Form($this->db); + $html .= $form->showphoto('memberphoto', $object, 0, 0, 0, 'photowithmargin photoref', 'small', 1, 0, 1); + //include DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php'; + //$html .= getImagePublicURLOfObject($object, 1, '_small'); + // logo or photo $html .= '
'; @@ -504,7 +510,7 @@ class FormCardWebPortal // Left block - end // Right block - begin - $html .= '
'; + $html .= '
'; // show status $htmlStatus = $object->getLibStatut(6); if (empty($htmlStatus) || $htmlStatus == $object->getLibStatut(3)) { diff --git a/htdocs/webportal/class/html.formlistwebportal.class.php b/htdocs/webportal/class/html.formlistwebportal.class.php index d10fc9a3850..96e110a7b41 100644 --- a/htdocs/webportal/class/html.formlistwebportal.class.php +++ b/htdocs/webportal/class/html.formlistwebportal.class.php @@ -313,6 +313,8 @@ class FormListWebPortal } // filter on logged third-party $sql .= " AND t.fk_soc = " . ((int) $socid); + // discard record with status draft + $sql .= " AND t.fk_statut <> 0"; foreach ($search as $key => $val) { if (array_key_exists($key, $object->fields)) { diff --git a/htdocs/webportal/class/webportalinvoice.class.php b/htdocs/webportal/class/webportalinvoice.class.php index 7f50185b435..8c9fa29de45 100644 --- a/htdocs/webportal/class/webportalinvoice.class.php +++ b/htdocs/webportal/class/webportalinvoice.class.php @@ -40,7 +40,7 @@ class WebPortalInvoice extends Facture /** * Status list (short label) */ - const STATUS_SHORT_LIST = array( + const ARRAY_STATUS_LABEL = array( Facture::STATUS_DRAFT => 'BillShortStatusDraft', Facture::STATUS_VALIDATED => 'BillShortStatusNotPaid', Facture::STATUS_CLOSED => 'BillShortStatusPaid', @@ -109,7 +109,7 @@ class WebPortalInvoice extends Facture 'multicurrency_total_ht' => array('type' => 'price', 'label' => 'MulticurrencyAmountHT', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 290, 'isameasure' => 1,), 'multicurrency_total_tva' => array('type' => 'price', 'label' => 'MulticurrencyAmountVAT', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 291, 'isameasure' => 1,), 'multicurrency_total_ttc' => array('type' => 'price', 'label' => 'MulticurrencyAmountTTC', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 292, 'isameasure' => 1,), - 'fk_statut' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 2, 'notnull' => 1, 'position' => 1000, 'arrayofkeyval' => self::STATUS_SHORT_LIST,), + 'fk_statut' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 2, 'notnull' => 1, 'position' => 1000, 'arrayofkeyval' => self::ARRAY_STATUS_LABEL,), ); //public $rowid; //public $ref; diff --git a/htdocs/webportal/class/webportalmember.class.php b/htdocs/webportal/class/webportalmember.class.php index bc937a5613a..082b9a97b64 100644 --- a/htdocs/webportal/class/webportalmember.class.php +++ b/htdocs/webportal/class/webportalmember.class.php @@ -40,7 +40,7 @@ class WebPortalMember extends Adherent /** * Status list (short label) */ - const STATUS_SHORT_LIST = array( + const ARRAY_STATUS_LABEL = array( Adherent::STATUS_DRAFT => 'Draft', Adherent::STATUS_VALIDATED => 'Validated', Adherent::STATUS_RESILIATED => 'MemberStatusResiliatedShort', @@ -140,7 +140,7 @@ class WebPortalMember extends Adherent 'datefin' => array('type' => 'date', 'label' => 'SubscriptionEndDate', 'enabled' => 1, 'visible' => 5, 'position' => 400,), - 'status' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 5, 'notnull' => 1, 'position' => 500, 'arrayofkeyval' => self::STATUS_SHORT_LIST, 'showonheader' => 1,), + 'status' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 5, 'notnull' => 1, 'position' => 500, 'arrayofkeyval' => self::ARRAY_STATUS_LABEL, 'showonheader' => 1,), ); public $rowid; //public $ref; @@ -219,7 +219,7 @@ class WebPortalMember extends Adherent */ public function getTooltipContentArray($params) { - global $conf, $langs; + global $langs; $datas = []; @@ -250,7 +250,7 @@ class WebPortalMember extends Adherent */ public function getNomUrl($withpictoimg = 0, $maxlen = 0, $option = 'card', $mode = '', $morecss = '', $save_lastsearch_value = -1, $notooltip = 0, $addlinktonotes = 0) { - global $conf, $langs, $hookmanager; + global $langs, $hookmanager; if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') && $withpictoimg) { $withpictoimg = 0; diff --git a/htdocs/webportal/class/webportalorder.class.php b/htdocs/webportal/class/webportalorder.class.php index a6f8007da7c..f12e0f8ada1 100644 --- a/htdocs/webportal/class/webportalorder.class.php +++ b/htdocs/webportal/class/webportalorder.class.php @@ -40,7 +40,7 @@ class WebPortalOrder extends Commande /** * Status list (short label) */ - const STATUS_SHORT_LIST = array( + const ARRAY_STATUS_LABEL = array( Commande::STATUS_DRAFT => 'StatusOrderDraftShort', Commande::STATUS_VALIDATED => 'StatusOrderValidated', Commande::STATUS_SHIPMENTONPROCESS => 'StatusOrderSentShort', @@ -108,7 +108,7 @@ class WebPortalOrder extends Commande 'multicurrency_total_ht' => array('type' => 'price', 'label' => 'MulticurrencyAmountHT', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 255, 'isameasure' => 1,), 'multicurrency_total_tva' => array('type' => 'price', 'label' => 'MulticurrencyAmountVAT', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 260, 'isameasure' => 1,), 'multicurrency_total_ttc' => array('type' => 'price', 'label' => 'MulticurrencyAmountTTC', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 265, 'isameasure' => 1,), - 'fk_statut' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 2, 'position' => 500, 'notnull' => -5, 'arrayofkeyval' => self::STATUS_SHORT_LIST,), + 'fk_statut' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 2, 'position' => 500, 'notnull' => -5, 'arrayofkeyval' => self::ARRAY_STATUS_LABEL,), ); //public $rowid; //public $ref; diff --git a/htdocs/webportal/class/webportalpartnership.class.php b/htdocs/webportal/class/webportalpartnership.class.php index 75bcdf64d95..e6ed01916d0 100644 --- a/htdocs/webportal/class/webportalpartnership.class.php +++ b/htdocs/webportal/class/webportalpartnership.class.php @@ -40,7 +40,7 @@ class WebPortalPartnership extends Partnership /** * Status list (short label) */ - const STATUS_SHORT_LIST = array( + const ARRAY_STATUS_LABEL = array( Partnership::STATUS_DRAFT => 'Draft', Partnership::STATUS_VALIDATED => 'Accepted', Partnership::STATUS_APPROVED => 'Refused', @@ -119,7 +119,7 @@ class WebPortalPartnership extends Partnership 'reason_decline_or_cancel' => array('type' => 'text', 'label' => 'ReasonDeclineOrCancel', 'enabled' => 1, 'position' => 73, 'notnull' => 0, 'visible' => -2,), 'ip' => array('type' => 'varchar(250)', 'label' => 'Ip', 'enabled' => 1, 'position' => 74, 'notnull' => 0, 'visible' => -2,), - 'status' => array('type' => 'smallint', 'label' => 'Status', 'enabled' => 1, 'position' => 2000, 'notnull' => 1, 'visible' => 5, 'default' => '0', 'index' => 1, 'arrayofkeyval' => self::STATUS_SHORT_LIST, 'showonheader' => 1,), + 'status' => array('type' => 'smallint', 'label' => 'Status', 'enabled' => 1, 'position' => 2000, 'notnull' => 1, 'visible' => 5, 'default' => '0', 'index' => 1, 'arrayofkeyval' => self::ARRAY_STATUS_LABEL, 'showonheader' => 1,), ); //public $rowid; //public $ref; diff --git a/htdocs/webportal/class/webportalpropal.class.php b/htdocs/webportal/class/webportalpropal.class.php index 5bfa4a69e5f..958b7daae83 100644 --- a/htdocs/webportal/class/webportalpropal.class.php +++ b/htdocs/webportal/class/webportalpropal.class.php @@ -40,7 +40,7 @@ class WebPortalPropal extends Propal /** * Status list (short label) */ - const STATUS_SHORT_LIST = array( + const ARRAY_STATUS_LABEL = array( Propal::STATUS_DRAFT => 'PropalStatusDraftShort', Propal::STATUS_VALIDATED => 'PropalStatusValidatedShort', Propal::STATUS_SIGNED => 'PropalStatusSignedShort', @@ -108,7 +108,7 @@ class WebPortalPropal extends Propal 'multicurrency_total_ht' => array('type' => 'price', 'label' => 'MulticurrencyAmountHT', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 245, 'isameasure' => 1,), 'multicurrency_total_tva' => array('type' => 'price', 'label' => 'MulticurrencyAmountVAT', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 250, 'isameasure' => 1,), 'multicurrency_total_ttc' => array('type' => 'price', 'label' => 'MulticurrencyAmountTTC', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 255, 'isameasure' => 1,), - 'fk_statut' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 2, 'notnull' => 1, 'position' => 500, 'arrayofkeyval' => self::STATUS_SHORT_LIST,), + 'fk_statut' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 2, 'notnull' => 1, 'position' => 500, 'arrayofkeyval' => self::ARRAY_STATUS_LABEL,), ); //public $rowid; //public $ref;