fix post form
This commit is contained in:
parent
37c351419c
commit
b5a7adbc7d
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -26,3 +26,4 @@ yarn-error.log
|
|||
/public/uploads/
|
||||
!/public/uploads/.gitkeep
|
||||
/data
|
||||
/.mage.yml
|
||||
|
|
|
@ -23,7 +23,9 @@ class CategoryAdminController extends AdminController
|
|||
*/
|
||||
public function index(int $page = 1, RepositoryQuery $query, Request $request): Response
|
||||
{
|
||||
$pager = $query->paginate($page);
|
||||
$pager = $query
|
||||
->orderBy('.title', 'ASC')
|
||||
->paginate($page, 100);
|
||||
|
||||
return $this->render('blog/category_admin/index.html.twig', [
|
||||
'pager' => $pager,
|
||||
|
|
|
@ -72,7 +72,6 @@ class PostEventSubscriber extends EntityManagerEventSubscriber
|
|||
|
||||
protected function removeOrphanUploads()
|
||||
{
|
||||
/*
|
||||
$finder = new Finder();
|
||||
$finder->files()->in('uploads/post');
|
||||
|
||||
|
@ -89,6 +88,5 @@ class PostEventSubscriber extends EntityManagerEventSubscriber
|
|||
$this->filesystem->remove($file->getRealPath());
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,8 +47,8 @@ class PostType extends AbstractType
|
|||
'label' => 'Format',
|
||||
'required' => true,
|
||||
'choices' => [
|
||||
'HTML' => 'html',
|
||||
'Markdown' => 'markdown',
|
||||
'HTML' => 'html',
|
||||
],
|
||||
'constraints' => [
|
||||
new NotBlank(),
|
||||
|
|
|
@ -49,7 +49,9 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{{ form_rest(form) }}
|
||||
<div class="d-none">
|
||||
{{ form_rest(form) }}
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form method="post" action="{{ path('admin_blog_post_delete', {entity: entity.id}) }}" id="form-delete" data-form-confirm>
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{{ form_rest(form) }}
|
||||
<div class="d-none">
|
||||
{{ form_rest(form) }}
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue