-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.html
More file actions
55 lines (53 loc) · 1.95 KB
/
config.html
File metadata and controls
55 lines (53 loc) · 1.95 KB
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
<?php
global $OUTPUT;
$signinbtns = array('dark', 'orange', 'default');
if (!isset($config->signinbtn)) {
$config->signinbtn = 'default';
}
if (!isset($config->privacypolicy)) {
$config->privacypolicy = '';
}
if (!isset($config->termsofservice)) {
$config->termsofservice = '';
}
?>
<table cellspacing="0" cellpadding="5" border="0" id="auth-persona-config-table">
<tr>
<td colspan="3">
<h2 class="main"><?php print_string('auth_personasettings', 'auth_persona') ?> </h2>
</td>
</tr>
<tr>
<td align="right"><label for="signinbtn"><?php print_string('auth_signinbtn', 'auth_persona') ?>:</label></td>
<td>
<?php
foreach ($signinbtns as $btnstyle) {
$btn = 'persona_sign_in_'.$btnstyle;
$icon = new pix_icon($btn, get_string('auth_signinwithpersona', 'auth_persona'), 'auth_persona');
$checked = ($btnstyle == $config->signinbtn) ? 'checked' : '';
$options = array('type' => 'radio', 'name' => 'signinbtn', 'value' => $btnstyle);
if ($btnstyle === $config->signinbtn) {
$options['checked'] = 'checked';
}
echo html_writer::start_tag('input', $options);
echo ' ';
echo $OUTPUT->render($icon);
echo html_writer::end_tag('input');
echo ' ';
}
?>
</td>
</tr>
<tr>
<td align="right"><label for="privacypolicy"><?php print_string('auth_privacypolicy', 'auth_persona'); ?>:</label></td>
<td>
<textarea name="privacypolicy" rows="10" style="overflow:auto;"><?php echo $config->privacypolicy; ?></textarea>
</td>
</tr>
<tr>
<td align="right"><label for="termsofservice"><?php print_string('auth_termsofservice', 'auth_persona'); ?>:</label></td>
<td>
<textarea name="termsofservice" rows="10" style="overflow:auto;"><?php echo $config->termsofservice; ?></textarea>
</td>
</tr>
</table>