-
Notifications
You must be signed in to change notification settings - Fork 988
/
active_html_view.php
106 lines (100 loc) · 4.92 KB
/
active_html_view.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php if ($thissurvey['active'] == "Y")
{ ?>
<script type='text/javascript'>
<!--
function saveshow(value)
{
if (document.getElementById(value).checked == true)
{
document.getElementById("closerecord").checked=false;
document.getElementById("closerecord").disabled=true;
document.getElementById("saveoptions").style.display="";
}
else
{
document.getElementById("saveoptions").style.display="none";
document.getElementById("closerecord").disabled=false;
}
}
//-->
</script>
<tr>
<td colspan='3' align='center'>
<table><tr><td align='left'>
<input type='checkbox' class='checkboxbtn' name='closerecord' id='closerecord' checked='checked'/><label for='closerecord'><?php echo $clang->gT("Finalize response submission"); ?></label></td></tr>
<input type='hidden' name='closedate' value='<?php echo date_shift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", $this->config->item('timeadjust')); ?>' />
<?php if ($thissurvey['allowsave'] == "Y")
{ ?>
<tr><td align='left'><input type='checkbox' class='checkboxbtn' name='save' id='save' onclick='saveshow(this.id)' /><label for='save'><?php echo $clang->gT("Save for further completion by survey user"); ?></label>
</td></tr></table>
<div name='saveoptions' id='saveoptions' style='display: none'>
<table align='center' class='outlinetable' cellspacing='0'>
<tr><td align='right'><?php echo $clang->gT("Identifier:"); ?></td>
<td><input type='text' name='save_identifier' /></td></tr>
<tr><td align='right'><?php echo $clang->gT("Password:"); ?></td>
<td><input type='password' name='save_password' /></td></tr>
<tr><td align='right'><?php echo $clang->gT("Confirm Password:"); ?></td>
<td><input type='password' name='save_confirmpassword' /></td></tr>
<tr><td align='right'><?php echo $clang->gT("Email:"); ?></td>
<td><input type='text' name='save_email' /></td></tr>
<tr><td align='right'><?php echo $clang->gT("Start Language:"); ?></td>
<td>
<select name='save_language'>
<?php foreach ($slangs as $lang)
{
if ($lang == $baselang) { ?>
<option value='<?php echo $lang; ?>' selected='selected'><?php echo getLanguageNameFromCode($lang,false); ?></option>
<?php }
else { ?>
<option value='<?php echo $lang; ?>'><?php echo getLanguageNameFromCode($lang,false); ?></option>
<?php }
} ?>
</select>
</td></tr></table></div>
</td>
</tr>
<?php } ?>
<tr>
<td colspan='3' align='center'>
<input type='submit' id='submitdata' value='<?php echo $clang->gT("Submit"); ?>'
<?php if (tableExists('tokens_'.$thissurvey['sid']))
{ ?>
disabled='disabled'/>
<?php }
else
{ ?>
/>
<?php } ?>
</td>
</tr>
<?php }
elseif ($thissurvey['active'] == "N")
{ ?>
<tr>
<td colspan='3' align='center'>";
<font color='red'><strong><?php echo $clang->gT("This survey is not yet active. Your response cannot be saved"); ?>
</strong></font></td>
</tr>
<?php }
else
{ ?>
</form>
<tr>
<td colspan='3' align='center'>";
<font color='red'><strong><?php echo $clang->gT("Error"); ?></strong></font><br />
<?php echo $clang->gT("The survey you selected does not exist"); ?><br /><br />
<input type='submit' value='<?php echo $clang->gT("Main Admin Screen"); ?>' onclick="window.open('<?php echo $scriptname; ?>', '_top')" />
</td>
</tr>
</table>
<?php exit(); ?>
<?php } ?>
<tr>
<td>
<input type='hidden' name='subaction' value='insert' />
<input type='hidden' name='sid' value='<?php echo $surveyid; ?>' />
<input type='hidden' name='language' value='<?php echo $sDataEntryLanguage; ?>' />
</td>
</tr>
</table>
</form>