Skip to content
This repository was archived by the owner on Jun 25, 2024. It is now read-only.

Commit 542622a

Browse files
author
Billy Clark
committed
form was not submitting on IE.
1 parent 2bc76f6 commit 542622a

File tree

2 files changed

+59
-56
lines changed

2 files changed

+59
-56
lines changed

themes/material/core/loginuserpass.php

Lines changed: 55 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -45,80 +45,79 @@ function onRecaptchaLoad() {
4545
<main class="mdl-layout__content" layout-children="column" child-spacing="center">
4646
<?php include __DIR__ . '/../common-announcement.php' ?>
4747

48-
<div class="mdl-card mdl-shadow--8dp">
49-
<div class="mdl-card__media white-bg margin" layout-children="column">
50-
<!-- TODO: update to /logo.png-->
51-
<img src="https://static.gtis.guru/idp-logo/sil-logo.png"
52-
alt="<?= $this->t('{material:login:logo}', ['{idpName}' => $idpName]) ?>">
53-
</div>
54-
55-
56-
<div class="mdl-card__title center">
57-
<h1 class="mdl-card__title-text">
58-
<?= $this->t('{material:login:header}', ['{idpName}' => $idpName]) ?>
59-
</h1>
60-
</div>
48+
<form method="POST" action="<?= htmlentities($_SERVER['PHP_SELF']) ?>">
49+
<input type="hidden" name="AuthState"
50+
value="<?= htmlspecialchars($this->data['stateparams']['AuthState']) ?>" />
51+
<input type="hidden" name="csrf-token" value="<?= htmlentities($csrfToken); ?>" />
6152

62-
<form method="POST" action="<?= htmlentities($_SERVER['PHP_SELF']) ?>"
63-
layout-children="column" class="mdl-card__supporting-text" id="loginform">
64-
65-
<input type="hidden" name="AuthState"
66-
value="<?= htmlspecialchars($this->data['stateparams']['AuthState']) ?>" />
67-
<input type="hidden" name="csrf-token" value="<?= htmlentities($csrfToken); ?>" />
53+
<div class="mdl-card mdl-shadow--8dp">
54+
<!--TODO: look at filling viewport on phones.-->
55+
<div class="mdl-card__media white-bg margin" layout-children="column">
56+
<!--TODO: update to /logo.png when done testing-->
57+
<img src="https://static.gtis.guru/idp-logo/sil-logo.png"
58+
alt="<?= $this->t('{material:login:logo}', ['{idpName}' => $idpName]) ?>">
59+
</div>
6860

69-
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
70-
<label for="username" class="mdl-textfield__label">
71-
<?= $this->t('{material:login:label_username}') ?>
72-
</label>
73-
<input type="text" name="username" class="mdl-textfield__input"
74-
value="<?= htmlspecialchars($username) ?>"
75-
<?= empty($username) ? 'autofocus' : '' ?> id="username"/>
61+
<div class="mdl-card__title center">
62+
<h1 class="mdl-card__title-text">
63+
<?= $this->t('{material:login:header}', ['{idpName}' => $idpName]) ?>
64+
</h1>
7665
</div>
7766

78-
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
79-
<label for="password" class="mdl-textfield__label">
80-
<?= $this->t('{material:login:label_password}') ?>
81-
</label>
82-
<input type="password" name="password" class="mdl-textfield__input"
83-
<?= ! empty($username) ? 'autofocus' : '' ?> id="password"/>
67+
<div class="mdl-card__supporting-text" layout-children="column">
68+
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
69+
<label for="username" class="mdl-textfield__label">
70+
<?= $this->t('{material:login:label_username}') ?>
71+
</label>
72+
<input type="text" name="username" class="mdl-textfield__input"
73+
value="<?= htmlspecialchars($username) ?>"
74+
<?= empty($username) ? 'autofocus' : '' ?> id="username"/>
75+
</div>
76+
77+
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
78+
<label for="password" class="mdl-textfield__label">
79+
<?= $this->t('{material:login:label_password}') ?>
80+
</label>
81+
<input type="password" name="password" class="mdl-textfield__input"
82+
<?= ! empty($username) ? 'autofocus' : '' ?> id="password"/>
83+
</div>
8484
</div>
8585

8686
<?php
8787
if ($errorCode == 'WRONGUSERPASS') {
8888
?>
89-
<p class="mdl-card__supporting-text mdl-color-text--red error">
90-
<i class="material-icons margin">error</i>
89+
<p class="mdl-color-text--red error">
90+
<i class="material-icons">error</i>
9191

9292
<span class="mdl-textfield mdl-typography--caption">
93-
<?= $this->t($errorMessageKey, $errorMessageTokens) ?>
93+
<?= $this->t($errorMessageKey, $errorMessageTokens) ?>
9494
</span>
9595
</p>
9696
<?php
9797
}
9898
?>
99-
</form>
10099

101-
<div class="mdl-card__actions" layout-children="row">
102-
<?php
103-
$forgotPasswordUrl = "asfsgf";
104-
if (! empty($forgotPasswordUrl)) {
105-
?>
106-
<a href="<?= htmlentities($forgotPasswordUrl) ?>" target="_blank"
107-
class="mdl-button mdl-button--colored mdl-typography--caption">
108-
<?= $this->t('{material:login:forgot}') ?>
109-
</a>
110-
<?php
111-
}
112-
?>
113-
<!--TODO: look at filling viewport on phones.-->
114-
<span flex></span>
115-
116-
<button type="submit" form="loginform"
117-
class="mdl-button mdl-button--colored mdl-button--raised">
118-
<?= $this->t('{material:login:button_login}') ?>
119-
</button>
100+
<div class="mdl-card__actions" layout-children="row">
101+
<?php
102+
$forgotPasswordUrl = "asfsgf"; //TODO: remove when done testing.
103+
if (! empty($forgotPasswordUrl)) {
104+
?>
105+
<a href="<?= htmlentities($forgotPasswordUrl) ?>" target="_blank"
106+
class="mdl-button mdl-button--colored mdl-typography--caption">
107+
<?= $this->t('{material:login:forgot}') ?>
108+
</a>
109+
<?php
110+
}
111+
?>
112+
113+
<span flex></span>
114+
115+
<button class="mdl-button mdl-button--colored mdl-button--raised">
116+
<?= $this->t('{material:login:button_login}') ?>
117+
</button>
118+
</div>
120119
</div>
121-
</div>
120+
</form>
122121
</main>
123122
</div>
124123
</body>

www/styles.2.1.0.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ form p.error {
3737
align-items: center;
3838
}
3939

40+
form p.error > i {
41+
margin: 0 1em;
42+
}
43+
4044
.margin {
4145
margin: 1em;
4246
}

0 commit comments

Comments
 (0)