Skip to content

Commit

Permalink
Fixed issue #15523: View saved but not submitted - filters do not work
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Nov 11, 2019
1 parent 09e1a54 commit ef83d05
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions application/controllers/admin/saved.php
Expand Up @@ -42,6 +42,15 @@ public function view($iSurveyId)
$aThisSurvey = getSurveyInfo($iSurveyId);
$oSavedControlModel = SavedControl::model();
$oSavedControlModel->sid = $iSurveyId;

// Filter state
if (Yii::app()->request->getParam('SavedControl',false)){
$aFilters = Yii::app()->request->getParam('SavedControl');
foreach($aFilters as $sFilterName => $sFilterValue){
$oSavedControlModel->$sFilterName = $sFilterValue;
}
}

$aData['model'] = $oSavedControlModel;
$aData['sSurveyName'] = $aThisSurvey['name'];
$aData['iSurveyId'] = $iSurveyId;
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/saved/savedlist_view.php
Expand Up @@ -13,7 +13,7 @@
'dataProvider' => $model->search(),
'columns' => $model->columns,
'filter' => $model,
'ajaxType' => 'POST',
'ajaxType' => 'GET',
'template' => "{items}\n<div class='row'><div class='col-sm-4 col-md-offset-4'>{pager}</div><div class='col-sm-4'>{summary}</div></div>",
'emptyText'=>gT('No customizable entries found.'),
'summaryText'=>gT('Displaying {start}-{end} of {count} result(s).').' '. sprintf(gT('%s rows per page'),
Expand Down

0 comments on commit ef83d05

Please sign in to comment.