Skip to content

Commit

Permalink
Dev Text changes for tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed May 30, 2016
1 parent 467eb50 commit a8e53f3
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 37 deletions.
4 changes: 2 additions & 2 deletions application/controllers/admin/dataentry.php
Expand Up @@ -1882,7 +1882,7 @@ public function insert()
VALUES
(".implode(',',$values).")";
dbExecuteAssoc($SQL);
$aDataentrymsgs[] = CHtml::tag('font', array('class'=>'successtitle'), gT("A token entry for the saved survey has been created too."));
$aDataentrymsgs[] = CHtml::tag('font', array('class'=>'successtitle'), gT("A survey participant entry for the saved survey has been created too."));
//$aDataentryoutput .= "<font class='successtitle'></font><br />\n";
}
if ($saver['email'])
Expand Down Expand Up @@ -2195,7 +2195,7 @@ public function view($surveyid, $lang=NULL)
$answers[] = $ansrow;
}
$cdata['answers']=$answers;
App()->getClientScript()->registerPackage('jquery-actual');
App()->getClientScript()->registerPackage('jquery-actual');
$this->registerScriptFile( 'SCRIPT_PATH', 'ranking.js');
$this->registerCssFile( 'PUBLIC', 'ranking.css' );
unset($answers);
Expand Down
10 changes: 5 additions & 5 deletions application/controllers/admin/tokens.php
Expand Up @@ -518,7 +518,7 @@ function getTokens_json($iSurveyId, $search = null)
// Add delete icon
if($bTokenDeletePermission){
$attribs = array('onclick' => 'if (confirm("' . gT("Are you sure you want to delete this entry?") . ' (' . $token['tid'] . ')")) {$("#displaytokens").delRowData(' . $token['tid'] . ');$.post(delUrl,{tid:' . $token['tid'] . '});}');
$action .= viewHelper::getIconLink('inputbuttons-square glyphicon glyphicon-trash text-warning', null, gT("Delete token entry"), null, 'imagelink btnDelete', $attribs);
$action .= viewHelper::getIconLink('inputbuttons-square glyphicon glyphicon-trash text-warning', null, gT("Delete survey participant"), null, 'imagelink btnDelete', $attribs);
}

// Add email button
Expand All @@ -538,7 +538,7 @@ function getTokens_json($iSurveyId, $search = null)

// Add edit button
if($bTokenUpdatePermission) {
$action .= viewHelper::getIconLink('inputbuttons-square glyphicon glyphicon-pencil text-success', null, gT("Edit token entry"), null, 'imagelink token_edit');
$action .= viewHelper::getIconLink('inputbuttons-square glyphicon glyphicon-pencil text-success', null, gT("Edit survey participant"), null, 'imagelink token_edit');
}

// Add view button?
Expand Down Expand Up @@ -910,7 +910,7 @@ function edit($iSurveyId, $iTokenId)
$aData['sidemenu']['state'] = false;
$this->_renderWrappedTemplate('token', array( 'message' => array(
'title' => gT("Success"),
'message' => gT("The token entry was successfully updated.") . "<br /><br />\n"
'message' => gT("The survey participant was successfully updated.") . "<br /><br />\n"
. "\t\t<input class='btn btn-default btn-lg' type='button' class='btn btn-large btn-default' value='" . gT("Browse participants") . "' onclick=\"window.open('" . $this->getController()->createUrl("admin/tokens/sa/browse/surveyid/$iSurveyId/") . "', '_top')\" />\n"
)), $aData);
}
Expand Down Expand Up @@ -1091,7 +1091,7 @@ function addDummies($iSurveyId, $subaction = '')
if(!$invalidtokencount)
{
$aData['success'] = true;
Yii::app()->session['flashmessage'] = gT("New dummy tokens were added.");
Yii::app()->session['flashmessage'] = gT("New dummy participants were added.");
//admin/tokens/sa/browse/surveyid/652779//
$this->getController()->redirect(array("/admin/tokens/sa/browse/surveyid/{$iSurveyId}"));
}
Expand All @@ -1100,7 +1100,7 @@ function addDummies($iSurveyId, $subaction = '')
$aData['success'] = false;
$message= array(
'title' => gT("Failed"),
'message' => "<p>".sprintf(gT("Only %s new dummy tokens were added after %s trials."),$newDummyToken,$invalidtokencount)
'message' => "<p>".sprintf(gT("Only %s new dummy participants were added after %s trials."),$newDummyToken,$invalidtokencount)
.gT("Try with a bigger token length.")."</p>"
."\n<input type='button' value='"
. gT("Browse participants") . "' onclick=\"window.open('" . $this->getController()->createUrl("admin/tokens/sa/browse/surveyid/$iSurveyId") . "', '_top')\" />\n"
Expand Down
4 changes: 2 additions & 2 deletions application/views/admin/responses/browseindex_view.php
Expand Up @@ -24,9 +24,9 @@
<tbody>
<tr><th><?php eT("Total invitations sent"); ?></th><td><?php echo $tokeninfo['sent']; ?></td></tr>
<tr><th><?php eT("Total surveys completed"); ?></th><td><?php echo $tokeninfo['completed']; ?></td></tr>
<tr><th><?php eT("Total with no unique Token"); ?></th><td><?php echo $tokeninfo['invalid'] ?></td></tr>
<tr><th><?php eT("Total with no unique token"); ?></th><td><?php echo $tokeninfo['invalid'] ?></td></tr>
</tbody>
<tr><th><?php eT("Total records in this token table"); ?></th><td><?php echo $tokeninfo['count']; ?></td></tr>
<tr><th><?php eT("Total records"); ?></th><td><?php echo $tokeninfo['count']; ?></td></tr>
</table>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions application/views/admin/token/addtokenpost.php
Expand Up @@ -11,9 +11,9 @@
<!-- Success -->
<?php if ($success): ?>
<div class="jumbotron message-box">
<h2>Add token entry</h2>
<h2><?php eT("Adding survey participant entry..."); ?></h2>
<p class="lead text-success"><?php eT("Success"); ?></p>
<p><?php eT("New token was added."); ?></p>
<p><?php eT("New entry was added."); ?></p>
<p>
<input class="btn btn-large btn-default" type='button' value='<?php eT("Browse survey participants"); ?>' onclick="window.open('<?php echo $this->createUrl("admin/tokens/sa/browse/surveyid/$surveyid"); ?>', '_top')" /><br />
<input class="btn btn-large btn-default" type='button' value='<?php eT("Add another participant"); ?>' onclick="window.open('<?php echo $this->createUrl("admin/tokens/sa/addnew/surveyid/$surveyid"); ?>', '_top')" /><br />
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/token/browse.php
Expand Up @@ -139,7 +139,7 @@ function checkMandatoryAttr(value, colname) {
</script>

<div class='side-body <?php echo getSideBodyClass(false); ?>'>
<?php $this->renderPartial('/admin/survey/breadcrumb', array('oSurvey'=>$oSurvey, 'token'=>true, 'active'=>gT("Survey participants"))); ?>
<?php $this->renderPartial('/admin/survey/breadcrumb', array('oSurvey'=>$oSurvey, 'token'=>true, 'active'=>gT("Display"))); ?>
<h3><?php eT("Survey participants",'js'); ?></h3>

<!-- CGridView -->
Expand Down
4 changes: 2 additions & 2 deletions application/views/admin/token/csvupload.php
Expand Up @@ -6,8 +6,8 @@
?>

<div class='side-body <?php echo getSideBodyClass(false); ?>'>
<?php $this->renderPartial('/admin/survey/breadcrumb', array('oSurvey'=>$oSurvey, 'token'=>true, 'active'=>gT("Import tokens from CSV file"))); ?>
<h3><?php eT("Import tokens from CSV file"); ?></h3>
<?php $this->renderPartial('/admin/survey/breadcrumb', array('oSurvey'=>$oSurvey, 'token'=>true, 'active'=>gT("Import survey participants from CSV file"))); ?>
<h3><?php eT("Import survey participants from CSV file"); ?></h3>

<div class="row">
<div class="col-lg-12 content-right">
Expand Down
10 changes: 5 additions & 5 deletions application/views/admin/token/dummytokenform.php
Expand Up @@ -5,8 +5,8 @@
?>

<div class='side-body <?php echo getSideBodyClass(false); ?>'>
<?php $this->renderPartial('/admin/survey/breadcrumb', array('oSurvey'=>$oSurvey, 'token'=>true, 'active'=>gT("Create dummy tokens"))); ?>
<h3><?php eT("Create dummy tokens"); ?></h3>
<?php $this->renderPartial('/admin/survey/breadcrumb', array('oSurvey'=>$oSurvey, 'token'=>true, 'active'=>gT("Create dummy participants"))); ?>
<h3><?php eT("Create dummy participants"); ?></h3>

<div class="row">
<div class="col-lg-12 content-right">
Expand All @@ -22,7 +22,7 @@

<!-- Number of tokens -->
<div class="form-group">
<label class="col-sm-2 control-label" for='amount'><?php eT("Number of tokens"); ?>:</label>
<label class="col-sm-2 control-label" for='amount'><?php eT("Number of participants:"); ?></label>
<div class="col-sm-2">
<input class='form-control' type='text' size='20' id='amount' name='amount' value="100" />
</div>
Expand Down Expand Up @@ -54,7 +54,7 @@

<!-- Email -->
<div class="form-group">
<label class="col-sm-2 control-label" for='email'><?php eT("Email"); ?>:</label>
<label class="col-sm-2 control-label" for='email'><?php eT("Email address:"); ?></label>
<div class="col-sm-2">
<input class='form-control' type='email' maxlength='320' size='50' id='email' name='email' value="" />
</div>
Expand Down Expand Up @@ -151,7 +151,7 @@

<!-- Buttons -->
<p>
<input type='submit' class="hidden" value='<?php eT("Add dummy tokens"); ?>' />
<input type='submit' class="hidden" value='1' />
<input type='hidden' name='sid' value='$surveyid' />
</p>
</form>
Expand Down
10 changes: 5 additions & 5 deletions application/views/admin/token/exportdialog.php
@@ -1,7 +1,7 @@
<!-- Token export options -->
<div class='side-body <?php echo getSideBodyClass(false); ?>'>
<?php $this->renderPartial('/admin/survey/breadcrumb', array('oSurvey'=>$oSurvey, 'token'=>true, 'active'=>gT("Token export options"))); ?>
<h3><?php eT("Token export options"); ?></h3>
<?php $this->renderPartial('/admin/survey/breadcrumb', array('oSurvey'=>$oSurvey, 'token'=>true, 'active'=>gT("Survey participant export options"))); ?>
<h3><?php eT("Survey participant export options"); ?></h3>
<div class="row">
<div class="col-lg-12 content-right">
<?php echo CHtml::form(array("admin/tokens/sa/exportdialog/surveyid/$surveyid"), 'post',array('class'=>'form-core settingswidget form-horizontal','id'=>'bouncesettings','name'=>'frmeditquestion')); ?>
Expand Down Expand Up @@ -90,7 +90,7 @@
<!--Delete exported tokens -->
<div class="form-group control-group " data-name="tokendeleteexported">
<label class="default control-label col-lg-2 col-sm-5 col-md-2" for="tokendeleteexported">
<?php eT('Delete exported tokens:'); ?>
<?php eT('Delete exported participants:'); ?>
</label>
<div class="default col-lg-3 col-sm-5 col-md-7 controls">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
Expand All @@ -102,7 +102,7 @@
?>
</div>
<div class="alert alert-warning col-lg-4 col-sm-2 col-md-3 controls" role="alert">
<?php eT('Warning: Deleted token entries cannot be recovered.'); ?>
<?php eT('Warning: Deleted participants entries cannot be recovered.'); ?>
</div>
</div>
</div>
Expand All @@ -121,7 +121,7 @@
'settings' => $aSettings,
'action'=>$sAction,
'form' => true,
'title' => gT("Token export options"),
'title' => gT("Survey participant options"),
'buttons' => $aButtons,
));*/
?>
4 changes: 2 additions & 2 deletions application/views/admin/token/import.php
@@ -1,7 +1,7 @@
<!-- Import.php -->
<div class='side-body <?php echo getSideBodyClass(false); ?>'>
<?php $this->renderPartial('/admin/survey/breadcrumb', array('oSurvey'=>$oSurvey, 'token'=>true, 'active'=>gT("Import tokens from CSV file"))); ?>
<h3><?php eT("Import tokens from CSV file"); ?></h3>
<?php $this->renderPartial('/admin/survey/breadcrumb', array('oSurvey'=>$oSurvey, 'token'=>true, 'active'=>gT("Import survey participants from CSV file"))); ?>
<h3><?php eT("Import survey participants from CSV file"); ?></h3>

<div class="row">
<div class="col-lg-12 content-right">
Expand Down
4 changes: 2 additions & 2 deletions application/views/admin/token/ldapform.php
Expand Up @@ -5,8 +5,8 @@
?>

<div class='side-body <?php echo getSideBodyClass(false); ?>'>
<?php $this->renderPartial('/admin/survey/breadcrumb', array('oSurvey'=>$oSurvey, 'token'=>true, 'active'=>gT("Import tokens from LDAP"))); ?>
<h3><?php eT("Import tokens from LDAP"); ?></h3>
<?php $this->renderPartial('/admin/survey/breadcrumb', array('oSurvey'=>$oSurvey, 'token'=>true, 'active'=>gT("Import survey participants from LDAP"))); ?>
<h3><?php eT("Import survey participants from LDAP"); ?></h3>

<div class="row">
<div class="col-lg-12 content-right">
Expand Down
8 changes: 4 additions & 4 deletions application/views/admin/token/managetokenattributes.php
Expand Up @@ -6,8 +6,8 @@

<div class='side-body <?php echo getSideBodyClass(false); ?>'>
<?php if( count($tokenfieldlist)) : ?>
<?php $this->renderPartial('/admin/survey/breadcrumb', array('oSurvey'=>$oSurvey, 'token'=>true, 'active'=>gT("Manage token attribute fields"))); ?>
<h3><?php eT("Manage token attribute fields"); ?></h3>
<?php $this->renderPartial('/admin/survey/breadcrumb', array('oSurvey'=>$oSurvey, 'token'=>true, 'active'=>gT("Manage attribute fields"))); ?>
<h3><?php eT("Manage attribute fields"); ?></h3>

