Skip to content

Commit

Permalink
Fix #3832: Updated admin template editor to allow functional editing …
Browse files Browse the repository at this point in the history
…of 1.86 templates.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8018 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
Evan Wills committed Nov 30, 2009
1 parent f954332 commit 694c242
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions admin/templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,16 +488,41 @@
$myoutput = array_merge($myoutput, doreplacement("$templaterootdir/$templatename/startgroup.pstpl"));
$myoutput = array_merge($myoutput, doreplacement("$templaterootdir/$templatename/groupdescription.pstpl"));

$question="How many roads must a man walk down?";
$questioncode="1a";
$question = array(
'all' => 'How many roads must a man walk down?'
,'text' => 'How many roads must a man walk down?'
,'code' => '1a'
,'help' => 'helpful text'
,'mandatory' => ''
,'man_message' => ''
,'valid_message' => ''
,'essentials' => 'id="question1"'
,'class' => 'list-radio'
,'man_class' => ''
,'input_error_class' => ''
);

// $questioncode="1a";
$answer="<ul><li><input type='radio' class='radiobtn' name='1' value='1' id='radio1' /><label class='answertext' for='radio1'>One</label></li><li><input type='radio' class='radiobtn' name='1' value='2' id='radio2' /><label class='answertext' for='radio2'>Two</label></li><li><input type='radio' class='radiobtn' name='1' value='3' id='radio3' /><label class='answertext' for='radio3'>Three</label></li></ul>\n";
$myoutput[]='<div id="question1" class="list-radio">';
$myoutput = array_merge($myoutput, doreplacement("$templaterootdir/$templatename/question.pstpl"));

$question='<span class="asterisk">*</span>'.$clang->gT("Please explain something in detail:");
$questioncode="2";
// $question='<span class="asterisk">*</span>'.$clang->gT("Please explain something in detail:");
// $questioncode="2";
$answer="<textarea class='textarea' rows='5' cols='40'>Some text in this answer</textarea>";
$myoutput[]='<div id="question2" class="text-long mandatory">';
$question = array(
'all' => '<span class="asterisk">*</span>'.$clang->gT("Please explain something in detail:")
,'text' => $clang->gT('Please explain something in detail:')
,'code' => '2a'
,'help' => ''
,'mandatory' => $clang->gT('*')
,'man_message' => ''
,'valid_message' => ''
,'essentials' => 'id="question2"'
,'class' => 'text-long'
,'man_class' => 'mandatory'
,'input_error_class' => ''
);

$myoutput = array_merge($myoutput, doreplacement("$templaterootdir/$templatename/question.pstpl"));

$myoutput = array_merge($myoutput, doreplacement("$templaterootdir/$templatename/endgroup.pstpl"));
Expand Down Expand Up @@ -614,7 +639,7 @@
}
$questionoutput=array();
foreach(file("$templaterootdir/$templatename/print_question.pstpl") as $op)
{
{ echo '<pre>line '.__LINE__.'$op = '.htmlspecialchars(print_r($op)).'</pre>';
$questionoutput[]=templatereplace($op, array(
'QUESTION_NUMBER'=>'1',
'QUESTION_CODE'=>'Q1',
Expand Down

0 comments on commit 694c242

Please sign in to comment.