Skip to content

Commit

Permalink
Dev: Tokens display, massive actions, delete
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed May 26, 2016
1 parent 4a58069 commit f5e76d7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
11 changes: 11 additions & 0 deletions application/controllers/admin/tokens.php
Expand Up @@ -254,6 +254,17 @@ function bounceprocessing($iSurveyId)
exit; // if bounceprocessing : javascript : no more todo
}


public function deleteMultiple()
{
// TODO: permission checks
$aTokenIds = json_decode($_POST['sItems']);
$iSid = $_POST['iSid'];
TokenDynamic::model($iSid)->deleteRecords($aTokenIds);
return true;
//Yii::app()->getController()->renderPartial('/admin/survey/massive_actions/_delete_results', array('aResults'=>$aResults));
}

/**
* Browse Tokens
*/
Expand Down
3 changes: 2 additions & 1 deletion application/views/admin/token/browse.php
Expand Up @@ -243,7 +243,8 @@ function checkMandatoryAttr(value, colname) {
'dataProvider' => $model->search(),
'id' => 'token-grid',
'emptyText'=>gT('No tokens found.'),
'summaryText'=>gT('Displaying {start}-{end} of {count} result(s).').$massiveAction. sprintf(gT('%s rows per page'),
'template' => "{items}\n<div class=\"row-fluid\"><div class=\"col-sm-4\" id=\"massive-action-container\">$massiveAction</div><div class=\"col-sm-4 pager-container \">{pager}</div><div class=\"col-sm-4 summary-container\">{summary}</div></div>",
'summaryText'=>gT('Displaying {start}-{end} of {count} result(s).').' '. sprintf(gT('%s rows per page'),
CHtml::dropDownList(
'pageSize',
$pageSize,
Expand Down
4 changes: 3 additions & 1 deletion application/views/admin/token/massive_actions/_selector.php
Expand Up @@ -12,7 +12,9 @@
<ul class="dropdown-menu" aria-labelledby="tokenListActions">
<li>
<a href="#"
data-url="<?php echo App()->createUrl('/admin/tokens/sa/deleteMultipleSurveys/');?>"
data-url="<?php echo App()->createUrl('/admin/tokens/sa/deleteMultiple/');?>"
data-keepopen="no"
data-sid="<?php echo $_GET['surveyid']?>"
data-action="delete"
data-action-title="<?php eT('Delete tokens'); ?>"
data-modal-warning-title="<?php eT('Warning');?>"
Expand Down

0 comments on commit f5e76d7

Please sign in to comment.