max height+width for photos
This commit is contained in:
parent
260a8dbf02
commit
7d68a61681
|
@ -2360,7 +2360,11 @@ class htmlImage extends htmlElement {
|
|||
$height = ' height="' . $this->height . '"';
|
||||
}
|
||||
$alt = ' alt="' . $this->alt . '"';
|
||||
echo '<img' . $path . $width . $height . $alt . ">\n";
|
||||
$classes = '';
|
||||
if (!empty($this->cssClasses)) {
|
||||
$classes = 'class="' . implode(' ', $this->cssClasses) . '"';
|
||||
}
|
||||
echo '<img' . $path . $width . $height . $alt . $classes . ">\n";
|
||||
return array();
|
||||
}
|
||||
|
||||
|
|
|
@ -1612,7 +1612,9 @@ class inetOrgPerson extends baseModule implements passwordService {
|
|||
$photoFile = '../../tmp/' . $jpeg_filename;
|
||||
$noPhoto = false;
|
||||
}
|
||||
$imageContainer->addElement(new htmlImage($photoFile), true);
|
||||
$img = new htmlImage($photoFile);
|
||||
$img->setCSSClasses(array('photo'));
|
||||
$imageContainer->addElement($img, true);
|
||||
if (!$this->isAdminReadOnly('jpegPhoto')) {
|
||||
if ($noPhoto) {
|
||||
$imageContainer->addElement(new htmlAccountPageButton(get_class($this), 'photo', 'open', _('Add photo')));
|
||||
|
@ -2699,7 +2701,9 @@ class inetOrgPerson extends baseModule implements passwordService {
|
|||
fclose ($outjpeg);
|
||||
$photoFile = '../../tmp/' . $jpeg_filename;
|
||||
$photoSub = new htmlTable();
|
||||
$photoSub->addElement(new htmlImage($photoFile), true);
|
||||
$img = new htmlImage($photoFile);
|
||||
$img->setCSSClasses(array('photo'));
|
||||
$photoSub->addElement($img, true);
|
||||
if (!in_array('jpegPhoto', $readOnlyFields)) {
|
||||
$photoSubSub = new htmlTable();
|
||||
$photoSubSub->addElement(new htmlTableExtendedInputCheckbox('removeReplacePhoto', false, _('Remove/replace photo'), null, false));
|
||||
|
|
|
@ -438,6 +438,11 @@ td.help {
|
|||
font-size: 10pt;
|
||||
}
|
||||
|
||||
img.photo {
|
||||
max-width: 200px;
|
||||
max-height: 400px;
|
||||
}
|
||||
|
||||
|
||||
/* schema browser */
|
||||
|
||||
|
|
Loading…
Reference in New Issue