auto-convert photos to JPG (158)
This commit is contained in:
parent
8358172e8b
commit
0151736c60
|
@ -2163,7 +2163,11 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
*/
|
*/
|
||||||
function display_html_photo() {
|
function display_html_photo() {
|
||||||
$container = new htmlTable();
|
$container = new htmlTable();
|
||||||
$container->addElement(new htmlTableExtendedInputFileUpload('photoFile', _('Photo file (JPG format)'), 'photoUpload'), true);
|
$label = _('Photo file (JPG format)');
|
||||||
|
if (extension_loaded('imagick')) {
|
||||||
|
$label = _('Photo file');
|
||||||
|
}
|
||||||
|
$container->addElement(new htmlTableExtendedInputFileUpload('photoFile', $label, 'photoUpload'), true);
|
||||||
$buttonContainer = new htmlTable();
|
$buttonContainer = new htmlTable();
|
||||||
$buttonContainer->addElement(new htmlAccountPageButton(get_class($this), 'attributes', 'submit', _('Add photo')));
|
$buttonContainer->addElement(new htmlAccountPageButton(get_class($this), 'attributes', 'submit', _('Add photo')));
|
||||||
$buttonContainer->addElement(new htmlAccountPageButton(get_class($this), 'attributes', 'back', _('Back')));
|
$buttonContainer->addElement(new htmlAccountPageButton(get_class($this), 'attributes', 'back', _('Back')));
|
||||||
|
|
Loading…
Reference in New Issue