-
Notifications
You must be signed in to change notification settings - Fork 7
/
user_profile.html
63 lines (52 loc) · 2.54 KB
/
user_profile.html
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
<h3 class="main"><?php echo get_string('openid_manage', 'auth_openid'); ?></h3>
<table width="80%" class="userinfobox" summary="">
<?php
$config = get_config('auth/openid');
$allow_append = ($config->auth_openid_allow_multiple=='true');
if ($allow_append) { ?>
<tr>
<td class="content">
<form name="openid_form" action="<?php echo $CFG->wwwroot; ?>/auth/openid/actions.php" method="post" onsubmit="if (document.openid_form.openid_url.value == '') return false;">
<input type="hidden" name="openid_action" value="append" />
<div>
<input type="text" id="openid_url" name="openid_url" value="" style="background-image:url(<?php echo $CFG->wwwroot; ?>/auth/openid/icon.gif); background-repeat:no-repeat; background-position: 0 50%; padding:3px; padding-left:18px;" size="30" />
<input type="submit" value="<?php print_string('add_openid', 'auth_openid'); ?>" />
</div>
</form>
</td>
</tr>
<?php } ?>
<tr>
<td class="content">
<form action="<?php echo $CFG->wwwroot; ?>/auth/openid/actions.php" method="post">
<input type="hidden" name="openid_action" value="delete" />
<ul>
<?php
$records = $DB->get_records('openid_urls', array('userid' => $USER->id));
$rcount = sizeof($records);
if ($rcount > 1) {
$str = '<li><input type="checkbox" name="delete_urls[]" id="delete_%d" value="%d" /><label for="delete_%d">%s</label></li>';
foreach ($records as $record) {
printf(
$str,
$record->id,
$record->id,
$record->id,
s($record->url)
);
}
}
elseif ($rcount == 1) {
$record = array_pop($records);
echo '<li>',$record->url,'</li>';
}
?>
</ul>
<?php if ($rcount > 1) { ?>
<input type="submit" value="<?php print_string('delete_selected', 'auth_openid'); ?>" />
<?php } ?>
</form>
</td>
</tr>
</table>
<br />