Skip to content

Commit

Permalink
Dev: Add flash message when CPDB attribute is saved
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Mar 2, 2016
1 parent 5749a1e commit 8d3c3c1
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions application/controllers/admin/participantsaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -966,9 +966,12 @@ function getAttribute_json()
echo ls_json_encode($aData);
}

/*
* Responsible for showing the additional attribute for central database
*/
/**
* Responsible for showing the additional attribute for CPDB
* Edit attribute form
*
* @return void
*/
function viewAttribute()
{
$iAttributeId = Yii::app()->request->getQuery('aid');
Expand All @@ -984,10 +987,12 @@ function viewAttribute()
$this->_renderWrappedTemplate('participants', array('participantsPanel', 'viewAttribute'), $aData);
}

/*
* Responsible for saving the additional attribute. It iterates through all the new attributes added dynamically
* and iterates through them
*/
/**
* Responsible for saving the additional attribute. It iterates through all the new attributes added dynamically
* and iterates through them
*
* @return void
*/
function saveAttribute()
{
$iAttributeId = Yii::app()->request->getQuery('aid');
Expand All @@ -998,6 +1003,7 @@ function saveAttribute()
'visible' => Yii::app()->request->getPost('visible')
);
ParticipantAttributeName::model()->saveAttribute($aData);
Yii::app()->setFlashMessage(gT('Attribute was saved'), 'info');

// Save translations
if (isset($_POST['lang']))
Expand Down

0 comments on commit 8d3c3c1

Please sign in to comment.