diff --git a/application/controllers/system/Templates.php b/application/controllers/system/Templates.php index 3a16e4ccb..0f64ff9fa 100755 --- a/application/controllers/system/Templates.php +++ b/application/controllers/system/Templates.php @@ -87,6 +87,7 @@ class Templates extends FHC_Controller $data['bezeichnung'] = $this->input->post('bezeichnung', TRUE); $data['anmerkung'] = $this->input->post('anmerkung', TRUE); $data['mimetype'] = $this->input->post('mimetype', TRUE); + $data['attribute'] = $this->input->post('attribute', TRUE); $vorlage = $this->vorlagelib->saveVorlage($vorlage_kurzbz, $data); if ($vorlage->error) show_error($vorlage->retval); @@ -139,13 +140,11 @@ class Templates extends FHC_Controller public function preview($vorlagestudiengang_id) { + $formdata = $this->input->post('formdata', FALSE); + $daten = json_decode($formdata, TRUE); $vorlagetext = $this->vorlagelib->getVorlagetextById($vorlagestudiengang_id); if ($vorlagetext->error) show_error($vorlagetext->retval); - $daten = array - ( - 'vorname' => 'Christian' - ); $data = array ( 'text' => $this->vorlagelib->parseVorlagetext($vorlagetext->retval[0]->text, $daten) diff --git a/application/views/system/templatesEdit.php b/application/views/system/templatesEdit.php index f8bcc9b90..b9197f62c 100644 --- a/application/views/system/templatesEdit.php +++ b/application/views/system/templatesEdit.php @@ -1,18 +1,32 @@ load->view('templates/header', array('title' => 'TemplateEdit')); + $this->load->view('templates/header', array('title' => 'TemplateEdit', 'jsoneditor' => true)); ?>

Vorlage: vorlage_kurzbz; ?>

Bezeichnung: - Anmerkung: + Anmerkung:
+ MimeType:templatelib->widget("mimetype_widget", array('mimetype' => $vorlage->mimetype)); ?> + + Attribute: templatelib->widget("jsoneditor_widget", array('json' => $vorlage->attribute)); ?> + + - +
+ + diff --git a/application/views/system/templatetextEdit.php b/application/views/system/templatetextEdit.php index de6be6dde..b273c54a1 100644 --- a/application/views/system/templatetextEdit.php +++ b/application/views/system/templatetextEdit.php @@ -1,5 +1,5 @@ load->view('templates/header', array('title' => 'TemplateEdit', 'tinymce' => true)); + $this->load->view('templates/header', array('title' => 'TemplateEdit', 'tinymce' => true, 'jsonforms' => true)); ?>
@@ -18,13 +18,24 @@ StudiengangKZ: ?> - +

Preview-Data

- + templatelib->widget("jsonforms_widget", array('id' => 'dataform')); ?> + +
+ +