castopod/app/Views/admin/person/create.php
Yassine Doghri 7fdea63de7 fix(persons): set person picture as optional for better ux
- use default avatar image if person image is not set
- add thumbnail and medium default avatar
images
- set default avatar images directly in public/media folder
- remove public/media's root
folder from .gitignore
- remove unnecessary copy:images script and cpy-cli package

closes #125
2021-12-29 11:37:16 +00:00

95 lines
2.0 KiB
PHP

<?= $this->extend('admin/_layout') ?>
<?= $this->section('title') ?>
<?= lang('Person.create') ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= lang('Person.create') ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>
<?= form_open_multipart(route_to('person-create'), [
'method' => 'post',
'class' => 'flex flex-col',
]) ?>
<?= csrf_field() ?>
<?= form_section(
lang('Person.form.identity_section_title'),
lang('Person.form.identity_section_subtitle'),
) ?>
<?= form_label(lang('Person.form.image'), 'image') ?>
<?= form_input([
'id' => 'image',
'name' => 'image',
'class' => 'form-input',
'type' => 'file',
'accept' => '.jpg,.jpeg,.png',
]) ?>
<small class="mb-4 text-gray-600"><?= lang(
'Person.form.image_size_hint',
) ?></small>
<?= form_label(
lang('Person.form.full_name'),
'full_name',
[],
lang('Person.form.full_name_hint'),
) ?>
<?= form_input([
'id' => 'full_name',
'name' => 'full_name',
'class' => 'form-input mb-4',
'value' => old('full_name'),
'required' => 'required',
'data-slugify' => 'title',
]) ?>
<?= form_label(
lang('Person.form.unique_name'),
'unique_name',
[],
lang('Person.form.unique_name_hint'),
) ?>
<?= form_input([
'id' => 'unique_name',
'name' => 'unique_name',
'class' => 'form-input mb-4',
'value' => old('unique_name'),
'required' => 'required',
'data-slugify' => 'slug',
]) ?>
<?= form_label(
lang('Person.form.information_url'),
'information_url',
[],
lang('Person.form.information_url_hint'),
true,
) ?>
<?= form_input([
'id' => 'information_url',
'name' => 'information_url',
'class' => 'form-input mb-4',
'value' => old('information_url'),
]) ?>
<?= form_section_close() ?>
<?= button(
lang('Person.form.submit_create'),
'',
['variant' => 'primary'],
['type' => 'submit', 'class' => 'self-end'],
) ?>
<?= form_close() ?>
<?= $this->endSection() ?>