From fc421d48fd6abe862d5f3543daf6bd64df644572 Mon Sep 17 00:00:00 2001 From: Adam Zammit Date: Thu, 9 Feb 2017 10:50:04 +1100 Subject: [PATCH] Allow for enabling / disabling self completion option --- admin/new.php | 11 ++++++-- admin/questionnairelist.php | 52 ++----------------------------------- 2 files changed, 11 insertions(+), 52 deletions(-) diff --git a/admin/new.php b/admin/new.php index 802ded3e..e9708a7d 100644 --- a/admin/new.php +++ b/admin/new.php @@ -65,8 +65,8 @@ if (isset($_POST['import_file'])) if (isset($_POST['ras'])) $ras = 1; if (isset($_POST['rws'])) $rws = 1; if (isset($_POST['testing'])) $testing = 1; + if (isset($_POST['referral'])) $referral = 1; if (isset($_POST['respsc'])) $respsc = 1; - if (isset($_POST['referral'])) $respsc = 1; if ($_POST['selectrs'] != "none") $rs = 1; $name = $db->qstr($_POST['description']); @@ -221,7 +221,14 @@ if (!empty($surveys)){?> " data-off="" data-width="80"/> - + +
+ +
+ " data-off="" data-width="80"/> +
+
+ qstr(html_entity_decode($_POST['rs_project_end'],ENT_QUOTES,'UTF-8')); $sql = "UPDATE questionnaire - SET description = $name, info = $info, rs_project_end = $rs_project_end, restrict_appointments_shifts = '$ras', restrict_work_shifts = '$rws', self_complete = $respsc, referral = $referral + SET description = $name, info = $info, rs_project_end = $rs_project_end, restrict_appointments_shifts = '$ras', restrict_work_shifts = '$rws', referral = $referral, self_complete = $respsc WHERE questionnaire_id = '$questionnaire_id'"; $db->Execute($sql); @@ -321,7 +321,6 @@ if (isset($_GET['modify'])) $rs = $db->GetRow($sql); $referral = $testing = $rws = $ras = $rsc = "checked=\"checked\""; - $rscd = ""; $aio = $qbq = $gat = ""; if ($rs['lime_mode'] == "survey") $aio = "selected=\"selected\""; @@ -335,7 +334,6 @@ if (isset($_GET['modify'])) if ($rs['self_complete'] == 0) { $rsc = ""; - $rscd = "style='display:none;'"; } xhtml_head(T_("Modify Questionnaire "),true,$css,$js_head, false, false, false, "  " . "$rs[description]" . ""); @@ -390,53 +388,7 @@ if (isset($_GET['modify']))
-
onchange="if(this.checked==true) {show(this,'limesc'); $('#url').attr('required','required');} else{ hide(this,'limesc'); $('#url').removeAttr('required');}" data-toggle="toggle" data-on="" data-off="" data-width="80"/>
-
-
> -
- -
- -
-
-
- -
- -
-
-
- -
- -
+
data-toggle="toggle" data-on="" data-off="" data-width="80"/>