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 . '"';
|
$height = ' height="' . $this->height . '"';
|
||||||
}
|
}
|
||||||
$alt = ' alt="' . $this->alt . '"';
|
$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();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1612,7 +1612,9 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
$photoFile = '../../tmp/' . $jpeg_filename;
|
$photoFile = '../../tmp/' . $jpeg_filename;
|
||||||
$noPhoto = false;
|
$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 (!$this->isAdminReadOnly('jpegPhoto')) {
|
||||||
if ($noPhoto) {
|
if ($noPhoto) {
|
||||||
$imageContainer->addElement(new htmlAccountPageButton(get_class($this), 'photo', 'open', _('Add photo')));
|
$imageContainer->addElement(new htmlAccountPageButton(get_class($this), 'photo', 'open', _('Add photo')));
|
||||||
|
@ -2699,7 +2701,9 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
fclose ($outjpeg);
|
fclose ($outjpeg);
|
||||||
$photoFile = '../../tmp/' . $jpeg_filename;
|
$photoFile = '../../tmp/' . $jpeg_filename;
|
||||||
$photoSub = new htmlTable();
|
$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)) {
|
if (!in_array('jpegPhoto', $readOnlyFields)) {
|
||||||
$photoSubSub = new htmlTable();
|
$photoSubSub = new htmlTable();
|
||||||
$photoSubSub->addElement(new htmlTableExtendedInputCheckbox('removeReplacePhoto', false, _('Remove/replace photo'), null, false));
|
$photoSubSub->addElement(new htmlTableExtendedInputCheckbox('removeReplacePhoto', false, _('Remove/replace photo'), null, false));
|
||||||
|
|
|
@ -438,6 +438,11 @@ td.help {
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img.photo {
|
||||||
|
max-width: 200px;
|
||||||
|
max-height: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* schema browser */
|
/* schema browser */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue