Skip to content

Commit

Permalink
Fixed issue #11001: Selecting a screen in the template editor fails
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Apr 22, 2016
1 parent 6f23b64 commit 32aa2e8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
20 changes: 0 additions & 20 deletions application/controllers/admin/templates.php
Expand Up @@ -372,7 +372,6 @@ protected function _strip_ext($name)
*/
public function index($editfile = 'startpage.pstpl', $screenname = 'welcome', $templatename = '', $useindex=false)
{

if(!$templatename)
{
$templatename = Yii::app()->getConfig("defaulttemplate");
Expand Down Expand Up @@ -400,25 +399,6 @@ public function index($editfile = 'startpage.pstpl', $screenname = 'welcome', $t
unset(Yii::app()->session['step']);
}

/**
* templates::screenredirect()
* Function that modify order of arguments and pass to main viewing function i.e. view()
*
* @access public
* @param string $editfile
* @param string $templatename
* @param string $screenname
* @return void
*/
public function screenredirect($editfile = 'startpage.pstpl', $templatename = '', $screenname = 'welcome')
{
if(!$templatename)
{
$templatename = Yii::app()->getConfig("defaulttemplate");
}
$this->getController()->redirect(array("admin/templates/sa/view/editfile/" . $editfile . "/screenname/" . $screenname,'templatename'=>$templatename));
}

/**
* Function that modify order of arguments and pass to main viewing function i.e. view()
*
Expand Down
Expand Up @@ -188,7 +188,7 @@ function copyprompt(text, defvalue, copydirectory, action)

<div class="form-group">
<label for='listboxtemplates'><?php eT("Screen:"); ?></label>
<select class="listboxtemplates form-control" id='listboxtemplates' name='screenname' onchange="javascript: window.open('<?php echo $this->createUrl("admin/templates/sa/screenredirect?editfile/".$editfile."/templatename/".$templatename); ?>?screenname='+encodeURI(this.value), '_top')">
<select class="listboxtemplates form-control" id='listboxtemplates' name='screenname' onchange="javascript: window.open('<?php echo $this->createUrl("admin/templates/sa/view/editfile/".$editfile);?>/screenname/'+encodeURI(this.value)+'?templatename=<?php echo urlencode ($templatename); ?>', '_top')">
<?php echo makeoptions($screens, "id", "name", HTMLEscape($screenname) ); ?>
</select>
</div>
Expand Down

0 comments on commit 32aa2e8

Please sign in to comment.