mirror of
https://github.com/standardebooks/web.git
synced 2025-07-20 05:14:48 -04:00
Completely type hint template functions and switch to named arguments
This commit is contained in:
parent
6108b5e53d
commit
124e8343fc
125 changed files with 542 additions and 450 deletions
|
@ -52,11 +52,11 @@ catch(Exceptions\LoginRequiredException){
|
|||
catch(Exceptions\InvalidPermissionsException){
|
||||
Template::ExitWithCode(Enums\HttpCode::Forbidden);
|
||||
}
|
||||
?><?= Template::Header([
|
||||
'title' => 'New Project',
|
||||
'css' => ['/css/project.css', '/css/ebook-placeholder.css'],
|
||||
'description' => 'Add a new ebook project.'
|
||||
]) ?>
|
||||
?><?= Template::Header(
|
||||
title: 'New Project',
|
||||
css: ['/css/project.css', '/css/ebook-placeholder.css'],
|
||||
description: 'Add a new ebook project.'
|
||||
) ?>
|
||||
<main>
|
||||
<section class="narrow">
|
||||
<? if(isset($project->Ebook)){ ?>
|
||||
|
@ -66,14 +66,14 @@ catch(Exceptions\InvalidPermissionsException){
|
|||
<? } ?>
|
||||
<h1>New Project</h1>
|
||||
|
||||
<?= Template::Error(['exception' => $exception]) ?>
|
||||
<?= Template::Error(exception: $exception) ?>
|
||||
|
||||
<form action="/projects" autocomplete="off" method="<?= Enums\HttpMethod::Post->value ?>" class="project-form">
|
||||
<?= Template::ProjectForm(['project' => $project]) ?>
|
||||
<?= Template::ProjectForm(project: $project) ?>
|
||||
<? if(!isset($project->EbookId)){ ?>
|
||||
<fieldset class="create-update-ebook-placeholder placeholder-form">
|
||||
<legend>Placeholder</legend>
|
||||
<?= Template::EbookPlaceholderForm(['ebook' => $project->Ebook ?? new Ebook(), 'showProjectForm' => false]) ?>
|
||||
<?= Template::EbookPlaceholderForm(ebook: $project->Ebook ?? new Ebook(), showProjectForm: false) ?>
|
||||
</fieldset>
|
||||
<? } ?>
|
||||
<div class="footer">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue