adduser.php 3.21 KB
Newer Older
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
<?php
echo $form_tag;
?>

<table id="adduser-t">
    <thead>
        <tr>
            <th class="step1"><?php echo get_string('usercreationmethod', 'admin'); ?></th>
            <th></th>
            <th class="step2"><?php echo get_string('basicdetails', 'admin'); ?></th>
            <th></th>
            <th class="step3"><?php echo get_string('create', 'admin'); ?></th>
        </tr>
    </thead>
    <tbody>
        <tr id="tr-fc">
            <td><?php echo get_string('howdoyouwanttocreatethisuser', 'admin'); ?></td>
            <td></td>
            <td><?php echo get_string('basicinformationforthisuser', 'admin'); ?></td>
            <td></td>
            <td><?php echo get_string('clickthebuttontocreatetheuser', 'admin'); ?></td>
        </tr>
        <tr>
            <td class="step step1" id="step1">
                <div class="choice"><input type="radio" name="createmethod" class="ic"<?php if (!isset($_POST['createmethod']) || $_POST['createmethod'] == 'scratch') { ?> checked="checked"<?php } ?> id="createfromscratch" value="scratch"> <label for="createfromscratch"><?php echo get_string('createnewuserfromscratch', 'admin'); ?></label></div>
                <table>
<?php foreach (array('firstname', 'lastname', 'email') as $field) { ?>
                    <tr>
                        <th><?php echo $elements[$field]['labelhtml']; ?></th>
                        <td><?php echo $elements[$field]['html']; ?></td>
                    </tr>
<?php if ($elements[$field]['error']) { ?>
                    <tr>
                        <td class="errmsg" colspan="2"><?php echo $elements[$field]['error']; ?></td>
                    </tr>
<?php } ?>
<?php } ?>
                </table>
                <div id="or"><?php echo get_string('Or...', 'admin'); ?></div>
                <div class="choice"><input type="radio" name="createmethod" class="ic"<?php if (isset($_POST['createmethod']) && $_POST['createmethod'] == 'leap2a') { ?> checked="checked"<?php } ?> id="uploadleap" value="leap2a"> <label for="uploadleap"><?php echo get_string('uploadleap2afile', 'admin'); ?></label> ?</div>
                <?php echo $elements['leap2afile']['html']; ?>
<?php if ($elements['leap2afile']['error']) { ?>
                <div class="errmsg"><?php echo $elements['leap2afile']['error']; ?></div>
<?php } ?>
            </td>
            <td class="filler">&raquo;</td>
            <td class="step step2">
                <table>
<?php foreach(array('username', 'password', 'staff', 'admin', 'quota', 'authinstance', 'institutionadmin') as $field) { ?>
                    <tr>
                        <th><?php echo $elements[$field]['labelhtml']; ?></th>
                        <td><?php echo $elements[$field]['html'];
if (isset($elements[$field]['error'])) { echo '<div class="errmsg">' . $elements[$field]['error'] . '</div>'; }
?></td>
                    </tr>
<?php } ?>
                </table>
            </td>
            <td class="filler">&raquo;</td>
            <td class="step step3">
<?php echo $elements['submit']['html']; ?>
            <div id="step3info"><?php echo get_string('userwillreceiveemailandhastochangepassword', 'admin'); ?></div>
            </td>
        </tr>
    </tbody>
</table>
<?php
echo $hidden_elements;
echo '</form>';
?>