Beispiel #1
0
 /**
  * Renders the portion of a form that contains the elements for editing
  * a template's contents. This is especially useful for tabbed forms.
  *
  * @param TemplateModel $template A Template entity
  * @param bool|ValidationResult $errors FALSE (if nothing was submitted) or
  *   a ValidationResult object. This is needed to render any inline erorrs
  *   on the form.
  * @return string HTML
  */
 private function renderEditPartial(TemplateModel $template, $errors)
 {
     $author = $template->getLastAuthor();
     $section = array(array('title' => '', 'desc' => sprintf(lang('last_edit'), ee()->localize->human_time($template->edit_date), empty($author) ? '-' : $author->screen_name), 'wide' => TRUE, 'fields' => array('template_data' => array('type' => 'textarea', 'attrs' => 'class="template-edit"', 'value' => $template->template_data))));
     return ee('View')->make('_shared/form/section')->render(array('name' => NULL, 'settings' => $section, 'errors' => $errors));
 }