Skip to content

Commit

Permalink
Dev: Save page, retreive list of files to edit from template manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Jun 13, 2017
1 parent b4d8e7c commit 08dc7af
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions application/controllers/admin/templates.php
Expand Up @@ -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;

Expand Down

0 comments on commit 08dc7af

Please sign in to comment.