This commit is contained in:
Laurent Destailleur
2025-07-01 16:22:21 +02:00
parent e2c2f73e9c
commit ac892efb42
7 changed files with 43 additions and 38 deletions

View File

@@ -5823,7 +5823,7 @@ class Form
* @param int<0,1> $include [=0] Removed or 1=Keep only
* @param string $morecss More CSS
* @param int<0,2> $useempty 0=No empty value, 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. Default is 1.
* @return string|array<int,string>|array<int,array{id:int,fulllabel:string,color:string,picto:string}>|array<int,array{rowid:int,id:int,fk_parent:int,label:string,description:string,color:string,position:string,visible:int,ref_ext:string,picto:string,fullpath:string,fulllabel:string}> String list or Array of categories
* @return string|array<int,string>|array<int,array{id:int,fulllabel:string,data-html:?string,color:string,picto:string}>|array<int,array{rowid:int,id:int,fk_parent:int,label:string,description:string,color:string,position:string,visible:int,ref_ext:string,picto:string,fullpath:string,fulllabel:string,data-html:?string}> String list or Array of categories
* @see select_categories()
*/
public function select_all_categories($type, $selected = '', $htmlname = "parent", $maxlength = 64, $fromid = 0, $outputmode = 0, $include = 0, $morecss = '', $useempty = 1)
@@ -10821,18 +10821,18 @@ class Form
/**
* Return HTML code to output a photo
*
* @param string $modulepart Key to define module concerned ('societe', 'userphoto', 'memberphoto')
* @param string $modulepart Key to define module concerned ('societe', 'userphoto', 'memberphoto')
* @param Societe|Adherent|Contact|User|CommonObject $object Object containing data to retrieve file name
* @param int $width Width of photo
* @param int $height Height of photo (auto if 0)
* @param int<0,1> $caneditfield Add edit fields
* @param string $cssclass CSS name to use on img for photo
* @param string $imagesize 'mini', 'small' or '' (original)
* @param int<0,1> $addlinktofullsize Add link to fullsize image
* @param int<0,1> $cache 1=Accept to use image in cache
* @param ''|'user'|'environment' $forcecapture '', 'user' or 'environment'. Force parameter capture on HTML input file element to ask a smartphone to allow to open camera to take photo. Auto if ''.
* @param int<0,1> $noexternsourceoverwrite No overwrite image with extern source (like 'gravatar' or other module)
* @return string HTML code to output photo
* @param int $width Width of photo
* @param int $height Height of photo (auto if 0)
* @param int<0,1> $caneditfield Add edit fields
* @param string $cssclass CSS name to use on img for photo
* @param string $imagesize 'mini', 'small' or '' (original)
* @param int<0,1> $addlinktofullsize Add link to fullsize image
* @param int<0,1> $cache 1=Accept to use image in cache
* @param ''|'user'|'environment' $forcecapture '', 'user' (user-facing camera) or 'environment' ('outward-facing camera'). Force the parameter capture on HTML input file element to ask a smartphone to allow to open camera to take photo. Auto if ''.
* @param int<0,1> $noexternsourceoverwrite No overwrite image with extern source (like 'gravatar' or other module)
* @return string HTML code to output photo
* @see getImagePublicURLOfObject()
*/
public static function showphoto($modulepart, $object, $width = 100, $height = 0, $caneditfield = 0, $cssclass = 'photowithmargin', $imagesize = '', $addlinktofullsize = 1, $cache = 0, $forcecapture = '', $noexternsourceoverwrite = 0)
@@ -11010,7 +11010,7 @@ class Form
if ($maxmin > 0) {
$ret .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file
}
$ret .= '<input type="file" class="flat maxwidth200onsmartphone" name="photo" id="photoinput" accept="image/*"' . ($capture ? ' capture="' . $capture . '"' : '') . '>';
$ret .= '<input type="file" class="flat maxwidth200onsmartphone" name="photo" id="photoinput" accept="image/*"' . ($capture ? ' capture="' . dolPrintHTMLForAttribute($capture) . '"' : '') . '>';
$ret .= '</td></tr>';
$ret .= '</table>';
}