Skip to content

Commit

Permalink
Fixed issue: column renaming killed surveygroup ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Oct 2, 2017
1 parent c372b7b commit c4dd0f2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions application/models/SurveysGroups.php
Expand Up @@ -8,7 +8,7 @@
* @property string $name
* @property string $title
* @property string $description
* @property integer $order
* @property integer $sortorder
* @property integer $owner_uid
* @property integer $parent_id
* @property string $created
Expand All @@ -33,8 +33,8 @@ public function rules()
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
array('name, order, created_by', 'required'),
array('order, owner_uid, parent_id, created_by', 'numerical', 'integerOnly'=>true),
array('name, sortorder, created_by', 'required'),
array('sortorder, owner_uid, parent_id, created_by', 'numerical', 'integerOnly'=>true),
array('name', 'length', 'max'=>45),
array('title', 'length', 'max'=>100),
array('description, created, modified', 'safe'),
Expand Down Expand Up @@ -67,7 +67,7 @@ public function attributeLabels()
'name' => 'Name',
'title' => 'Title',
'description' => 'Description',
'order' => 'Order',
'sortorder' => 'Sortorder',
'owner_uid' => 'Owner Uid',
'parent_id' => 'Parent',
'created' => 'Created',
Expand Down Expand Up @@ -140,17 +140,17 @@ public function getColumns(){

array(
'header' => gT('Order'),
'name' => 'order',
'name' => 'sortorder',
'type' => 'raw',
'value'=>'CHtml::link($data->order, Yii::app()->createUrl("admin/surveysgroups/sa/update/",array("id"=>$data->gsid)))',
'value'=>'CHtml::link($data->sortorder, Yii::app()->createUrl("admin/surveysgroups/sa/update/",array("id"=>$data->gsid)))',
'headerHtmlOptions'=>array('class' => 'hidden-xs'),
'htmlOptions' => array('class' => 'hidden-xs has-link'),
),


array(
'header' => gT('Actions'),
'name' => 'order',
'name' => 'sortorder',
'type' => 'raw',
'value'=> '$data->buttons',
'headerHtmlOptions'=>array('class' => 'hidden-xs'),
Expand Down Expand Up @@ -182,7 +182,7 @@ public function search()
$criteria->compare('name',$this->name,true);
$criteria->compare('title',$this->title,true);
$criteria->compare('description',$this->description,true);
$criteria->compare('order',$this->order);
$criteria->compare('sortorder',$this->sortorder);
$criteria->compare('owner_uid',$this->owner_uid);
$criteria->compare('parent_id',$this->parent_id);
$criteria->compare('created',$this->created,true);
Expand Down

0 comments on commit c4dd0f2

Please sign in to comment.