2007-07-19 12:40:28 +02:00
|
|
|
<?php
|
|
|
|
/**
|
2009-05-18 00:06:59 +02:00
|
|
|
* A field that allows you to attach an image to a record from within a iframe - designed for use in AJAX forms where it
|
|
|
|
* is not possible to use {@link SimpleImageField}.
|
2008-09-28 15:08:56 +02:00
|
|
|
*
|
2008-01-09 05:18:36 +01:00
|
|
|
* @package forms
|
|
|
|
* @subpackage fields-files
|
2007-07-19 12:40:28 +02:00
|
|
|
*/
|
2009-05-18 00:06:59 +02:00
|
|
|
class ImageField extends FileIFrameField {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return SimpleImageField_Disabled
|
|
|
|
*/
|
|
|
|
public function performReadonlyTransformation() {
|
|
|
|
return new SimpleImageField_Disabled($this->name, $this->title, $this->value, $this->form);
|
2007-07-19 12:40:28 +02:00
|
|
|
}
|
2009-05-18 00:06:59 +02:00
|
|
|
|
2007-07-19 12:40:28 +02:00
|
|
|
/**
|
2009-05-18 00:06:59 +02:00
|
|
|
* @return string
|
2007-07-19 12:40:28 +02:00
|
|
|
*/
|
2009-05-18 00:06:59 +02:00
|
|
|
public function FileTypeName() {
|
|
|
|
return _t('ImageField.IMAGE', 'Image');
|
2007-07-19 12:40:28 +02:00
|
|
|
}
|
2009-05-18 00:06:59 +02:00
|
|
|
|
|
|
|
}
|