Some checks failed
Run unit tests / run-unit-tests (push) Has been cancelled
Since the base URL and base path are user inputs, I'd like tkr to be resilient to any combination of leading and trailing slashes so people don't have to worry about that. This adds some helper functions to normalize URLs and adds tests to confirm that all combinations are handled correctly. Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/38 Co-authored-by: Greg Sarjeant <greg@subcultureofone.org> Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
16 lines
720 B
PHP
16 lines
720 B
PHP
<?php /** @var ConfigModel $config */ ?>
|
|
<?php /** @var string $csrf_token */ ?>
|
|
<?php /** @var string $error */ ?>
|
|
<h2>Login</h2>
|
|
<form method="post" action="<?= Util::buildRelativeUrl($config->basePath, 'login') ?>">
|
|
<div class="fieldset-items">
|
|
<input type="hidden" name="csrf_token" value="<?= Util::escape_html($csrf_token) ?>">
|
|
<label for="username">Username:</label>
|
|
<input type="text" id="username" name="username" required>
|
|
<label for="password">Password:</label>
|
|
<input type="password" id="password" name="password" required></label>
|
|
<div></div>
|
|
<button type="submit">Login</button>
|
|
</div>
|
|
</form>
|