".gT("If you remove this attribute, you will lose all information.") . "
\n"
. CHtml::form(array("admin/tokens/sa/deletetokenattributes/surveyid/{$iSurveyId}"), 'post',array('id'=>'attributenumber'))
. CHtml::hiddenField('deleteattribute',$sAttributeToDelete)
. CHtml::hiddenField('sid',$iSurveyId)
- . CHtml::htmlButton(gT('Delete attribute'),array('type'=>'submit','value'=>'confirm','name'=>'confirm'))
- . CHtml::htmlButton(gT('Cancel'),array('type'=>'submit','value'=>'cancel','name'=>'cancel'))
+ . CHtml::htmlButton(gT('Delete attribute'),array('type'=>'submit','value'=>'confirm','name'=>'confirm', 'class'=>'btn btn-default btn-lg'))
+ . CHtml::htmlButton(gT('Cancel'),array('type'=>'submit','value'=>'cancel','name'=>'cancel', 'class'=>'btn btn-default btn-lg'))
. CHtml::endForm()
)), $aData);
}
@@ -1237,9 +1242,10 @@ function updatetokenattributedescriptions($iSurveyId)
}
$aData['thissurvey'] = getSurveyInfo($iSurveyId);
$aData['surveyid'] = $iSurveyId;
+ $aData['sidebar']['state'] = "close";
$this->_renderWrappedTemplate('token', array( 'message' => array(
'title' => gT('Token attribute descriptions were successfully updated.'),
- 'message' => " getController()->createUrl("/admin/tokens/sa/managetokenattributes/surveyid/$iSurveyId") . "', '_top')\" />"
+ 'message' => " getController()->createUrl("/admin/tokens/sa/managetokenattributes/surveyid/$iSurveyId") . "', '_top')\" />"
)), $aData);
}
@@ -1589,6 +1595,7 @@ function email($iSurveyId, $tokenids = null)
}
else
{
+ $aData['sidebar']['state'] = "close";
$this->_renderWrappedTemplate('token', array( 'message' => array(
'title' => gT("Warning"),
'message' => gT("There were no eligible emails to send. This will be because none satisfied the criteria of:")
@@ -1603,9 +1610,15 @@ function email($iSurveyId, $tokenids = null)
/**
* Export Dialog
+ *
*/
function exportdialog($iSurveyId)
{
+ $aData["surveyinfo"] = $surveyinfo;
+ $aData['title_bar']['title'] = $surveyinfo['surveyls_title']."(".gT("ID").":".$iSurveyId.")";
+ $aData['sidebar']["token_menu"]=TRUE;
+ $aData['token_bar']['closebutton']['url'] = 'admin/tokens/sa/index/surveyid/'.$iSurveyId;
+
// CHECK TO SEE IF A TOKEN TABLE EXISTS FOR THIS SURVEY
$iSurveyId = sanitize_int($iSurveyId);
if (!Permission::model()->hasSurveyPermission($iSurveyId, 'tokens', 'export'))//EXPORT FEATURE SUBMITTED BY PIETERJAN HEYSE
@@ -2314,12 +2327,13 @@ function tokenify($iSurveyId)
if (!Yii::app()->request->getParam('ok'))
{
+ $aData['sidebar']['state'] = "close";
$this->_renderWrappedTemplate('token', array( 'message' => array(
'title' => gT("Create tokens"),
'message' => gT("Clicking 'Yes' will generate tokens for all those in this token list that have not been issued one. Continue?") . "
\n"
- . "getController()->createUrl("admin/tokens/sa/tokenify/surveyid/$iSurveyId", array('ok'=>'Y'))) . "\" />\n"
- . "getController()->createUrl("admin/tokens/sa/index/surveyid/$iSurveyId") . "', '_top')\" />\n"
. " \n"
)), $aData);
@@ -2376,13 +2390,14 @@ function kill($iSurveyId)
$newtableDisplay = Yii::app()->db->tablePrefix . $newtable;
if (!Yii::app()->request->getQuery('ok'))
{
+ $aData['sidebar']['state'] = "close";
$this->_renderWrappedTemplate('token', array( 'message' => array(
'title' => gT("Delete Tokens Table"),
'message' => gT("If you delete this table tokens will no longer be required to access this survey.") . " " . gT("A backup of this table will be made if you proceed. Your system administrator will be able to access this table.") . " \n"
. sprintf('("%s")
', $newtableDisplay)
- . "getController()->createUrl("admin/tokens/sa/kill/surveyid/{$iSurveyId}/ok/Y") . "', '_top')\" />\n"
- . "getController()->createUrl("admin/tokens/sa/index/surveyid/{$iSurveyId}") . "', '_top')\" />\n"
)), $aData);
}
@@ -2394,11 +2409,12 @@ function kill($iSurveyId)
//Remove any survey_links to the CPDB
SurveyLink::model()->deleteLinksBySurvey($iSurveyId);
+ $aData['sidebar']['state'] = "close";
$this->_renderWrappedTemplate('token', array( 'message' => array(
'title' => gT("Delete Tokens Table"),
'message' => ' ' . gT("The tokens table has now been removed and tokens are no longer required to access this survey.") . " " . gT("A backup of this table has been made and can be accessed by your system administrator.") . " \n"
. sprintf('("%s")
', $newtableDisplay)
- . "getController()->createUrl("admin/survey/sa/view/surveyid/".$iSurveyId) . "', '_top')\" />"
)), $aData);
@@ -2534,11 +2550,12 @@ function _newtokentable($iSurveyId)
if (Yii::app()->request->getQuery('createtable') == "Y")
{
Token::createTable($iSurveyId);
+ $aData['sidebar']['state'] = "close";
LimeExpressionManager::SetDirtyFlag(); // LimeExpressionManager needs to know about the new token table
$this->_renderWrappedTemplate('token', array('message' =>array(
'title' => gT("Token control"),
'message' => gT("A token table has been created for this survey.") . " (\"" . Yii::app()->db->tablePrefix . "tokens_$iSurveyId\")
\n"
- . "getController()->createUrl("admin/tokens/sa/index/surveyid/$iSurveyId") . "', '_top')\" />\n"
)));
}
@@ -2576,10 +2593,11 @@ function _newtokentable($iSurveyId)
//Add any survey_links from the renamed table
SurveyLink::model()->rebuildLinksFromTokenTable($iSurveyId);
+ $aData['sidebar']['state'] = "close";
$this->_renderWrappedTemplate('token', array('message' => array(
'title' => gT("Import old tokens"),
'message' => gT("A token table has been created for this survey and the old tokens were imported.") . " (\"" . Yii::app()->db->tablePrefix . "tokens_$iSurveyId" . "\")
\n"
- . "getController()->createUrl("admin/tokens/sa/index/surveyid/$iSurveyId") . "', '_top')\" />\n"
)));
diff --git a/application/core/Survey_Common_Action.php b/application/core/Survey_Common_Action.php
index d034b582898..7edf52427ba 100644
--- a/application/core/Survey_Common_Action.php
+++ b/application/core/Survey_Common_Action.php
@@ -27,7 +27,6 @@ class Survey_Common_Action extends CAction
public function __construct($controller, $id)
{
parent::__construct($controller, $id);
-
// Make sure viewHelper can be autoloaded
Yii::import('application.helpers.viewHelper');
}
diff --git a/application/views/admin/assessments_view.php b/application/views/admin/assessments_view.php
index c4c33f4d8a4..1f0cfc01434 100644
--- a/application/views/admin/assessments_view.php
+++ b/application/views/admin/assessments_view.php
@@ -1,3 +1,9 @@
+