Fixed signin and register buttons
This commit is contained in:
parent
bd3c6f065f
commit
8218d270ad
@ -127,62 +127,13 @@
|
||||
{
|
||||
?>
|
||||
<div class="mb-3">
|
||||
<label class="form-label"><?= $strLabel; ?></label>
|
||||
<label class="form-label">Actions</label>
|
||||
<div>
|
||||
<?php foreach ($varButtons as $b): ?>
|
||||
<?php BootstrapRender::button($b); ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
public static function buttons($varOptions)
|
||||
{
|
||||
$strLabel = $varOptions["label"] ?? "Actions";
|
||||
$intInputGroup = $varOptions["input_group"] ?? 0;
|
||||
$varButtons = $varOptions["buttons"] ?? [];
|
||||
$strButtonClass = $intInputGroup == 0? "me-1 mb-2": "";
|
||||
|
||||
?>
|
||||
<?php if (count($varButtons) > 0): ?>
|
||||
<div class="mb-3">
|
||||
<label class="form-label"><?= $strLabel; ?></label>
|
||||
<div class="<?= $intInputGroup == 1? "input-group": ""; ?>">
|
||||
<?php foreach ($varButtons as $varButton): ?>
|
||||
|
||||
<?php
|
||||
$strLabel = $varButton["label"];
|
||||
$strIcon = $varButton["icon"] ?? null;
|
||||
|
||||
$strType = $varButton["type"] ?? null;
|
||||
$strOnclick = $varButton["onclick"] ?? null;
|
||||
$strHref = $varButton["href"] ?? null;
|
||||
|
||||
$strClass = $varButton["class"] ?? "outline-secondary";
|
||||
$strTag = "button";
|
||||
|
||||
if ($strHref !== null)
|
||||
$strTag = "a";
|
||||
?>
|
||||
|
||||
<<?= $strTag; ?>
|
||||
class="btn btn-<?= $strClass; ?> <?= $strButtonClass; ?>"
|
||||
<?= $strType !== null? "type=\"{$strType}\"": ""; ?>
|
||||
<?= $strOnclick !== null? "onclick=\"{$strOnclick}\"": ""; ?>
|
||||
<?= $strHref !== null? "href=\"{$strHref}\"": ""; ?>>
|
||||
|
||||
<?php if ($strIcon !== null): ?>
|
||||
<i class="fa fa-fw fa-<?= $strIcon; ?>"></i>
|
||||
<?php endif; ?>
|
||||
|
||||
<span><?= $strLabel; ?></span>
|
||||
</<?= $strTag; ?>>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
@ -88,15 +88,15 @@
|
||||
"type" => "password",
|
||||
]); ?>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Actions</label>
|
||||
<div class="input-group">
|
||||
<button class="btn btn-outline-primary" type="submit">
|
||||
<i class="fa fa-fw fa-right-to-bracket"></i>
|
||||
<span>Continue</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php BootstrapRender::buttons([
|
||||
[
|
||||
"tag" => "button",
|
||||
"icon" => "right-to-bracket",
|
||||
"label" => "Continue",
|
||||
"type" => "submit",
|
||||
"class" => "outline-primary"
|
||||
]
|
||||
]); ?>
|
||||
|
||||
<div class="mb-3">
|
||||
<a class="text-decoration-none" href="/user/signin">Already have an account?</a>
|
||||
|
@ -72,11 +72,20 @@
|
||||
]); ?>
|
||||
|
||||
<?php BootstrapRender::buttons([
|
||||
"input_group" => 0,
|
||||
"buttons" => [
|
||||
["icon" => "right-to-bracket", "label" => "Continue", "type" => "submit", "class" => "outline-primary"],
|
||||
["icon" => "home", "label" => "Home", "href" => "/"]
|
||||
]]); ?>
|
||||
[
|
||||
"tag" => "button",
|
||||
"icon" => "right-to-bracket",
|
||||
"label" => "Continue",
|
||||
"type" => "submit",
|
||||
"class" => "outline-primary"
|
||||
],
|
||||
[
|
||||
"icon" => "home",
|
||||
"label" => "Home",
|
||||
"href" => "/",
|
||||
"class" => "outline-secondary"
|
||||
]
|
||||
]); ?>
|
||||
|
||||
<div class="mb-3">
|
||||
<a class="text-decoration-none" href="/user/register">Don't have an account?</a>
|
||||
|
Loading…
Reference in New Issue
Block a user