diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 0feb7e6519d..b91fb4a243c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -7778,7 +7778,7 @@ class Form * * @param string $htmlname Name of html select area. Must start with "multi" if this is a multiselect * @param array $array Array like array(key => value) or array(key=>array('label'=>..., 'data-...'=>..., 'disabled'=>..., 'css'=>...)) - * @param string|string[] $id Preselected key or preselected keys for multiselect + * @param string|string[] $id Preselected key or preselected keys for multiselect. Use 'ifone' to autoselect record if there is only one record. * @param int|string $show_empty 0 no empty value allowed, 1 or string to add an empty value into list (If 1: key is -1 and value is '' or ' ', If placeholder string: key is -1 and value is the string), <0 to add an empty value with key that is this value. * @param int $key_in_label 1 to show key into label with format "[key] value" * @param int $value_as_key 1 to use value as key @@ -7895,7 +7895,7 @@ class Form } } else { $id = (string) $id; // if $id = 0, then $id = '0' - if ($id != '' && $id == $key && !$disabled) { + if ($id != '' && ($id == $key || ($id == 'ifone' && count($array) == 1)) && !$disabled) { $out .= ' selected'; // To preselect a value } } diff --git a/htdocs/langs/en_US/partnership.lang b/htdocs/langs/en_US/partnership.lang index 9c11e1cda2e..5c85e4d7830 100644 --- a/htdocs/langs/en_US/partnership.lang +++ b/htdocs/langs/en_US/partnership.lang @@ -42,6 +42,7 @@ PARTNERSHIP_BACKLINKS_TO_CHECK=Backlinks to check PARTNERSHIP_NBDAYS_AFTER_MEMBER_EXPIRATION_BEFORE_CANCEL=Nb of days before cancelling status of a partnership when a subscription has expired ReferingWebsiteCheck=Check of website referring ReferingWebsiteCheckDesc=You can enable a feature to check that your partners has added a backlink to your website domains on their own website. +PublicFormRegistrationPartnerDesc=Dolibarr can provide you a public URL/website to allow external visitors to request to be part of the partnership program. # # Object @@ -60,6 +61,11 @@ ConfirmClosePartnershipAsk=Are you sure you want to cancel this partnership? PartnershipType=Partnership type PartnershipRefApproved=Partnership %s approved KeywordToCheckInWebsite=If you want to check that a given keyword is present into the website of each partner, define this keyword here +PartnershipDraft=Draft +PartnershipAccepted=Accepted +PartnershipRefused=Refused +PartnershipCanceled=Canceled +PartnershipManagedFor=Partners are # # Template Mail @@ -83,12 +89,6 @@ CountLastUrlCheckError=Number of errors for last URL check LastCheckBacklink=Date of last URL check ReasonDeclineOrCancel=Reason for declining or canceling -# -# Status -# -PartnershipDraft=Draft -PartnershipAccepted=Accepted -PartnershipRefused=Refused -PartnershipCanceled=Canceled -PartnershipManagedFor=Partners are +NewPartnershipRequest=New partnership request +NewPartnershipRequestDesc=This form allows you to request to be part of one of our partnership program. If you need help to fill this form, please contact by email %s. diff --git a/htdocs/partnership/admin/website.php b/htdocs/partnership/admin/website.php index 5fb48248280..49fd7ff91df 100644 --- a/htdocs/partnership/admin/website.php +++ b/htdocs/partnership/admin/website.php @@ -78,12 +78,14 @@ if ($action == 'update') { $form = new Form($db); +$title = $langs->trans('PartnershipSetup'); +$help_url = ''; //$help_url = 'EN:Module_Partnership|FR:Module_Adhérents|ES:Módulo_Miembros'; -llxHeader('', $langs->trans("PartnershipsSetup"), $help_url); +llxHeader('', $title, $help_url); $linkback = ''.$langs->trans("BackToModuleList").''; -print load_fiche_titre($langs->trans("PartnershipsSetup"), $linkback, 'title_setup'); +print load_fiche_titre($title, $linkback, 'title_setup'); $head = partnershipAdminPrepareHead(); @@ -93,7 +95,7 @@ print '
'; print ''; print ''; -print dol_get_fiche_head($head, 'website', $langs->trans("Partnerships"), -1, 'user'); +print dol_get_fiche_head($head, 'website', $langs->trans("Partnerships"), -1, 'partnership'); if ($conf->use_javascript_ajax) { print "\n".'