first
This commit is contained in:
31
views/index.php
Normal file
31
views/index.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* @var array $inputs
|
||||
*/
|
||||
|
||||
use Itguild\App\forms\UserForm;
|
||||
|
||||
$form = new UserForm([
|
||||
'action' => 'save_user.php',
|
||||
'method' => 'POST'
|
||||
]);
|
||||
|
||||
$form->load($inputs);
|
||||
$form->field(type: "text", name: "additional_email", params: [
|
||||
'class' => 'additional_email form-control form-control-dark',
|
||||
'label' => 'Дполнительный email',
|
||||
'id' => 'additional_email',
|
||||
]);
|
||||
$form->render();
|
||||
|
||||
$form2 = new UserForm([
|
||||
'action' => "save_client.php",
|
||||
'method' => 'POST'
|
||||
]);
|
||||
|
||||
$form2->field(type: "text", name: "user_id", params: [
|
||||
'class' => 'form-control form-control-dark',
|
||||
'label' => 'Пользователь',
|
||||
'id' => 'user_id',
|
||||
]);
|
||||
$form2->render();
|
60
views/layouts/main.php
Normal file
60
views/layouts/main.php
Normal file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* @var string $content
|
||||
*/
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Form2</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
|
||||
<style>
|
||||
.inputForm {
|
||||
color: RED;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.additional_email {
|
||||
color: #2c35cc;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
console.log('form ready');
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<header class="p-3 bg-dark text-white">
|
||||
<div class="container">
|
||||
<div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start">
|
||||
<a href="/" class="d-flex align-items-center mb-2 mb-lg-0 text-white text-decoration-none">
|
||||
<svg class="bi me-2" width="40" height="32" role="img" aria-label="Bootstrap">
|
||||
<use xlink:href="#bootstrap"></use>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0">
|
||||
<li><a href="#" class="nav-link px-2 text-secondary">Home</a></li>
|
||||
<li><a href="#" class="nav-link px-2 text-white">Features</a></li>
|
||||
<li><a href="#" class="nav-link px-2 text-white">Pricing</a></li>
|
||||
<li><a href="#" class="nav-link px-2 text-white">FAQs</a></li>
|
||||
<li><a href="#" class="nav-link px-2 text-white">About</a></li>
|
||||
</ul>
|
||||
|
||||
<form class="col-12 col-lg-auto mb-3 mb-lg-0 me-lg-3">
|
||||
<input type="search" class="form-control form-control-dark" placeholder="Search..." aria-label="Search">
|
||||
</form>
|
||||
|
||||
<div class="text-end">
|
||||
<button type="button" class="btn btn-outline-light me-2">Login</button>
|
||||
<button type="button" class="btn btn-warning">Sign-up</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container">
|
||||
<?= $content ?>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user