Fixed signin and register buttons
This commit is contained in:
parent
bd3c6f065f
commit
8218d270ad
@ -127,62 +127,13 @@
|
|||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label"><?= $strLabel; ?></label>
|
<label class="form-label">Actions</label>
|
||||||
<div>
|
<div>
|
||||||
<?php foreach ($varButtons as $b): ?>
|
<?php foreach ($varButtons as $b): ?>
|
||||||
|
<?php BootstrapRender::button($b); ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
</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
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -88,15 +88,15 @@
|
|||||||
"type" => "password",
|
"type" => "password",
|
||||||
]); ?>
|
]); ?>
|
||||||
|
|
||||||
<div class="mb-3">
|
<?php BootstrapRender::buttons([
|
||||||
<label class="form-label">Actions</label>
|
[
|
||||||
<div class="input-group">
|
"tag" => "button",
|
||||||
<button class="btn btn-outline-primary" type="submit">
|
"icon" => "right-to-bracket",
|
||||||
<i class="fa fa-fw fa-right-to-bracket"></i>
|
"label" => "Continue",
|
||||||
<span>Continue</span>
|
"type" => "submit",
|
||||||
</button>
|
"class" => "outline-primary"
|
||||||
</div>
|
]
|
||||||
</div>
|
]); ?>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<a class="text-decoration-none" href="/user/signin">Already have an account?</a>
|
<a class="text-decoration-none" href="/user/signin">Already have an account?</a>
|
||||||
|
@ -72,11 +72,20 @@
|
|||||||
]); ?>
|
]); ?>
|
||||||
|
|
||||||
<?php BootstrapRender::buttons([
|
<?php BootstrapRender::buttons([
|
||||||
"input_group" => 0,
|
[
|
||||||
"buttons" => [
|
"tag" => "button",
|
||||||
["icon" => "right-to-bracket", "label" => "Continue", "type" => "submit", "class" => "outline-primary"],
|
"icon" => "right-to-bracket",
|
||||||
["icon" => "home", "label" => "Home", "href" => "/"]
|
"label" => "Continue",
|
||||||
]]); ?>
|
"type" => "submit",
|
||||||
|
"class" => "outline-primary"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"icon" => "home",
|
||||||
|
"label" => "Home",
|
||||||
|
"href" => "/",
|
||||||
|
"class" => "outline-secondary"
|
||||||
|
]
|
||||||
|
]); ?>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<a class="text-decoration-none" href="/user/register">Don't have an account?</a>
|
<a class="text-decoration-none" href="/user/register">Don't have an account?</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user