<div class="row">
<div class="col-lg-12 content-right">
Expand Down Expand Up @@ -125,11 +125,11 @@
</div>

<?php endif; ?>
<h3><?php eT("Add or delete token attributes"); ?></h3>
<h3><?php eT("Add/delete survey participant attributes"); ?></h3>

<div class="row">
<div class="col-lg-12 content-right">
<p><?php neT('There is {n} user attribute field in this token table.|There are {n} user attribute fields in this token table.', $nrofattributes); ?></p>
<p><?php neT('There is {n} user attribute field in this survey participant table.|There are {n} user attribute fields in this survey participant table.', $nrofattributes); ?></p>
<?php echo CHtml::form(array("admin/tokens/sa/updatetokenattributes/surveyid/{$surveyid}"), 'post',array('id'=>'addattribute')); ?>
<p>
<label for="addnumber"><?php eT('Number of attribute fields to add:'); ?></label>
Expand Down
6 changes: 3 additions & 3 deletions application/views/admin/token/tokenform.php
Expand Up @@ -5,20 +5,20 @@
?>

<div class='side-body <?php echo getSideBodyClass(false); ?>'>
<?php $this->renderPartial('/admin/survey/breadcrumb', array('oSurvey'=>$oSurvey, 'token'=>true, 'active'=>gT("Token entry"))); ?>
<?php $this->renderPartial('/admin/survey/breadcrumb', array('oSurvey'=>$oSurvey, 'token'=>true, 'active'=>gT("Survey participant entry"))); ?>
<h3>
<?php
if ($subaction == "edit")
{
eT("Edit token entry");
eT("Edit survey participant");
foreach ($tokendata as $Key => $Value)
{
$$Key = $Value;
}
}
else
{
eT("Add token entry");
eT("Add survey participant");
$tokenid = "";
}
?>
Expand Down
4 changes: 2 additions & 2 deletions application/views/admin/token/tokensummary.php
Expand Up @@ -7,15 +7,15 @@
<table class="items table table-striped" >
<tr>
<th>
<?php eT("Total records in this token table"); ?>
<?php eT("Total records"); ?>
</th>
<td>
<?php echo $queries['count']; ?>
</td>
</tr>
<tr>
<th>
<?php eT("Total with no unique Token"); ?>
<?php eT("Total with no unique token"); ?>
</th>
<td>
<?php echo $queries['invalid']; ?>
Expand Down

0 comments on commit a8e53f3

Please sign in to comment.