auto-convert photos to JPG (158)

This commit is contained in:
Roland Gruber 2013-11-01 14:22:13 +00:00
parent 8358172e8b
commit 0151736c60
1 changed files with 5 additions and 1 deletions

View File

@ -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')));