mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
lol wrong way updated...
once again... fixed 'required' attribute for input to apply only when field is visible + merge with main rev.445
This commit is contained in:
@@ -233,7 +233,7 @@ $surveys = $db->GetAll($sql);
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label" ><?php echo T_("Allow for respondent self completion via email invitation?"); ?> </label>
|
<label class="col-sm-4 control-label" ><?php echo T_("Allow for respondent self completion via email invitation?"); ?> </label>
|
||||||
<div class="col-sm-4"style="height: 30px;">
|
<div class="col-sm-4"style="height: 30px;">
|
||||||
<input name="respsc" type="checkbox" onchange="if(this.checked==true) show(this,'limesc'); else hide(this,'limesc');" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80"/>
|
<input name="respsc" type="checkbox" onchange="if(this.checked==true) {show(this,'limesc'); $('#url').attr('required','required');} else{ hide(this,'limesc'); $('#url').removeAttr('required');}" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -269,7 +269,7 @@ $surveys = $db->GetAll($sql);
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label text-danger" ><?php echo T_("URL to forward respondents on self completion (required)");?>: </label>
|
<label class="col-sm-4 control-label text-danger" ><?php echo T_("URL to forward respondents on self completion (required)");?>: </label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<input class="form-control" name="lime_endurl" type="url" value="<?php print SITE_URL ;?>" />
|
<input class="form-control" name="lime_endurl" id="url" type="url" placeholder="<?php print SITE_URL ;?>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -361,7 +361,7 @@ if (isset($_GET['modify']))
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label" ><?php echo T_("Allow for respondent self completion via email invitation?"); ?> </label>
|
<label class="col-sm-4 control-label" ><?php echo T_("Allow for respondent self completion via email invitation?"); ?> </label>
|
||||||
<div class="col-sm-4" style="height: 30px;"><input name="respsc" id="respsc" type="checkbox" <?php echo $rsc ?> onchange="if(this.checked==true) show(this,'limesc'); else hide(this,'limesc');" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80"/></div>
|
<div class="col-sm-4" style="height: 30px;"><input name="respsc" id="respsc" type="checkbox" <?php echo $rsc ?> onchange="if(this.checked==true) {show(this,'limesc'); $('#url').attr('required','required');} else{ hide(this,'limesc'); $('#url').removeAttr('required');}" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-width="80"/></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="limesc" <?php echo $rscd; ?> >
|
<div id="limesc" <?php echo $rscd; ?> >
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -396,7 +396,7 @@ if (isset($_GET['modify']))
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label text-danger" ><?php echo T_("URL to forward respondents on self completion (required)");?>: </label>
|
<label class="col-sm-4 control-label text-danger" ><?php echo T_("URL to forward respondents on self completion (required)");?>: </label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<input class="form-control" name="lime_endurl" type="url" required placeholder="<?php print SITE_URL ;?>" value="<?php echo $rs['lime_endurl']; ?>"/>
|
<input class="form-control" name="lime_endurl" id="url" type="url" placeholder="<?php print SITE_URL ;?>" value="<?php echo $rs['lime_endurl']; ?>"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -566,5 +566,5 @@ print "</div>";
|
|||||||
xhtml_foot($js_foot);
|
xhtml_foot($js_foot);
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$('[data-toggle="confirmation"]').confirmation()
|
$('[data-toggle="confirmation"]').confirmation();
|
||||||
</script>
|
</script>
|
||||||
@@ -293,7 +293,7 @@ function limesurvey_quota_replicate_completions($lime_sid,$questionnaire_id,$sam
|
|||||||
|
|
||||||
$sql = "SELECT COUNT(*)
|
$sql = "SELECT COUNT(*)
|
||||||
FROM information_schema.tables
|
FROM information_schema.tables
|
||||||
WHERE table_schema = 'quexs'
|
WHERE table_schema = '".DB_NAME."'
|
||||||
AND table_name = '" . LIME_PREFIX . "survey_$lime_sid'";
|
AND table_name = '" . LIME_PREFIX . "survey_$lime_sid'";
|
||||||
|
|
||||||
$rs = $db->GetOne($sql);
|
$rs = $db->GetOne($sql);
|
||||||
@@ -402,7 +402,7 @@ function limesurvey_quota_completions($lime_sgqa,$lime_sid,$questionnaire_id,$sa
|
|||||||
|
|
||||||
$sql = "SELECT COUNT(*)
|
$sql = "SELECT COUNT(*)
|
||||||
FROM information_schema.tables
|
FROM information_schema.tables
|
||||||
WHERE table_schema = 'quexs'
|
WHERE table_schema = '".DB_NAME."'
|
||||||
AND table_name = '" . LIME_PREFIX . "survey_$lime_sid'";
|
AND table_name = '" . LIME_PREFIX . "survey_$lime_sid'";
|
||||||
|
|
||||||
$rs = $db->GetOne($sql);
|
$rs = $db->GetOne($sql);
|
||||||
@@ -432,18 +432,18 @@ function limesurvey_quota_completions($lime_sgqa,$lime_sid,$questionnaire_id,$sa
|
|||||||
* Based on GetQuotaInformation() from common.php in Limesurvey
|
* Based on GetQuotaInformation() from common.php in Limesurvey
|
||||||
*
|
*
|
||||||
* @param int $lime_quota_id The quota id to get information on
|
* @param int $lime_quota_id The quota id to get information on
|
||||||
* @param string $baselang The base language for getting information from questions
|
|
||||||
* @return array An array containing the question information for comparison
|
* @return array An array containing the question information for comparison
|
||||||
*/
|
*/
|
||||||
function get_limesurvey_quota_info($lime_quota_id,$baselang = DEFAULT_LOCALE)
|
function get_limesurvey_quota_info($lime_quota_id)
|
||||||
{
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
$ret = array();
|
$ret = array();
|
||||||
|
|
||||||
$sql = "SELECT *
|
$sql = "SELECT q.*,s.language
|
||||||
FROM ".LIME_PREFIX."quota_members
|
FROM ".LIME_PREFIX."quota_members as q, ".LIME_PREFIX."surveys as s
|
||||||
WHERE quota_id='$lime_quota_id'";
|
WHERE q.quota_id='$lime_quota_id'
|
||||||
|
AND s.sid = q.sid";
|
||||||
|
|
||||||
$rs = $db->GetAll($sql);
|
$rs = $db->GetAll($sql);
|
||||||
|
|
||||||
@@ -451,11 +451,12 @@ function get_limesurvey_quota_info($lime_quota_id,$baselang = DEFAULT_LOCALE)
|
|||||||
{
|
{
|
||||||
$lime_qid = $quota_entry['qid'];
|
$lime_qid = $quota_entry['qid'];
|
||||||
$surveyid = $quota_entry['sid'];
|
$surveyid = $quota_entry['sid'];
|
||||||
|
$language = $quota_entry['language'];
|
||||||
|
|
||||||
$sql = "SELECT type, title,gid
|
$sql = "SELECT type, title,gid
|
||||||
FROM ".LIME_PREFIX."questions
|
FROM ".LIME_PREFIX."questions
|
||||||
WHERE qid='$lime_qid'
|
WHERE qid='$lime_qid'
|
||||||
AND language='$baselang'";
|
AND language='$language'";
|
||||||
|
|
||||||
$qtype = $db->GetRow($sql);
|
$qtype = $db->GetRow($sql);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user