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)); ?>