forked from atutor/ATutor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalt_to_text.inc.php
69 lines (61 loc) · 3.34 KB
/
alt_to_text.inc.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
<legend><strong><?php echo _AT("alt_to_text"); ?></strong> </legend>
<div id="help">
<?php echo _AT('prefs_set_text'); ?></div>
<div class="row">
<?php echo _AT('use_alt_to_text'); ?><br />
<?php
$yes = $no = '';
if (isset($_POST["use_alternative_to_text"]))
$selected_uat = $_POST["use_alternative_to_text"];
else
$selected_uat = $_SESSION['prefs']['PREF_USE_ALTERNATIVE_TO_TEXT'];
if ($selected_uat == 1) {
$yes = ' checked="checked"';
} else {
$no = ' checked="checked"';
}
?>
<input type="radio" name="use_alternative_to_text" id="uat_yes" value="1" <?php echo $yes; ?> /><label for="uat_yes"><?php echo _AT('yes'); ?></label>
<input type="radio" name="use_alternative_to_text" id="uat_no" value="0" <?php echo $no; ?> /><label for="uat_no"><?php echo _AT('no'); ?></label>
</div>
<div class="row">
<label for="preferred_alt_to_text"><?php echo _AT('prefer_alt'); ?></label><br />
<select name="preferred_alt_to_text" id="preferred_alt_to_text"><?php
if (isset($_POST['preferred_alt_to_text']))
$selected_lang = $_POST['preferred_alt_to_text'];
else
$selected_lang = $_SESSION['prefs']['PREF_ALT_TO_TEXT'];
?>
<option value="audio" <?php if ($selected_lang == "audio") echo 'selected="selected"'; ?>><?php echo _AT('audio'); ?></option>
<option value="visual" <?php if ($selected_lang == "visual") echo 'selected="selected"'; ?>><?php echo _AT('visual'); ?></option>
<option value="sign_lang" <?php if ($selected_lang == "sign_lang") echo 'selected="selected"'; ?>><?php echo _AT('sign_lang'); ?></option>
</select>
</div>
<div class="row">
<?php echo _AT('append_or_replace'); ?><br />
<?php
$append = $replace = '';
if (isset($_POST["alt_to_text_append_or_replace"]))
$selected_ar = $_POST["alt_to_text_append_or_replace"];
else
$selected_ar = $_SESSION['prefs']['PREF_ALT_TO_TEXT_APPEND_OR_REPLACE'];
if ($selected_ar == 'replace') {
$replace = ' checked="checked"';
} else {
$append = ' checked="checked"';
}
?>
<input type="radio" name="alt_to_text_append_or_replace" id="ar_append" value="append" <?php echo $append; ?> /><label for="ar_append"><?php echo _AT('append'); ?></label>
<input type="radio" name="alt_to_text_append_or_replace" id="ar_replace" value="replace" <?php echo $replace; ?> /><label for="ar_replace"><?php echo _AT('replace'); ?></label>
</div>
<div class="row">
<label for="alt_text_prefer_lang"><?php echo _AT('prefer_lang'); ?></label><br />
<select name="alt_text_prefer_lang" id="alt_text_prefer_lang"><?php
if (isset($_POST['alt_text_prefer_lang']))
$selected_lang = $_POST['alt_text_prefer_lang'];
else
$selected_lang = $_SESSION['prefs']['PREF_ALT_TEXT_PREFER_LANG'];
output_language_options($this->languages, $selected_lang);
?>
</select>
</div>