Skip to content

Commit

Permalink
Fixed issue #6659: Missing translations in token administration
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Oct 7, 2012
1 parent 18a09b5 commit 7ce394e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 31 deletions.
2 changes: 1 addition & 1 deletion application/controllers/admin/tokens.php
Expand Up @@ -1086,7 +1086,7 @@ function addDummies($iSurveyId, $subaction = '')
$aData['thissurvey'] = $thissurvey;
$aData['surveyid'] = $iSurveyId;
$aData['tokenlength'] = $tokenlength;
$aData['dateformatdetails'] = getDateFormatData(Yii::app()->session['dateformat']);
$aData['dateformatdetails'] = getDateFormatData(Yii::app()->session['dateformat'],$clang->langcode);

$this->_renderWrappedTemplate('token', array('tokenbar', 'dummytokenform'), $aData);
}
Expand Down
4 changes: 2 additions & 2 deletions application/views/admin/survey/listSurveys_view.php
Expand Up @@ -27,12 +27,12 @@
var sOperator14= '<?php $clang->eT("does not contain",'js');?>';
var sFind= '<?php $clang->eT("Filter",'js');?>';
var sReset= '<?php $clang->eT("Reset",'js');?>';
var sSelectColumns= '<?php $clang->eT("Select columns",'js');?>';
var sSelectColumns= '<?php $clang->eT("Select columns",'js');?>';
var sSubmit= '<?php $clang->eT("Save",'js');?>';

var sCancel = '<?php $clang->eT("Cancel",'js');?>';
var sSearchTitle ='<?php $clang->eT("Filter surveys",'js');?>';
var sRefresh ='<?php $clang->eT("Reload survey list",'js');?>';
var sRefreshTitle ='<?php $clang->eT("Reload survey list",'js');?>';
var delBtnCaption ='<?php $clang->eT("Save",'js');?>';
var sEmptyRecords ='<?php $clang->eT("There are currently no surveys.",'js');?>';
var sConfirmationExpireMessage='<?php $clang->eT("Are you sure you want to expire these surveys?",'js');?>';
Expand Down
6 changes: 6 additions & 0 deletions application/views/admin/token/browse.php
Expand Up @@ -64,6 +64,12 @@
var jsonUrl = "<?php echo Yii::app()->getController()->createUrl('admin/tokens/getTokens_json/surveyid/' . $surveyid); ?>";
var postUrl = "<?php echo Yii::app()->getController()->createUrl("admin/participants/setSession"); ?>";
var editUrl = "<?php echo Yii::app()->getController()->createUrl('admin/tokens/editToken/surveyid/' . $surveyid); ?>";
var sEmptyRecords ='<?php $clang->eT("Participant table is empty.",'js');?>';
var sCaption ='<?php $clang->eT("Survey participants",'js');?>';
var sDelTitle = '<?php $clang->eT("Delete selected participant(s) from this survey",'js');?>';
var sRefreshTitle ='<?php $clang->eT("Reload participant list",'js');?>';
var noSearchResultsTxt = '<?php $clang->eT("No survey participants matching the search criteria",'js');?>';
var sFind= '<?php $clang->eT("Filter",'js');?>';
var remindurl = "<?php echo Yii::app()->getController()->createUrl("admin/tokens/email/action/remind/surveyid/{$surveyid}/tokenids/|"); ?>";
var attMapUrl = "<?php echo $this->createUrl("admin/participants/attributeMapToken/sid/");?>";
var invitemsg = "<?php echo $clang->eT("Send invitation emails to the selected entries (if they have not yet been sent an invitation email)"); ?>"
Expand Down
11 changes: 2 additions & 9 deletions scripts/admin/listsurvey.js
Expand Up @@ -122,10 +122,11 @@ $(document).ready(function(){
});
jQuery("#displaysurveys").jqGrid('navGrid','#pager',{ deltitle: sDelTitle,
searchtitle: sSearchTitle,
refreshtitle: sRefreshTitle,
add:false,
del:true,
edit:false,
refresh: false,
refresh: true,
search: true
},{},{},{ msg:delmsg,
bSubmit: sDelCaption,
Expand All @@ -139,14 +140,6 @@ $(document).ready(function(){
Reset: sReset
});
jQuery("#displaysurveys").jqGrid('filterToolbar', {searchOnEnter : false,defaultSearch: 'cn'});
jQuery("#displaysurveys").jqGrid('navButtonAdd','#pager',{
buttonicon:"ui-icon-refresh",
caption:"",
title: sRefresh,
onClickButton : function (){
$("#displaysurveys").setGridParam({datatype:'json', page:1}).trigger('reloadGrid');
}
});
jQuery("#displaysurveys").jqGrid('navButtonAdd','#pager',{
buttonicon:"ui-icon-calculator",
caption:"",
Expand Down
26 changes: 7 additions & 19 deletions scripts/admin/tokens.js
Expand Up @@ -92,6 +92,7 @@ $(document).ready(function() {
});
var lastSel,lastSel2;
jQuery("#displaytokens").jqGrid({
emptyrecords: sEmptyRecords,
align:"center",
headertitles: true,
url: jsonUrl,
Expand Down Expand Up @@ -164,9 +165,11 @@ $(document).ready(function() {
row.find('.token_edit').click();
},
pager: "#pager",
caption: "Tokens"
caption: sCaption
});
jQuery("#displaytokens").jqGrid('navGrid','#pager',{
deltitle: sDelTitle,
refreshtitle: sRefreshTitle,
add:false,
del:true,
edit:false,
Expand Down Expand Up @@ -209,7 +212,7 @@ $(document).ready(function() {
});
$("#displaytokens").navButtonAdd('#pager',{
caption:"",
title:"Full Search",
title: sFind,
buttonicon:'searchicon',
onClickButton:function(){
var dialog_buttons={};
Expand Down Expand Up @@ -274,30 +277,15 @@ $(document).ready(function() {
$(this).dialog("close");
};
dialog_buttons[resetBtn]=function(){
jQuery("#displaytokens").jqGrid('setGridParam',{
url:jsonUrl,
gridComplete: function(){
if(jQuery("#displaytokens").jqGrid('getGridParam', 'records') == 0) {
var dialog_buttons={};
dialog_buttons[okBtn]=function(){
$( this ).dialog( "close" );
};
$("<p>"+noSearchResultsTxt+"</p>").dialog({
modal: true,
buttons: dialog_buttons,
resizable: false
});
}
}
});
$("#displaytokens").jqGrid('setGridParam', { search: false, postData: { "filters": ""} }).trigger("reloadGrid");
$(this).dialog("close");
};
/* End of building array for button functions */
$("#search").dialog({
height: 300,
width: 750,
modal: true,
title : 'Full Search',
title : sFind,
buttons: dialog_buttons
});
}
Expand Down

0 comments on commit 7ce394e

Please sign in to comment.