loginuserpass.php 2.75 KB
Newer Older
Wolfgang Knopki's avatar
Wolfgang Knopki committed
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
<?php
$this->data['header'] = $this->t('{login:user_pass_header}');

if (strlen($this->data['username']) > 0) {
    $this->data['autofocus'] = 'password';
} else {
    $this->data['autofocus'] = 'username';
}
$this->includeAtTemplateBase('includes/header.php');

if ($this->data['errorcode'] !== null) {
?>
    <div style="border-left: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8; background: #f5f5f5">
        <img src="/<?php echo $this->data['baseurlpath']; ?>resources/icons/experience/gtk-dialog-error.48x48.png"
             class="float-l erroricon" style="margin: 15px" alt=""/>

        <h2><?php echo $this->t('{login:error_header}'); ?></h2>

        <p><strong>
        <?php
            echo htmlspecialchars(
                $this->t(
                    $this->data['errorcodes']['title'][$this->data['errorcode']],
                    $this->data['errorparams']
                )
            );
        ?>
        </strong></p>
        <p>
        <?php
            echo htmlspecialchars(
                $this->t(
                    $this->data['errorcodes']['descr'][$this->data['errorcode']],
                    $this->data['errorparams']
                )
            );
        ?>
        </p>
    </div>
<?php
}
?>
    <div class="container">
<br/>
    <form action="?" method="post" name="f" class="form-signin">
			<img src="/images/demo/m4lab_logo.jpg" class="img-responsive center-block" width="185" height="192"/>
		    	<br/>
		        <input type="text" id="username" name="username" placeholder="Email" class="form-control"/>
		        <br/>
		        <input type="password" placeholder="Password" id="password" name="password" class="form-control"/> <br/>
		        <button id="submit_button" class="btn btn-outline-dark btn-block" name="Submit" value="Login" type="Submit"
		                >Login</button>
        <input type="hidden" id="processing_trans" value="<?php echo $this->t('{login:processing}'); ?>" />
        <?php
        foreach ($this->data['stateparams'] as $name => $value) {
            echo '<input type="hidden" name="'.htmlspecialchars($name).'" value="'.htmlspecialchars($value).'" />';
        }
        ?>
    </form>

    <p align="middle">Need an account? <a href="https://m4lab.hft-stuttgart.de/account/registration">Signup</a>. Or go <a href="https://transfer.hft-stuttgart.de/">Home</a>.</p>
    <p align="middle"><a href="https://m4lab.hft-stuttgart.de/account/forgotPwd">Reset Password</a></p>
</div>

<?php
if (!empty($this->data['links'])) {
    echo '<ul class="links" style="margin-top: 2em">';
    foreach ($this->data['links'] as $l) {
        echo '<li><a href="'.htmlspecialchars($l['href']).'">'.htmlspecialchars($this->t($l['text'])).'</a></li>';
    }
    echo '</ul>';
}

$this->includeAtTemplateBase('includes/footer.php');