Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2026-02-16 01:06:12 +01:00
commit 03c3218a0c
5 changed files with 47 additions and 24 deletions

View file

@ -47,6 +47,7 @@ $langs->loadLangs(array('admin', 'blockedlog', 'other'));
// Get Parameters
$action = GETPOST('action', 'aZ09');
$backtopage = GETPOST('backtopage', 'alpha');
$cancel = GETPOST('cancel');
$withtab = GETPOSTISSET('withtab') ? GETPOSTINT('withtab') : 1;
$origin = GETPOST('origin');
@ -62,6 +63,11 @@ if (!$user->admin) {
* Actions
*/
if ($cancel && $origin == 'initmodule') {
header("Location: ".DOL_URL_ROOT."/admin/modules.php");
exit(0);
}
if ($action == 'update') {
$error = 0;
$db->begin();
@ -264,12 +270,26 @@ if (in_array($mysoc->country_code, array('FR'))) {
print info_admin($infotoshow, 0, 0, 'info');
}
$htmltext = $langs->trans("UnalterableLogToolRegistrationFR").'<br>';
if ((!isRegistrationDataSavedAndPushed() || !isModEnabled('blockedlog')) && $mode != "forceregistration") {
print '<center><span class="error">'.$langs->trans("RegistrationRequired").'</span></center>';
}
$htmltext = "";
$htmltext .= $langs->trans("UnalterableLogToolRegistrationFR").'<br>';
$htmltext .= $langs->trans("InformationWillBePublishedTo");
$htmltext .= '<br>'.$langs->trans("InformationWillBePublishedTo2", $organization_for_ping, $dataprivacy_url);
$htmltext .= '<br>'.$langs->trans("InformationWillBePublishedTo3");
if (!isRegistrationDataSavedAndPushed() || !isModEnabled('blockedlog')) {
$htmltext .= '<br>'.$langs->trans("InformationWillBePublishedTo3");
$color = 'warning';
} else {
$color = 'info';
}
print info_admin($htmltext, 0, 0, 'warning');
print info_admin($htmltext, 0, 0, $color);
if (isRegistrationDataSavedAndPushed() && isModEnabled('blockedlog') && $mode != "forceregistration") {
print '<center><span class="ok"><br>'.$langs->trans("ApplicationHasBeenRegistered").'<br><br></span></center>';
}
} else {
$htmltext = ($infotoshow ? $infotoshow.'<br>' : '');
$htmltext .= $langs->trans("ApplicationHasBeenRegistered").'<br>';
@ -448,9 +468,10 @@ if (empty($mode)) {
$formSetup->htmlButtonLabel = 'SaveUpdate';
} else {
$formSetup->htmlButtonLabel = 'SaveAndEnableModule';
$formSetup->htmlButton2Label = '<input class="button button-save reposition" type="submit" value="' . $langs->trans("Cancel") . '">';
}
print $formSetup->generateOutput(true, true, '', '');
print $formSetup->generateOutput(2, true, '', '');
}
if ($withtab) {

View file

@ -38,7 +38,7 @@ function blockedlogadmin_prepare_head($withtabsetup)
$param = '';
$param .= ($withtabsetup? "?withtab=".$withtabsetup : "");
$param .= (GETPOST('origin') ? ($param ? '&' : '').'origin='.GETPOST('origin') : '');
$param .= (GETPOST('origin') ? ($param ? '&' : '?').'origin='.GETPOST('origin') : '');
$h = 0;
$head = array();

View file

@ -145,11 +145,11 @@ class FormSetup
/**
* Generate the form (in read or edit mode depending on $editMode)
*
* @param bool $editMode True will display output on edit mod
* @param bool $hideTitle True to hide the first title line
* @param string $title Title of first line
* @param string $cssfirstcolumn CSS first column
* @return string Html output
* @param int|bool $editMode True will display output on edit mod
* @param bool $hideTitle True to hide the first title line
* @param string $title Title of first line
* @param string $cssfirstcolumn CSS first column
* @return string Html output
*/
public function generateOutput($editMode = false, $hideTitle = false, $title = '', $cssfirstcolumn = '')
{
@ -184,7 +184,7 @@ class FormSetup
}
// generate output table
$out .= $this->generateTableOutput($editMode, $hideTitle, $title, $cssfirstcolumn);
$out .= $this->generateTableOutput((bool) $editMode, $hideTitle, $title, $cssfirstcolumn);
$reshook = $hookmanager->executeHooks('formSetupBeforeGenerateOutputButton', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
@ -197,10 +197,12 @@ class FormSetup
} elseif ($editMode) {
$out .= '<div class="form-setup-button-container center">'; // Todo : remove .center by adding style to form-setup-button-container css class in all themes
$out .= $this->htmlOutputMoreButton;
$out .= '<input class="button button-save reposition" type="submit" value="' . $this->langs->trans($this->htmlButtonLabel ?: "Save") . '">'; // Todo fix dolibarr style for <button and use <button instead of input
/*$out .= ' &nbsp;&nbsp; ';
$out .= '<a class="button button-cancel" type="submit" href="' . $this->formAttributes['action'] . '">'.$this->langs->trans('Cancel').'</a>';
*/
$out .= '<input class="button button-save reposition" type="submit" value="' . $this->langs->trans($this->htmlButtonLabel ?: "Save") . '" name="save">'; // Todo fix dolibarr style for <button and use <button instead of input
if ($editMode === 2) {
// Add also a cancel button
$out .= ' &nbsp;&nbsp; ';
$out .= '<input class="button button-cancel" type="submit" value="' . $this->langs->trans('Cancel') . '" name="cancel">';
}
$out .= '</div>';
}

View file

@ -1338,7 +1338,7 @@ MoreNetworksAvailableWithModule=More social networks may be available by enablin
Subcontractors=Subcontractors
SubcontractorsDesc=If the management of your application is subcontracted to external service providers (an accountant/bookkeeper and/or an IT service provider), you can enter here their information so it won't be lost in case of a substition of the administrator.
AccountingProvider=Accounting service provider
ITProvider=IT service prodiver
ITProvider=IT supplier
AccountantFileNumber=Accountant code
DisplayDesc=Parameters affecting the look and presentation of the application can be modified here.
AvailableModules=Available app/modules

View file

@ -75,14 +75,14 @@ BLOCKEDLOG_REGISTRATION_ADDRESS=Company address
BLOCKEDLOG_REGISTRATION_STATE=Company state/province
BLOCKEDLOG_REGISTRATION_ZIP=Company zip
BLOCKEDLOG_REGISTRATION_TOWN=Company town
MAIN_INFO_ITPROVIDER_NAME=IT service provider name
MAIN_INFO_ITPROVIDER_MAIL=IT service provider email
MAIN_INFO_ITPROVIDER_COUNTRY=IT service provider country
MAIN_INFO_ITPROVIDER_IDPROF1=IT service provider Prof Id 1 (SIREN)
MAIN_INFO_ITPROVIDER_ADDRESS=IT service provider address
MAIN_INFO_ITPROVIDER_STATE=IT service provider state/province
MAIN_INFO_ITPROVIDER_ZIP=IT service provider zip
MAIN_INFO_ITPROVIDER_TOWN=IT service provider town
MAIN_INFO_ITPROVIDER_NAME=IT supplier name
MAIN_INFO_ITPROVIDER_MAIL=IT supplier email
MAIN_INFO_ITPROVIDER_COUNTRY=IT supplier country
MAIN_INFO_ITPROVIDER_IDPROF1=IT supplier Prof Id 1 (SIREN)
MAIN_INFO_ITPROVIDER_ADDRESS=IT supplier address
MAIN_INFO_ITPROVIDER_STATE=IT supplier state/province
MAIN_INFO_ITPROVIDER_ZIP=IT supplier zip
MAIN_INFO_ITPROVIDER_TOWN=IT supplier town
RegistrationDoneAndModuleEnabled=The new registration information have been saved and registered. The module %s is enabled.
UserRegistration=User registration
RegistrationRequired=Registration expected