Example #1
0
 public function render(html_form $form, $name, $input, $label, model_editor $editor, model_editor_field $field)
 {
     if ($this->isReadOnly) {
         return $this->renderStatic($form, $name, $input, $label, $editor, $field);
     }
     $parts = explode(' ', $input);
     $code = markup::textedit("{$name}_amount", $parts[0]);
     $code .= markup::selector("{$name}_currency", static::$currencies, $parts[1]);
     $classes = implode(' ', array_filter(array($this->class, 'currency')));
     $form->setRow($name, $label, $code, $this->isMandatory, $this->hint, null, $classes);
     return $this;
 }