From 08dc7af174bfa911c3520070f991e53cce25f36a Mon Sep 17 00:00:00 2001 From: LouisGac Date: Tue, 13 Jun 2017 18:43:47 +0200 Subject: [PATCH] Dev: Save page, retreive list of files to edit from template manifest --- application/controllers/admin/templates.php | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/application/controllers/admin/templates.php b/application/controllers/admin/templates.php index d10dd0d42da..98671c1e86e 100644 --- a/application/controllers/admin/templates.php +++ b/application/controllers/admin/templates.php @@ -1242,22 +1242,8 @@ protected function _initialise($templatename, $screenname, $editfile, $showsumma break; case 'save': - /* - $files=$Save; - $aData['aReplacements'] = $aGlobalReplacements; - $myoutput[] = templatereplace(file_get_contents("$templatedir/startpage.pstpl"), array(), $aData, 'Unspecified', false, NULL, array(), false, $oEditedTemplate); - $aData['aReplacements']['SAVEHEADING'] = App()->getController()->renderPartial("/survey/frontpage/saveForm/heading",array(),true); - $aData['aReplacements']['SAVEMESSAGE'] = App()->getController()->renderPartial("/survey/frontpage/saveForm/message",array(),true); - $aData['aReplacements']['SAVEALERT'] = App()->getController()->renderPartial("/survey/frontpage/saveForm/anonymized",array(),true); - $aData['aReplacements']['SAVEERROR'] = ""; - $saveForm = CHtml::beginForm(array("/survey/index","sid"=>$surveyid), 'post',array('id'=>'form-save')); - $saveForm .= App()->getController()->renderPartial("/survey/frontpage/saveForm/form",array('captcha'=>false),true); - $saveForm .= CHtml::endForm(); - $aData['aReplacements']['SAVEFORM'] = $saveForm; - $myoutput = array_merge($myoutput, doreplacement($oEditedTemplate->viewPath . "/save.pstpl", $aData, $oEditedTemplate)); - $myoutput[] = templatereplace(file_get_contents("$templatedir/endpage.pstpl"), array(), $aData, 'Unspecified', false, NULL, array(), false, $oEditedTemplate); - $myoutput[] = "\n"; - */ + $aSurveyListConfig = (array) $oEditedTemplate->templateEditor->screens->save; + $files = $aSurveyListConfig['file']; $myoutput = Yii::app()->twigRenderer->renderTemplateFromFile("layout_save.twig", array('aSurveyInfo'=>$thissurvey), true); break;