Exemple #1
0
 /**
  * @inheritDoc IElementType::getEditorHtml()
  *
  * @param BaseElementModel $element
  *
  * @return string
  */
 public function getEditorHtml(BaseElementModel $element)
 {
     $html = craft()->templates->renderMacro('_includes/forms', 'textField', array(array('label' => Craft::t('Filename'), 'id' => 'filename', 'name' => 'filename', 'value' => $element->filename, 'errors' => $element->getErrors('filename'), 'first' => true, 'required' => true)));
     $html .= craft()->templates->renderMacro('_includes/forms', 'textField', array(array('label' => Craft::t('Title'), 'locale' => $element->locale, 'id' => 'title', 'name' => 'title', 'value' => $element->title, 'errors' => $element->getErrors('title'), 'required' => true)));
     $html .= parent::getEditorHtml($element);
     return $html;
 }