mirror of
https://github.com/standardebooks/web.git
synced 2025-07-22 07:14:59 -04:00
Allow creating new ebook placeholders when creating a new project
This commit is contained in:
parent
4596aeb007
commit
98e09f414e
14 changed files with 114 additions and 44 deletions
|
@ -54,7 +54,7 @@ catch(Exceptions\InvalidPermissionsException){
|
|||
}
|
||||
?><?= Template::Header([
|
||||
'title' => 'New Project',
|
||||
'css' => ['/css/project.css'],
|
||||
'css' => ['/css/project.css', '/css/ebook-placeholder.css'],
|
||||
'description' => 'Add a new ebook project.'
|
||||
]) ?>
|
||||
<main>
|
||||
|
@ -69,7 +69,13 @@ catch(Exceptions\InvalidPermissionsException){
|
|||
<?= Template::Error(['exception' => $exception]) ?>
|
||||
|
||||
<form action="/projects" method="<?= Enums\HttpMethod::Post->value ?>" class="project-form">
|
||||
<?= Template::ProjectForm(['project' => $project, 'areFieldsRequired' => true]) ?>
|
||||
<?= 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]) ?>
|
||||
</fieldset>
|
||||
<? } ?>
|
||||
<div class="footer">
|
||||
<button>Submit</button>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue