Added floating labels and changed in login form
This commit is contained in:
parent
5469ce51b1
commit
70cefda593
4 changed files with 71 additions and 38 deletions
|
@ -12,39 +12,38 @@
|
||||||
|
|
||||||
<!-- CSS -->
|
<!-- CSS -->
|
||||||
<?php
|
<?php
|
||||||
echo HTML::cssBootstrap();
|
echo HTML::cssBootstrap();
|
||||||
echo HTML::cssBootstrapIcons();
|
echo HTML::cssBootstrapIcons();
|
||||||
echo HTML::css(array(
|
echo HTML::css(array(
|
||||||
'bludit-bootstrap.css',
|
'bludit-bootstrap.css',
|
||||||
'bludit.css'
|
'bludit.css'
|
||||||
), DOMAIN_ADMIN_THEME_CSS);
|
), DOMAIN_ADMIN_THEME_CSS);
|
||||||
echo HTML::css(array(
|
echo HTML::css(array(
|
||||||
'jquery.datetimepicker.min.css',
|
'jquery.datetimepicker.min.css',
|
||||||
'jquery-ui.min.css',
|
'jquery-ui.min.css',
|
||||||
'select2.min.css',
|
'select2.min.css',
|
||||||
'select2-bootstrap4.min.css',
|
'select2-bootstrap4.min.css',
|
||||||
'tagsinput-revisited.min.css'
|
'tagsinput-revisited.min.css'
|
||||||
), DOMAIN_CORE_CSS);
|
), DOMAIN_CORE_CSS);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- Javascript -->
|
<!-- Javascript -->
|
||||||
<?php
|
<?php
|
||||||
echo HTML::jquery();
|
echo HTML::jquery();
|
||||||
echo HTML::jsBootstrap();
|
echo HTML::jsBootstrap();
|
||||||
echo HTML::jsSortable();
|
echo HTML::jsSortable();
|
||||||
echo HTML::js(array(
|
echo HTML::js(array(
|
||||||
'jquery.datetimepicker.full.min.js',
|
'jquery.datetimepicker.full.min.js',
|
||||||
'jquery-ui.min.js',
|
'jquery-ui.min.js',
|
||||||
'select2.full.min.js',
|
'select2.full.min.js',
|
||||||
'tagsinput-revisited.min.js',
|
'tagsinput-revisited.min.js',
|
||||||
'functions.js',
|
'functions.js',
|
||||||
'api.js'
|
'api.js'
|
||||||
), DOMAIN_CORE_JS);
|
), DOMAIN_CORE_JS);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- Execute plugins for the admin area inside the HTML <head> tag -->
|
<!-- Execute plugins for the admin area inside the HTML <head> tag -->
|
||||||
<?php execPluginsByHook('adminHead') ?>
|
<?php execPluginsByHook('adminHead') ?>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="h-100 bg-light">
|
<body class="h-100 bg-light">
|
||||||
|
|
|
@ -5,14 +5,16 @@
|
||||||
<meta charset="<?php echo CHARSET ?>">
|
<meta charset="<?php echo CHARSET ?>">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="robots" content="noindex,nofollow">
|
<meta name="robots" content="noindex,nofollow">
|
||||||
|
<meta name="generator" content="Bludit">
|
||||||
|
|
||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_CORE_IMG.'favicon.png?version='.BLUDIT_VERSION ?>">
|
<link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_CORE_IMG . 'favicon.png?version=' . BLUDIT_VERSION ?>">
|
||||||
|
|
||||||
<!-- CSS -->
|
<!-- CSS -->
|
||||||
<?php
|
<?php
|
||||||
echo Theme::cssBootstrap();
|
echo HTML::cssBootstrap();
|
||||||
echo Theme::css(array(
|
echo HTML::cssBootstrapIcons();
|
||||||
|
echo HTML::css(array(
|
||||||
'bludit-bootstrap.css',
|
'bludit-bootstrap.css',
|
||||||
'bludit.css'
|
'bludit.css'
|
||||||
), DOMAIN_ADMIN_THEME_CSS);
|
), DOMAIN_ADMIN_THEME_CSS);
|
||||||
|
|
|
@ -9,17 +9,23 @@ echo Bootstrap::formOpen(array());
|
||||||
'value'=>$security->getTokenCSRF()
|
'value'=>$security->getTokenCSRF()
|
||||||
));
|
));
|
||||||
|
|
||||||
echo '
|
echo Bootstrap::formFloatingLabels(array(
|
||||||
<div class="mb-3">
|
'id'=>'username',
|
||||||
<input type="text" value="'.(isset($_POST['username'])?Sanitize::html($_POST['username']):'').'" class="form-control form-control-lg" id="username" name="username" placeholder="'.$L->g('Username').'" autofocus>
|
'name'=>'username',
|
||||||
</div>
|
'type'=>'text',
|
||||||
';
|
'value'=>(isset($_POST['username'])?Sanitize::html($_POST['username']):''),
|
||||||
|
'class'=>'form-control-lg',
|
||||||
|
'placeholder'=>$L->g('Username')
|
||||||
|
));
|
||||||
|
|
||||||
echo '
|
echo Bootstrap::formFloatingLabels(array(
|
||||||
<div class="mb-3">
|
'id'=>'password',
|
||||||
<input type="password" class="form-control form-control-lg" id="password" name="password" placeholder="'.$L->g('Password').'">
|
'name'=>'password',
|
||||||
</div>
|
'type'=>'password',
|
||||||
';
|
'value'=>'',
|
||||||
|
'class'=>'form-control-lg',
|
||||||
|
'placeholder'=>$L->g('Password')
|
||||||
|
));
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
|
|
|
@ -2,6 +2,32 @@
|
||||||
|
|
||||||
class Bootstrap {
|
class Bootstrap {
|
||||||
|
|
||||||
|
// Floating Labels
|
||||||
|
// https://getbootstrap.com/docs/5.0/forms/floating-labels/
|
||||||
|
public static function formFloatingLabels($args)
|
||||||
|
{
|
||||||
|
$name = $args['name'];
|
||||||
|
$id = isset($args['id'])?$args['id']:$name;
|
||||||
|
$disabled = empty($args['disabled'])?'':'disabled';
|
||||||
|
$readonly = empty($args['readonly'])?'':'readonly';
|
||||||
|
$placeholder = isset($args['placeholder'])?$args['placeholder']:'';
|
||||||
|
$value = isset($args['value'])?$args['value']:'';
|
||||||
|
$type = isset($args['type'])?$args['type']:'text';
|
||||||
|
$label = isset($args['label'])?$args['label']:$placeholder;
|
||||||
|
|
||||||
|
$class = 'form-control';
|
||||||
|
if (isset($args['class'])) {
|
||||||
|
$class = $class.' '.$args['class'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return <<<EOF
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<input type="$type" class="$class" id="$id" placeholder="$placeholder">
|
||||||
|
<label for="$id">$label</label>
|
||||||
|
</div>
|
||||||
|
EOF;
|
||||||
|
}
|
||||||
|
|
||||||
public static function formInputText($args)
|
public static function formInputText($args)
|
||||||
{
|
{
|
||||||
$name = $args['name'];
|
$name = $args['name'];
|
||||||
|
|
Loading…
Add table
Reference in a new issue