53 $this->FieldRenderer(
$form);
58 if (
$form->data->hasField($field))
68 $form->validator->add(
new RequiredValidator(
$field,
"Select an Image",
"",
false));
82 $this->_startField(
$field);
84 $key = $this->parent->data->get(
$field);
86 if (!$this->
size) $this->
size = $config[
"thumbnail_size"];
91 $src = $item->getThumbnail($this->
size,
true);
95 $src =
"/fakoli/images/noimage.gif";
98 <input type=
'text' name=
'<?echo $field ?>' id=
'<?echo $field ?>' value=
'<?echo $key ?>' style=
'display: none'>
99 <table
style=
'border: solid 1px #000'>
101 <td><img
id=
'<?echo $field ?>_preview' src=
'<?echo $src ?>' style=
'width:<?echo $this->size?>px; height:<?echo $this->size?>px'/></td>
108 <td><button
class=
'button' style=
'width: 100%' onclick=
"new ImagePicker().showSelectImageDialog('<?echo urlencode($field) ?>'); return false;"> Select Image </button></td>
125 if ($this->parent->data->get(
$field) ===
"")
127 $this->parent->data->set(
$field, 0);
static usingFeature()
Uses the specified framework feature(s).
static using()
Import the datamodels, views and manifest for the specified component(s).
static usingFile()
Uses the specified framework file(s) from the framework directory.
ImageSelectFieldRenderer(&$form, $field="", $required=false)
renderField($field="", $readonly=false)
renderReadOnly($field="")