Skip to content

Commit

Permalink
Survey.php html moved to views.
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_ci@10338 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
sachdeva-shubham committed Jun 23, 2011
1 parent 3396919 commit fed0819
Show file tree
Hide file tree
Showing 7 changed files with 492 additions and 12 deletions.
72 changes: 60 additions & 12 deletions application/controllers/admin/survey.php
Expand Up @@ -272,7 +272,7 @@ function _generalTabNewSurvey()
*/
$data['clang'] = $clang;
$data['owner'] = $owner;
return $this->load->view('admin/survey/superview/SuperGeneralNewSurvey_view',$data, true);
return $this->load->view('admin/survey/superview/superGeneralNewSurvey_view',$data, true);
}

function _generalTabEditSurvey($surveyid,$esrow)
Expand Down Expand Up @@ -351,7 +351,7 @@ function _generalTabEditSurvey($surveyid,$esrow)
$data['clang'] = $clang;
$data['esrow'] = $esrow;
$data['surveyid'] = $surveyid;
return $this->load->view('admin/survey/superview/SuperGeneralEditSurey_view',$data, true);
return $this->load->view('admin/survey/superview/superGeneralEditSurey_view',$data, true);

}

Expand Down Expand Up @@ -699,13 +699,14 @@ function _tabPresentationNavigation($esrow)
$data['showXquestions'] = $showXquestions;
$data['showgroupinfo'] = $showgroupinfo;
$data['showqnumcode'] = $showqnumcode;
return $this->load->view('admin/survey/superview/SuperPresentation_view',$data, true);
return $this->load->view('admin/survey/superview/superPresentation_view',$data, true);

}

function _tabPublicationAccess($esrow)
{
$clang = $this->limesurvey_lang;
/**
$editsurvey = "<div id='publication'><ul>\n";
//Public Surveys
Expand Down Expand Up @@ -738,7 +739,7 @@ function _tabPublicationAccess($esrow)
}
$editsurvey .= ">".$clang->gT("No")."</option>\n"
. "</select></li>\n";

*/
// Start date
$dateformatdetails=getDateFormatData($this->session->userdata('dateformat'));
$startdate='';
Expand All @@ -748,10 +749,10 @@ function _tabPublicationAccess($esrow)
$datetimeobj = $this->date_time_converter; //new Date_Time_Converter($esrow['startdate'] , "Y-m-d H:i:s");
$startdate=$datetimeobj->convert($dateformatdetails['phpdate'].' H:i');
}

/**
$editsurvey .= "<li><label for='startdate'>".$clang->gT("Start date/time:")."</label>\n"
. "<input type='text' class='popupdatetime' id='startdate' size='20' name='startdate' value=\"{$startdate}\" /></li>\n";

*/
// Expiration date
$expires='';
if (trim($esrow['expires']) != '') {
Expand All @@ -760,6 +761,7 @@ function _tabPublicationAccess($esrow)
$datetimeobj = $this->date_time_converter; //new Date_Time_Converter($esrow['expires'] , "Y-m-d H:i:s");
$expires=$datetimeobj->convert($dateformatdetails['phpdate'].' H:i');
}
/**
$editsurvey .="<li><label for='expires'>".$clang->gT("Expiry date/time:")."</label>\n"
. "<input type='text' class='popupdatetime' id='expires' size='20' name='expires' value=\"{$expires}\" /></li>\n";
Expand Down Expand Up @@ -849,11 +851,23 @@ function _tabPublicationAccess($esrow)
$editsurvey .= "</ul></div>\n";
return $editsurvey;
*/
$data['clang'] = $clang;
$data['esrow'] = $esrow;
//$data['surveyid'] = $surveyid;
$data['startdate'] = $startdate;
$data['expires'] = $expires;
//$data['showgroupinfo'] = $showgroupinfo;
//$data['showqnumcode'] = $showqnumcode;
return $this->load->view('admin/survey/superview/superPublication_view',$data, true);

}

function _tabNotificationDataManagement($esrow)
{
$clang = $this->limesurvey_lang;

/**
// Notification and Data management TAB
$editsurvey = "<div id='notification'><ul>\n";
Expand Down Expand Up @@ -1068,13 +1082,20 @@ function _tabNotificationDataManagement($esrow)
// End Notification and Data management TAB
$editsurvey .= "</ul></div>\n";
return $editsurvey;
return $editsurvey; */
$data['clang'] = $clang;
$data['esrow'] = $esrow;

//$data['showqnumcode'] = $showqnumcode;
return $this->load->view('admin/survey/superview/superNotification_view',$data, true);

}

function _tabTokens($esrow)
{
$clang = $this->limesurvey_lang;
// Tokens TAB
/**
$editsurvey = "<div id='tokens'><ul>\n";
// Token answers persistence
$editsurvey .= "<li><label for=''>".$clang->gT("Enable token-based response persistence?")."</label>\n"
Expand All @@ -1098,12 +1119,18 @@ function _tabTokens($esrow)
// End Tokens TAB
$editsurvey .= "</ul></div>\n";
return $editsurvey;
return $editsurvey; */
$data['clang'] = $clang;
$data['esrow'] = $esrow;

//$data['showqnumcode'] = $showqnumcode;
return $this->load->view('admin/survey/superview/superTokens_view',$data, true);
}

function _tabImport()
{
$clang = $this->limesurvey_lang;
/**
// Import TAB
$editsurvey = "<div id='import'>\n";
Expand All @@ -1119,16 +1146,21 @@ function _tabImport()
// End Import TAB
$editsurvey .= "</div>\n";
return $editsurvey;
return $editsurvey; */
$data['clang'] = $clang;
//$data['esrow'] = $esrow;

//$data['showqnumcode'] = $showqnumcode;
return $this->load->view('admin/survey/superview/superImport_view',$data, true);
}

function _tabCopy()
{
$clang = $this->limesurvey_lang;

/**
// Copy survey TAB
$editsurvey = "<div id='copy'>\n";

// Copy survey
$editsurvey .= "<form class='form30' action='../database/index/insertsurvey' id='copysurveyform' method='post'>\n"
. "<ul>\n"
Expand All @@ -1153,8 +1185,16 @@ function _tabCopy()
$editsurvey .= "</div>\n";
return $editsurvey;
*/

$data['clang'] = $clang;
//$data['esrow'] = $esrow;

//$data['showqnumcode'] = $showqnumcode;
return $this->load->view('admin/survey/superview/superCopy_view',$data, true);
}


function _tabResourceManagement($surveyid)
{
$clang = $this->limesurvey_lang;
Expand All @@ -1169,6 +1209,7 @@ function _tabResourceManagement($surveyid)
if (hasResources($surveyid, 'survey') === false) {
$disabledIfNoResources = " disabled='disabled'";
}
/**
// functionality not ported
$editsurvey = "<div id='resources'>\n"
. "<form enctype='multipart/form-data' class='form30' id='importsurveyresources' name='importsurveyresources' action='../database/index/insertsurvey' method='post' onsubmit='return validatefilename(this,\"".$clang->gT('Please select a file to import!','js')."\");'>\n"
Expand All @@ -1187,7 +1228,14 @@ function _tabResourceManagement($surveyid)
// End TAB Uploaded Resources Management
$editsurvey .= "</div>\n";
return $editsurvey;
return $editsurvey; */
$data['clang'] = $clang;
//$data['esrow'] = $esrow;
$data['ZIPimportAction'] = $ZIPimportAction;
$data['disabledIfNoResources'] = $disabledIfNoResources;
$dqata['sCKEditorURL'] = $sCKEditorURL;
//$data['showqnumcode'] = $showqnumcode;
return $this->load->view('admin/survey/superview/superResourceManagement_view',$data, true);

}

Expand Down
22 changes: 22 additions & 0 deletions application/views/admin/Survey/superview/superCopy_view.php
@@ -0,0 +1,22 @@
<div id='copy'>
<form class='form30' action='<?php echo site_url('admin/survey/copy'); ?>' id='copysurveyform' method='post'>
<ul>
<li><label for='copysurveylist'><span class='annotationasterisk'>*</span><?php echo $clang->gT("Select survey to copy:"); ?> </label>
<select id='copysurveylist' name='copysurveylist'>
<?php echo getsurveylist(false, true); ?> </select> <span class='annotation'><?php echo $clang->gT("*Required"); ?> </span></li>
<li><label for='copysurveyname'><span class='annotationasterisk'>*</span><?php echo $clang->gT("New survey title:"); ?> </label>
<input type='text' id='copysurveyname' size='82' maxlength='200' name='copysurveyname' value='' />
<span class='annotation'><?php echo $clang->gT("*Required"); ?> </span></li>
<li><label for='copysurveytranslinksfields'><?php echo $clang->gT("Convert resource links and INSERTANS fields?"); ?> </label>
<input id='copysurveytranslinksfields' name="copysurveytranslinksfields" type="checkbox" checked='checked'/></li>
<li><label for='copysurveyexcludequotas'><?php echo $clang->gT("Exclude quotas?") ; ?></label>
<input id='copysurveyexcludequotas' name="copysurveyexcludequotas" type="checkbox" /></li>
<li><label for='copysurveyexcludeanswers'><?php echo $clang->gT("Exclude answers?"); ?> </label>
<input id='copysurveyexcludeanswers' name="copysurveyexcludeanswers" type="checkbox" /></li>
<li><label for='copysurveyresetconditions'><?php echo $clang->gT("Reset conditions?") ; ?></label>
<input id='copysurveyresetconditions' name="copysurveyresetconditions" type="checkbox" /></li></ul>
<p><input type='submit' value='<?php echo $clang->gT("Copy survey"); ?>' />
<input type='hidden' name='action' value='copysurvey' /></p></form>


</div>
13 changes: 13 additions & 0 deletions application/views/admin/Survey/superview/superImport_view.php
@@ -0,0 +1,13 @@
<div id='import'>


<form enctype='multipart/form-data' class='form30' id='importsurvey' name='importsurvey' action='<?php echo site_url('admin/import/survey'); ?>' method='post' onsubmit='return validatefilename(this,"<?php echo $clang->gT('Please select a file to import!', 'js'); ?> ");'>
<ul>
<li><label for='the_file'><?php echo $clang->gT("Select survey structure file (*.lss, *.csv):"); ?> </label>
<input id='the_file' name="the_file" type="file" size="50" /></li>
<li><label for='translinksfields'><?php echo $clang->gT("Convert resource links and INSERTANS fields?"); ?> </label>
<input id='translinksfields' name="translinksfields" type="checkbox" checked='checked'/></li></ul>
<p><input type='submit' value='<?php echo $clang->gT("Import survey"); ?>' />
<input type='hidden' name='action' value='importsurvey' /></p></form>

</div>

0 comments on commit fed0819

Please sign in to comment.