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

This commit is contained in:
Anthony Berton 2022-07-28 09:50:54 +02:00
commit 4cd85f3029
20 changed files with 267 additions and 139 deletions

View File

@ -223,6 +223,81 @@ Following changes may create regressions for some external modules, but were nec
* The context hook 'suppliercard' when on the supplier tab of a thirdparty has been renamed into 'thirdpartysupplier'
***** ChangeLog for 15.0.3 compared to 15.0.2 *****
FIX: 15.0: modules cannot declare more than 1 cron job using the same method with different parameters
FIX: 15 fix graph ficheinter status
FIX: #18704
FIX: #20444
FIX: #20448 missing preg_replace for vat rate when adding a free line
FIX: #20476 migration postgresql 13.0.x to 14.0.x packaging type
FIX: #20487 missing letter D in constant THIRDPARTIES_DISABLE_RELATED_…
FIX: #20487 missing letter D in constant THIRDPARTIES_DISABLE_RELATED_OBJECT_TAB
FIX: #20527 Accountancy - Unbalanced entry proposed when an employee are declared on a social contribution
FIX: #20527 Accountancy Unbalanced entry proposed when an employee are declared on social contribution
FIX: #20621 signature online with proposal with n page.
FIX: #20696
FIX: #20828
FIX: #20886 : manage durations in list_print_total.tpl.php
FIX: #20902
FIX: #21051
FIX: #21093
FIX: #21138
FIX: #21140
FIX: #21174
FIX: #21323
FIX: #21472 On the bank transfer lists, a change of page switches to the lists of the direct debit module
FIX: #21495
FIX: #21518
FIX: Accountancy - Label of VAT account is empty
FIX: Accountancy - Model account list - Problem of CSRF
FIX: Accountancy - Partitioning of the entity on an automatic binding
FIX: add missing thead, th and id on table
FIX: backport commit 5b3fcc5e43979b1b0789bf81fb8f1b2b59c93056, chkbxlst cannot be emptied
FIX: Bank account not set when creating invoice from order
FIX: Bank transfer - Link on code supplier invoice was bad
FIX: Can convert a partially closed down payment when close for
FIX: class center linkedObjectblock order date
FIX: count elements in invoice list (Issue #21444)
FIX: Customer price non numeric warning when 0 vat.
FIX: errors in getLinesArray()
FIX: False alert of WAF when there is "set" into some URL action=update.
FIX: Intervention graph by status on ficheinter Index page
FIX: Intervention url link into Commerce index
FIX: Fix get origin from other than supplier proposal when add a new supplier proposal
FIX: Fix show errors in card
FIX: fourn/commande/card.php Added "$object" parameter to $formfile->showdocuments call
FIX: french traductions for payment methods
FIX: hook for dol_format_address
FIX: Index page for "Sales" give wrong URL link to Intervention
FIX: issue Dolibarr#21495 for v15
FIX: label and get_substitutionarray_each_var_object on ODT generation
FIX: load product stock in inventory lines
FIX: missing morecss for multiselectarray
FIX: missins time spent list menu
FIX: new member subscription: bank account and payment mode might be hidden
FIX: ODT generation of BOM document
FIX: ODT tags for subobjects {object_subobject_yyy} was not working.
FIX: qty received label in Squille PDF model
FIX: rank duplicate on mass action invoice from multiple orders
FIX: regression + add $forceentity parameter
FIX: regression PR #20713
FIX: security breach if we have same ref number in multiple entities
FIX: selection of type of invoice
FIX: Send remind to pay invoice only on validated invoices
FIX: Show sellist type of extrafield when none category selected
FIX: signature online with proposal with n page.
FIX: sql error when PRODUCT_USE_SUPPLIER_PACKAGING enabled.
FIX: sql order
FIX: trash icon on crontask list to do not work
FIX: v15 linked object block center order date
FIX: Warning on attribut
FIX: We must remove empty values of $features array in fetchByProductCombination2ValuePairs() because some products can use only several attributes in their variations and not necessarily all. In this case, fetch doesn't work without my correction
FIX: with callback function
FIX: xml file for company with special chars in name
FIX: Zatca QR code must use company name/vat
***** ChangeLog for 15.0.2 compared to 15.0.1 *****
FIX: #19777 #20281

View File

@ -13,32 +13,12 @@ It is here only to build Dolibarr packages, and those generated packages will no
There are several tools:
--------------------------------------------------------------------------------------------------
- To build full Dolibarr packages, launch the script
> Launch command perl makepack-dolibarr.pl
--------------------------------------------------------------------------------------------------
Prerequisites to build tgz, debian and rpm packages:
> apt-get install tar dpkg dpatch p7zip-full rpm zip
--------------------------------------------------------------------------------------------------
Prerequisites to build autoexe DoliWamp package:
> apt-get install wine q4wine
> Launch "wine cmd" to check a drive Z: pointing to / exists.
> Install InnoSetup
For example by running isetup-5.5.8.exe (https://www.jrsoftware.org) https://files.jrsoftware.org/is/5/
> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB
For example by running wampserver3.2.0_x64.exe (https://www.wampserver.com).
See file build/exe/doliwamp.iss to know the doliwamp version currently setup.
> Add path to ISCC into PATH windows var:
Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH
> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded),
open file build/exe/doliwamp.iss and click on button "Compile".
The .exe file will be build into directory build.
See makepack-howto.txt for prerequisites.
--------------------------------------------------------------------------------------------------

View File

@ -1 +1 @@
/doliwamp.tmp.iss
/doliwamp.tmp.iss*

View File

@ -24,7 +24,6 @@ OutputBaseFilename=__FILENAMEEXEDOLIWAMP__
;OutputManifestFile=build\doliwampbuild.log
; Define full path from which all relative path are defined
; You must modify this to put here your dolibarr root directory
;SourceDir=Z:\home\ldestailleur\git\dolibarrxxx
SourceDir=..\..\..
AppId=doliwamp
AppPublisher=DoliCloud
@ -32,7 +31,7 @@ AppPublisherURL=https://www.dolicloud.com
AppSupportURL=https://www.dolibarr.org
AppUpdatesURL=https://www.dolibarr.org
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql software.
AppCopyright=Copyright (C) 2008-2022 Laurent Destailleur (NLTechno), Fabian Rodriguez (Le Goût du Libre)
AppCopyright=Copyright (C) 2008-2022 Laurent Destailleur (DoliCloud), Fabian Rodriguez (Le Goût du Libre)
DefaultDirName=c:\dolibarr
DefaultGroupName=Dolibarr
;LicenseFile=COPYING
@ -81,7 +80,7 @@ Name: "desktopicon"; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:
Name: "{app}\logs"
Name: "{app}\tmp"
Name: "{app}\dolibarr_documents"
Name: "{app}\bin\apache\apache2.4.41\logs"
Name: "{app}\bin\apache\apache2.4.51\logs"
[Files]
; Stop/start
@ -101,16 +100,10 @@ Source: "build\exe\doliwamp\UsedPort.exe"; DestDir: "{app}\"; Flags: ignoreversi
; Apache, Php, Mysql
; Put here path of Wampserver applications
; Value OK: apache 2.2.6, php 5.2.5 (5.2.11, 5.3.0 and 5.3.1 fails if php_exif, php_pgsql, php_zip is on), mysql 5.0.45
; Value OK: apache 2.2.11, php 5.3.0 (if no php_exif, php_pgsql, php_zip), mysql 5.0.45
; Value OK: apache 2.4.9, php 5.5.12, mysql 5.0.45 instead of 5.6.17 (wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe)
; Value OK: apache 2.4.41, php 7.3.12, mariadb10.4.10 (wampserver3.2.0_x64.exe)
;Source: "C:\Program Files\Wamp\bin\apache\apache2.4.9\*.*"; DestDir: "{app}\bin\apache\apache2.4.9"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
Source: "C:\wamp64\bin\apache\apache2.4.41\*.*"; DestDir: "{app}\bin\apache\apache2.4.41"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
;Source: "C:\Program Files\Wamp\bin\php\php5.5.12\*.*"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
Source: "C:\wamp64\bin\php\php7.3.12\*.*"; DestDir: "{app}\bin\php\php7.3.12"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
;Source: "C:\Program Files\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
Source: "C:\wamp64\bin\mariadb\mariadb10.4.10\*.*"; DestDir: "{app}\bin\mariadb\mariadb10.4.10"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
; Value OK: apache 2.4.51, php 7.3.33, mariadb10.6.5 (wampserver3.2.6_x64.exe)
Source: "C:\wamp64\bin\apache\apache2.4.51\*.*"; DestDir: "{app}\bin\apache\apache2.4.51"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,httpd.conf,wampserver.conf,*.log,*_log"
Source: "C:\wamp64\bin\php\php7.3.33\*.*"; DestDir: "{app}\bin\php\php7.3.33"; Flags: ignoreversion recursesubdirs; Excludes: "php.ini,phpForApache.ini,wampserver.conf,*.log,*_log"
Source: "C:\wamp64\bin\mariadb\mariadb10.6.5\*.*"; DestDir: "{app}\bin\mariadb\mariadb10.6.5"; Flags: ignoreversion recursesubdirs; Excludes: "my.ini,data\*,wampserver.conf,*.log,*_log,MySQLInstanceConfig.exe"
; Mysql data files (does not overwrite if exists)
; We must copy them because the tool mysql_install_db.exe to generate them at first install does not return to prompt so make install hang
@ -125,12 +118,10 @@ Source: "*.*"; DestDir: "{app}\www\dolibarr"; Flags: ignoreversion; Excludes: ".
; Config files
Source: "build\exe\doliwamp\dolibarr.conf.install"; DestDir: "{app}\alias"; Flags: ignoreversion;
;Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.9\conf"; Flags: ignoreversion;
Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.41\conf"; Flags: ignoreversion;
Source: "build\exe\doliwamp\httpd.conf.install"; DestDir: "{app}\bin\apache\apache2.4.51\conf"; Flags: ignoreversion;
Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mysql\mysql5.0.45"; Flags: ignoreversion;
Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mariadb\mariadb10.4.10"; Flags: ignoreversion;
;Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php5.5.12"; Flags: ignoreversion;
Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php7.3.12"; Flags: ignoreversion;
Source: "build\exe\doliwamp\my.ini.install"; DestDir: "{app}\bin\mariadb\mariadb10.6.5"; Flags: ignoreversion;
Source: "build\exe\doliwamp\php.ini.install"; DestDir: "{app}\bin\php\php7.3.33"; Flags: ignoreversion;
Source: "build\exe\doliwamp\index.php.install"; DestDir: "{app}\www"; Flags: ignoreversion;
Source: "build\exe\doliwamp\install.forced.php.install"; DestDir: "{app}\www\dolibarr\htdocs\install"; Flags: ignoreversion;
Source: "build\exe\doliwamp\openssl.conf"; DestDir: "{app}"; Flags: ignoreversion;
@ -236,12 +227,9 @@ procedure InitializeWizard();
begin
//version des applis, a modifier pour chaque version de WampServer 2
//apacheVersion := '2.4.9';
//phpVersion := '5.5.12' ;
apacheVersion := '2.4.41';
phpVersion := '7.3.12' ;
//mysqlVersion := '5.0.45';
mysqlVersion := '10.4.10';
apacheVersion := '2.4.51';
phpVersion := '7.3.33' ;
mysqlVersion := '10.6.5';
smtpServer := 'localhost';
apachePort := '80';
@ -375,9 +363,9 @@ begin
// Migration of database
// datadir := pathWithSlashes+'/bin/mariadb/marradb10.4.10/data';
// exedirold := pathWithSlashes+'/bin/mariadb/marradb10.4.10/';
// exedirnew := pathWithSlashes+'/bin/mariadb/marradb10.4.10/';
// datadir := pathWithSlashes+'/bin/mariadb/mariadb10.6.5/data';
// exedirold := pathWithSlashes+'/bin/mariadb/mariadb10.6.5/';
// exedirnew := pathWithSlashes+'/bin/mariadb/mariadb10.6.5/';
// If we have a new database version, we should only copy old my.ini file into new directory
// and change only all basedir= strings to use new version. Like this, data dir is still correct.
@ -1027,7 +1015,7 @@ Filename: "{app}\rundoliwamp.bat"; Description: {cm:LaunchNow}; Flags: shellexec
[UninstallDelete]
Type: files; Name: "{app}\*.*"
Type: files; Name: "{app}\bin\mariadb\mariadb10.4.10\*.*"
Type: files; Name: "{app}\bin\mariadb\mariadb10.6.5\*.*"
Type: filesandordirs; Name: "{app}\alias"
Type: filesandordirs; Name: "{app}\apps"
Type: filesandordirs; Name: "{app}\bin\apache"

View File

@ -65,7 +65,7 @@ $DIR||='.'; $DIR =~ s/([^\/\\])[\\\/]+$/$1/;
$SOURCE="$DIR/..";
$DESTI="$SOURCE/build";
if ($SOURCE !~ /^\//)
if ($SOURCE !~ /^\// && $SOURCE !~ /^[a-z]:/i)
{
print "Error: Launch the script $PROG.$Extension with its full path from /.\n";
print "$PROG.$Extension aborted.\n";
@ -76,15 +76,23 @@ if (! $ENV{"DESTIBETARC"} || ! $ENV{"DESTISTABLE"})
{
print "Error: Missing environment variables.\n";
print "You must define the environment variable DESTIBETARC and DESTISTABLE to point to the\ndirectories where you want to save the generated packages.\n";
print "$PROG.$Extension aborted.\n";
print "\n";
print "You can set them with\n";
print "On Linux:\n";
print "export DESTIBETARC='/tmp'; export DESTISTABLE='/tmp';\n";
print "On Windows:\n";
print "set DESTIBETARC=c:/tmp\n";
print "set DESTISTABLE=c:/tmp\n";
print "\n";
print "Example: DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'\n";
print "Example: DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'\n";
print "$PROG.$Extension aborted.\n";
sleep 2;
exit 1;
}
if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"})
{
print "Error: Directory of environment variable DESTIBETARC or DESTISTABLE does not exist.\n";
print "Error: Directory of environment variable DESTIBETARC ($ENV{'DESTIBETARC'}) or DESTISTABLE ($ENV{'DESTISTABLE'}) does not exist.\n";
print "$PROG.$Extension aborted.\n";
sleep 2;
exit 1;
@ -94,7 +102,7 @@ if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"})
# --------------
if ("$^O" =~ /linux/i || (-d "/etc" && -d "/var" && "$^O" !~ /cygwin/i)) { $OS='linux'; $CR=''; }
elsif (-d "/etc" && -d "/Users") { $OS='macosx'; $CR=''; }
elsif ("$^O" =~ /cygwin/i || "$^O" =~ /win32/i) { $OS='windows'; $CR="\r"; }
elsif ("$^O" =~ /cygwin/i || "$^O" =~ /win32/i || "$^O" =~ /msys/i) { $OS='windows'; $CR="\r"; }
if (! $OS) {
print "Error: Can't detect your OS.\n";
print "Can't continue.\n";
@ -390,7 +398,7 @@ if ($nboftargetok) {
$olddir=getcwd();
chdir("$SOURCE");
print "Clean $SOURCE/htdocs\n";
print "Clean $SOURCE/htdocs/includes/autoload.php\n";
$ret=`rm -f $SOURCE/htdocs/includes/autoload.php`;
$ret=`git ls-files . --exclude-standard --others`;
@ -1074,28 +1082,52 @@ if ($nboftargetok) {
print "Remove target $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe...\n";
unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
print "Check that in your Wine setup, you have created a Z: drive that point to your / directory.\n";
if ($OS eq 'windows') {
print "Check that ISCC.exe is in your PATH.\n";
} else {
print "Check that in your Wine setup, you have created a Z: drive that point to your / directory.\n";
}
$SOURCEBACK=$SOURCE;
$SOURCEBACK =~ s/\//\\/g;
print "Prepare file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss from \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
$ret=`cat "$SOURCE/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
print "Prepare file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\" from \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
#$ret=`cat "$SOURCE/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
open(IN, '<' . $SOURCE."/build/exe/doliwamp/doliwamp.iss") or die $!;
open(OUT, '>' . "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss") or die $!;
while(<IN>)
{
$_ =~ s/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g;
print OUT $_;
}
close(IN);
close(OUT);
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"\n";
$cmd= "wine ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\" on OS $OS\n";
if ($OS eq 'windows') {
$cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
} else {
#$cmd= "wine ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
}
print "$cmd\n";
$ret= `$cmd`;
#print "$ret\n";
print "ret=$ret\n";
# Move to final dir
print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
use File::Copy;
#$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
$ret=move("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe", "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
print "Remove tmp file $SOURCE/build/exe/doliwamp/doliwamp.tmp.iss\n";
$ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
#$ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
$ret=unlink("$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss");
next;
}
@ -1242,7 +1274,7 @@ if ($nboftargetok) {
print "\n----- Summary -----\n";
foreach my $target (sort keys %CHOOSEDTARGET) {
if ($target eq '-CHKSUM') { print "Checksum was generated"; next; }
if ($target eq '-CHKSUM') { print "Checksum was generated\n"; next; }
if ($CHOOSEDTARGET{$target} < 0) {
print "Package $target not built (bad requirement).\n";
} else {

View File

@ -1,7 +1,34 @@
----- Dolibarr Makepack How To -----
This documentation describe steps to build a BETA or RELEASE versions
of Dolibarr. There is a chapter for BETA version and a chapter for
RELEASE version.
of Dolibarr. There is a chapter for BETA version and a chapter for RELEASE version.
***** Prerequisites For Linux *****
Prerequisites to build tgz, debian and rpm packages:
> apt-get install perl tar dpkg dpatch p7zip-full rpm zip php-cli
Prerequisites to build autoexe DoliWamp package:
> apt-get install wine q4wine
> Launch "wine cmd" to check a drive Z: pointing to / exists.
> Install InnoSetup
For example by running isetup-5.5.8.exe (https://www.jrsoftware.org) https://files.jrsoftware.org/is/5/
> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB
For example by running wampserver3.2.0_x64.exe (https://www.wampserver.com).
See file build/exe/doliwamp.iss to know the doliwamp version currently setup.
> Add path to ISCC into PATH windows var:
Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH
> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded),
open file build/exe/doliwamp.iss and click on button "Compile".
The .exe file will be build into directory build.
***** Prerequisites For Windows *****
Install Perl
Install WampServer-3.2.*-64.exe
isetup-5.5.8.exe
***** Actions to do a BETA *****
This files describe steps made by Dolibarr packaging team to make a

View File

@ -67,7 +67,7 @@ Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mbstring
Requires: mysql-server, mysql
Requires: php-mysqli >= 4.1.0
%endif
%endif%_datadir/dolibarr/htdocs/eventorganization
%endif
%endif

View File

@ -111,7 +111,7 @@ $month = GETPOST("month", "int") ?GETPOST("month", "int") : date("m");
$week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W");
$day = GETPOST("day", "int") ?GETPOST("day", "int") : date("d");
$pid = GETPOST("search_projectid", "int", 3) ? GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo'
$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo', 'na' or -1
$type = GETPOSTISSET("search_type") ? GETPOST("search_type", 'aZ09') : GETPOST("type", 'aZ09');
$maxprint = GETPOSTISSET("maxprint") ? GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW;
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
@ -759,12 +759,14 @@ if ($type) {
if ($status == '0') {
$sql .= " AND a.percent = 0";
}
if ($status == '-1') {
if ($status == '-1' || $status == 'na') {
// Not applicable
$sql .= " AND a.percent = -1";
} // Not applicable
}
if ($status == '50') {
// Running already started
$sql .= " AND (a.percent > 0 AND a.percent < 100)";
} // Running already started
}
if ($status == 'done' || $status == '100') {
$sql .= " AND (a.percent = 100)";
}

View File

@ -101,7 +101,7 @@ $month = GETPOST("month", "int") ?GETPOST("month", "int") : date("m");
$week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W");
$day = GETPOST("day", "int") ?GETPOST("day", "int") : date("d");
$pid = GETPOSTISSET("search_projectid") ? GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo'
$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo', 'na' or -1
$type = GETPOSTISSET("search_type") ? GETPOST("search_type", 'alpha') : GETPOST("type", 'alpha');
$maxprint = ((GETPOST("maxprint", 'int') != '') ?GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
@ -627,12 +627,14 @@ if ($type) {
if ($status == '0') {
$sql .= " AND a.percent = 0";
}
if ($status == '-1') {
if ($status == '-1' || $status == 'na') {
// Not applicable
$sql .= " AND a.percent = -1";
} // Not applicable
}
if ($status == '50') {
// Running already started
$sql .= " AND (a.percent > 0 AND a.percent < 100)";
} // Running already started
}
if ($status == 'done' || $status == '100') {
$sql .= " AND (a.percent = 100)";
}

View File

@ -4914,8 +4914,9 @@ class Form
* @param string $question Question
* @param string $action Action
* @param array|string $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , 'size'=>, 'morecss'=>, 'moreattr'=>'autofocus' or 'style=...'))
* 'type' can be 'hidden', 'text', 'password', 'checkbox', 'radio', 'date', 'select', 'multiselect', 'morecss', 'other' or 'onecolumn'...
* @param string $selectedchoice '' or 'no', or 'yes' or '1' or '0'
* 'type' can be 'text', 'password', 'checkbox', 'radio', 'date', 'select', 'multiselect', 'morecss',
* 'other', 'onecolumn' or 'hidden'...
* @param int|string $selectedchoice '' or 'no', or 'yes' or '1', 1, '0' or 0
* @param int|string $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx
* @param int|string $height Force height of box (0 = auto)
* @param int $width Force width of box ('999' or '90%'). Ignored and forced to 90% on smartphones.

View File

@ -1718,7 +1718,7 @@ function dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $di
//print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("MediaFiles")).'" name="file_manager">';
$out .= '<!-- a link for button to open url into a dialog popup backtopagejsfields = '.$backtopagejsfields.' -->'."\n";
$out .= '<a class="cursorpointer button_'.$name.($morecss ? ' '.$morecss : '').'"'.$disabled.' title="'.dol_escape_htmltag($label).'">'.$buttonstring.'</a>';
$out .= '<a class="cursorpointer classlink button_'.$name.($morecss ? ' '.$morecss : '').'"'.$disabled.' title="'.dol_escape_htmltag($label).'">'.$buttonstring.'</a>';
$out .= '<div id="idfordialog'.$name.'" class="hidden">div for dialog</div>';
$out .= '<div id="varforreturndialogid'.$name.'" class="hidden">div for returned id</div>';
$out .= '<div id="varforreturndialoglabel'.$name.'" class="hidden">div for returned label</div>';

View File

@ -324,7 +324,8 @@ WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connec
WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here.
WarningPaypalPaymentNotCompatibleWithStrict=The value 'Strict' makes the online payment features not working correctly. Use 'Lax' instead.
WarningThemeForcedTo=Warning, theme has been forced to <b>%s</b> by hidden constant MAIN_FORCETHEME
WarningPagesWillBeDeleted=Warning, this will also delete all existing pages/containers of the website. You should export your website before, so you have a backup to re-import it later.
# Validate
RequireValidValue = Value not valid
RequireAtLeastXString = Requires at least %s character(s)

View File

@ -1,5 +1,6 @@
# Dolibarr language file - Source file is en_US - website
Shortname=Code
WebsiteName=Name of the website
WebsiteSetupDesc=Create here the websites you wish to use. Then go into menu Websites to edit them.
DeleteWebsite=Delete website
ConfirmDeleteWebsite=Are you sure you want to delete this web site? All its pages and content will also be removed. The files uploaded (like into the medias directory, the ECM module, ...) will remain.
@ -42,6 +43,8 @@ ViewPageInNewTab=View page in new tab
SetAsHomePage=Set as Home page
RealURL=Real URL
ViewWebsiteInProduction=View web site using home URLs
Virtualhost=Virtual host or domain name
VirtualhostDesc=The name of the Virtual host or domain (For example: www.mywebsite.com, mybigcompany.net, ...)
SetHereVirtualHost=<u>Use with Apache/NGinx/...</u><br>Create on your web server (Apache, Nginx, ...) a dedicated Virtual Host with PHP enabled and a Root directory on<br><strong>%s</strong>
ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup:
YouCanAlsoTestWithPHPS=<u>Use with PHP embedded server</u><br>On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running<br><strong>php -S 0.0.0.0:8080 -t %s</strong>
@ -145,3 +148,5 @@ ImportFavicon=Favicon
ErrorFaviconType=Favicon must be png
ErrorFaviconSize=Favicon must be sized 16x16, 32x32 or 64x64
FaviconTooltip=Upload an image which needs to be a png (16x16, 32x32 or 64x64)
NextContainer=Next page/container
PreviousContainer=Previous page/container

View File

@ -524,7 +524,7 @@ class MyObject extends CommonObject
* Delete object in database
*
* @param User $user User that deletes
* @param bool $notrigger false=launch triggers after, true=disable triggers
* @param bool $notrigger false=launch triggers, true=disable triggers
* @return int <0 if KO, >0 if OK
*/
public function delete(User $user, $notrigger = false)

View File

@ -548,9 +548,8 @@ if (empty($reshook)) {
}
//var_dump($object->array_languages);exit;
if (GETPOST('deletephoto')) {
$object->logo = '';
} elseif (!empty($_FILES['photo']['name'])) {
if (!empty($_FILES['photo']['name'])) {
$current_logo = $object->logo;
$object->logo = dol_sanitizeFileName($_FILES['photo']['name']);
}
@ -801,6 +800,13 @@ if (empty($reshook)) {
}
if ($file_OK) {
if (image_format_supported($_FILES['photo']['name']) > 0) {
if ($current_logo != $object->logo) {
$fileimg = $dir.'/'.$current_logo;
$dirthumbs = $dir.'/thumbs';
dol_delete_file($fileimg);
dol_delete_dir_recursive($dirthumbs);
}
dol_mkdir($dir);
if (@is_dir($dir)) {

View File

@ -5143,6 +5143,7 @@ span[phptag] {
}
.centpercent.websitebar {
width: calc(100% - 10px);
font-size: 0.94em;
}
.websitebar .buttonDelete, .websitebar .button {
text-shadow: none;
@ -7639,6 +7640,10 @@ div.clipboardCPValue.hidewithsize {
#dolpaymenttable {
padding: 5px;
}
.lilevel1 span.paddingright {
padding-right: 3px;
}
}
@media only screen and (max-width: 320px)

View File

@ -4992,6 +4992,7 @@ span[phptag] {
}
.centpercent.websitebar {
width: calc(100% - 10px);
font-size: 0.94em;
}
.websitebar .buttonDelete, .websitebar .button {
text-shadow: none;
@ -7319,6 +7320,10 @@ div.clipboardCPValue.hidewithsize {
#dolpaymenttable {
padding: 5px;
}
.lilevel1 span.paddingright {
padding-right: 3px;
}
}

View File

@ -1413,7 +1413,11 @@ if ($action == 'create' || $action == 'adduserldap') {
if ($action != 'edit') {
print dol_get_fiche_head($head, 'user', $title, -1, 'user');
dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin);
$morehtmlref = '<a href="'.DOL_URL_ROOT.'/user/vcard.php?id='.$object->id.'" class="refid">';
$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
$morehtmlref .= '</a>';
dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', $morehtmlref);
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
@ -1721,15 +1725,6 @@ if ($action == 'create' || $action == 'adduserldap') {
print dol_htmlentitiesbr($object->signature);
print "</td></tr>\n";
// VCard
print '<tr><td>'.$langs->trans("VCard").'</td>';
print '<td>';
print '<a href="'.DOL_URL_ROOT.'/user/vcard.php?id='.$object->id.'">';
print img_picto($langs->trans("Download"), 'vcard.png', 'class="paddingrightonly"');
print $langs->trans("Download");
print '</a>';
print "</td></tr>\n";
print "</table>\n";
// Credentials

View File

@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
//require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
//require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
/**
* Class Website
*/
@ -50,6 +51,10 @@ class Website extends CommonObject
*/
public $ismultientitymanaged = 1;
protected $childtablesoncascade = array();
/**
* @var string String with name of icon for website. Must be the part after the 'object_' into object_myobject.png
*/
@ -580,8 +585,8 @@ class Website extends CommonObject
/**
* Delete object in database
*
* @param User $user User that deletes
* @param bool $notrigger false=launch triggers after, true=disable triggers
* @param User $user User that deletes
* @param bool $notrigger false=launch triggers, true=disable triggers
*
* @return int <0 if KO, >0 if OK
*/
@ -596,20 +601,8 @@ class Website extends CommonObject
$this->db->begin();
if (!$error) {
if (!$notrigger) {
// Uncomment this and change WEBSITE to your own tag if you
// want this action calls a trigger.
//// Call triggers
//$result=$this->call_trigger('WEBSITE_DELETE',$user);
//if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
//// End call triggers
}
}
if (!$error) {
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element;
$sql .= ' WHERE rowid='.((int) $this->id);
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'website_page';
$sql .= ' WHERE fk_website = '.((int) $this->id);
$resql = $this->db->query($sql);
if (!$resql) {
@ -619,6 +612,12 @@ class Website extends CommonObject
}
}
// Delete common code. This include execution of trigger.
$result = $this->deleteCommon($user, $notrigger);
if ($result <= 0) {
$error++;
}
if (!$error && !empty($this->ref)) {
$pathofwebsite = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/website/'.$this->ref;

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2016-2020 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2016-2022 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2020 Nicolas ZABOURI <info@inovea-conseil.com>
*
* This program is free software; you can redistribute it and/or modify
@ -587,7 +587,7 @@ if ($action == 'addsite' && $usercanedit) {
if (!$error && !GETPOST('WEBSITE_REF', 'alpha')) {
$error++;
$langs->load("errors");
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities("Ref")), null, 'errors');
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities("WebsiteName")), null, 'errors');
}
if (!$error && !preg_match('/^[a-z0-9_\-\.]+$/i', GETPOST('WEBSITE_REF', 'alpha'))) {
$error++;
@ -1230,7 +1230,7 @@ if ($action == 'confirm_deletesite' && $confirm == 'yes' && $permissiontodelete)
exit;
} else {
$db->rollback();
dol_print_error($db);
setEventMessages($object->error, $object->errors, 'errors');
}
}
@ -2741,7 +2741,8 @@ if (!GETPOST('hide_websitemenu')) {
print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("CloneSite")).'" name="createfromclone">';
print '<input type="submit" class="buttonDelete bordertransp" name="deletesite" value="'.$langs->trans("Delete").'"'.($atleastonepage ? ' disabled="disabled"' : '').'>';
//print '<input type="submit" class="buttonDelete bordertransp" name="deletesite" value="'.$langs->trans("Delete").'"'.($atleastonepage ? ' disabled="disabled"' : '').'>';
print '<input type="submit" class="buttonDelete bordertransp" name="deletesite" value="'.$langs->trans("Delete").'">';
// Regenerate all pages
print '<a href="'.$_SERVER["PHP_SELF"].'?action=regeneratesite&token='.newToken().'&website='.urlencode($website->ref).'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("RegenerateWebsiteContent")).'"><span class="far fa-hdd"></span></a>';
@ -2933,12 +2934,12 @@ if (!GETPOST('hide_websitemenu')) {
if ($pagepreviousid) {
print '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?website='.urlencode($object->ref).'&pageid='.$pagepreviousid.'&action='.$action.'&token='.newToken().'">'.img_previous($langs->trans("PreviousContainer")).'</a>';
} else {
print '<span class="valignmiddle opacitymedium">'.img_previous($langs->trans("Previous")).'</span>';
print '<span class="valignmiddle opacitymedium">'.img_previous($langs->trans("PreviousContainer")).'</span>';
}
if ($pagenextid) {
print '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?website='.urlencode($object->ref).'&pageid='.$pagenextid.'&action='.$action.'&token='.newToken().'">'.img_next($langs->trans("NextContainer")).'</a>';
} else {
print '<span class="valignmiddle opacitymedium">'.img_next($langs->trans("Next")).'</span>';
print '<span class="valignmiddle opacitymedium">'.img_next($langs->trans("NextContainer")).'</span>';
}
print '</span>';
@ -2964,7 +2965,12 @@ if (!GETPOST('hide_websitemenu')) {
//array('type' => 'other','name' => 'newwebsite','label' => $langs->trans("WebSite"), 'value' => $formwebsite->selectWebsite($object->id, 'newwebsite', 0))
);
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteWebsite'), '', 'confirm_deletesite', $formquestion, 0, 1, 200);
if ($atleastonepage) {
$langs->load("errors");
$formquestion[] = array('type' => 'onecolumn', 'value' => '<div class="warning">'.$langs->trans("WarningPagesWillBeDeleted").'</div>');
}
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteWebsite'), '', 'confirm_deletesite', $formquestion, 0, 1, 210 + ($atleastonepage ? 70 : 0), 580);
print $formconfirm;
}
@ -3379,6 +3385,7 @@ if ($action == 'editcss') {
$htmltext = '';
print $form->textwithpicto($langs->trans('MainLanguage'), $htmltext, 1, 'help', '', 0, 2, 'WEBSITE_LANG');
print '</td><td>';
print img_picto('', 'language', 'class="picotfixedwidth"');
print $formadmin->select_language((GETPOSTISSET('WEBSITE_LANG') ? GETPOST('WEBSITE_LANG', 'aZ09comma') : ($object->lang ? $object->lang : '0')), 'WEBSITE_LANG', 0, null, 1, 0, 0, 'minwidth300', 2, 0, 0, array(), 1);
print '</td>';
print '</tr>';
@ -3388,6 +3395,7 @@ if ($action == 'editcss') {
$htmltext = $langs->trans("Example").': fr,de,sv,it,pt';
print $form->textwithpicto($langs->trans('OtherLanguages'), $htmltext, 1, 'help', '', 0, 2);
print '</td><td>';
print img_picto('', 'language', 'class="picotfixedwidth"');
print '<input type="text" class="flat" value="'.(GETPOSTISSET('WEBSITE_OTHERLANG') ? GETPOST('WEBSITE_OTHERLANG', 'alpha') : $object->otherlang).'" name="WEBSITE_OTHERLANG">';
print '</td>';
print '</tr>';
@ -3395,13 +3403,7 @@ if ($action == 'editcss') {
// VirtualHost
print '<tr><td class="tdtop">';
$htmltext = $langs->trans("SetHereVirtualHost", DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/website/{s1}'.$websitekey.'{s2}');
$htmltext = str_replace(array('{s1}', '{s2}'), array('<i>', '</i>'), $htmltext);
$htmltext .= '<br>';
$htmltext .= '<br>'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), DOL_DOCUMENT_ROOT);
$htmltext .= '<br>'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("WritePerm"), '{s1}');
$htmltext = str_replace('{s1}', DOL_DATA_ROOT.'/website<br>'.DOL_DATA_ROOT.'/medias', $htmltext);
$htmltext = $langs->trans("VirtualhostDesc");
print $form->textwithpicto($langs->trans('Virtualhost'), $htmltext, 1, 'help', '', 0, 2, 'virtualhosttooltip');
print '</td><td>';
print '<input type="text" class="flat minwidth300" value="'.(GETPOSTISSET('virtualhost') ? GETPOST('virtualhost', 'alpha') : $virtualurl).'" name="virtualhost">';
@ -3547,7 +3549,7 @@ if ($action == 'createsite') {
}
print '<!-- Add site -->'."\n";
//print '<div class="fichecenter">';
print '<div class="tabBar tabBarWithBottom">';
print '<table class="border centpercent">';
@ -3566,7 +3568,7 @@ if ($action == 'createsite') {
}
print '<tr><td class="titlefieldcreate fieldrequired">';
print $form->textwithpicto($langs->trans('WebSite'), $langs->trans("Example").': www.mywebsite.com, myportal, ...');
print $form->textwithpicto($langs->trans('WebsiteName'), $langs->trans("Example").': MyPortal, www.mywebsite.com, ...');
print '</td><td>';
print '<input type="text" class="flat maxwidth300" name="WEBSITE_REF" value="'.dol_escape_htmltag($siteref).'" autofocus>';
print '</td></tr>';
@ -3575,9 +3577,18 @@ if ($action == 'createsite') {
print $langs->trans('MainLanguage');
print '</td><td>';
$shortlangcode = preg_replace('/[_-].*$/', '', trim($langs->defaultlang));
print img_picto('', 'language', 'class="pictofixedwidth"');
print $formadmin->select_language((GETPOSTISSET('WEBSITE_LANG') ? GETPOST('WEBSITE_LANG', 'aZ09comma') : $shortlangcode), 'WEBSITE_LANG', 0, null, 1, 0, 0, 'minwidth300', 2, 0, 0, array(), 1);
print '</td></tr>';
print '<tr><td>';
$htmltext = $langs->trans("Example").': fr,de,sv,it,pt';
print $form->textwithpicto($langs->trans('OtherLanguages'), $htmltext, 1, 'help', '', 0, 2);
print '</td><td>';
print img_picto('', 'language', 'class="pictofixedwidth"');
print '<input type="text" class="flat minwidth300" name="WEBSITE_OTHERLANG" value="'.dol_escape_htmltag($siteotherlang).'">';
print '</td></tr>';
print '<tr><td>';
print $langs->trans('Description');
print '</td><td>';
@ -3585,28 +3596,22 @@ if ($action == 'createsite') {
print '</td></tr>';
print '<tr><td>';
$htmltext = $langs->trans("Example").': fr,de,sv,it,pt';
print $form->textwithpicto($langs->trans('OtherLanguages'), $htmltext, 1, 'help', '', 0, 2);
print '</td><td>';
print '<input type="text" class="flat minwidth300" name="WEBSITE_OTHERLANG" value="'.dol_escape_htmltag($siteotherlang).'">';
print '</td></tr>';
print '<tr><td>';
$htmltext = $langs->trans("SetHereVirtualHost", '{s1}');
$htmltext = str_replace('{s1}', DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/website/<i>websiteref</i>', $htmltext);
$htmltext = $langs->trans("VirtualhostDesc");
/*$htmltext = str_replace('{s1}', DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/website/<i>websiteref</i>', $htmltext);
$htmltext .= '<br>';
$htmltext .= '<br>'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), DOL_DOCUMENT_ROOT);
$htmltext .= '<br>'.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("WritePerm"), '{s1}');
$htmltext = str_replace('{s1}', DOL_DATA_ROOT.'/website<br>'.DOL_DATA_ROOT.'/medias', $htmltext);
$htmltext = str_replace('{s1}', DOL_DATA_ROOT.'/website<br>'.DOL_DATA_ROOT.'/medias', $htmltext);*/
print $form->textwithpicto($langs->trans('Virtualhost'), $htmltext, 1, 'help', '', 0, 2, 'virtualhosttooltip');
print $form->textwithpicto($langs->trans('Virtualhost'), $htmltext, 1, 'help', '', 0, 2, '');
print '</td><td>';
print '<input type="text" class="flat minwidth300" name="virtualhost" value="'.dol_escape_htmltag(GETPOST('virtualhost', 'alpha')).'">';
print '</td></tr>';
print '</table>';
print '</div>';
if ($action == 'createsite') {
print '<div class="center">';