diff --git a/app/Http/Controllers/Entity/PostController.php b/app/Http/Controllers/Entity/PostController.php index ad99e49a1f..49935c52c8 100644 --- a/app/Http/Controllers/Entity/PostController.php +++ b/app/Http/Controllers/Entity/PostController.php @@ -25,7 +25,7 @@ public function create(Campaign $campaign, Entity $entity, Post $post) { $this->authorize('post', [$entity->child, 'add']); $parentRoute = $entity->pluralType(); - $templates = Post::template()->pluck('name', 'id')->all(); + $templates = Post::template()->orderBy('name')->pluck('name', 'id')->all(); $template = request()->input('template'); if (!empty($template) && $this->authorize('useTemplates', $campaign)) { diff --git a/lang/en/posts.php b/lang/en/posts.php index 79962f6c19..16a2a8eda7 100644 --- a/lang/en/posts.php +++ b/lang/en/posts.php @@ -4,7 +4,7 @@ 'create' => [ 'title' => 'New Post', 'template' => [ - 'helper' => 'The campaigns admins have defined the following posts as templates that can be re-used.' + 'helper' => 'The campaign admins have defined the following posts as templates that can be re-used.' ] ], 'fields' => [ diff --git a/resources/views/entities/pages/posts/_form.blade.php b/resources/views/entities/pages/posts/_form.blade.php index 760762fa78..a8db13023d 100644 --- a/resources/views/entities/pages/posts/_form.blade.php +++ b/resources/views/entities/pages/posts/_form.blade.php @@ -26,6 +26,7 @@ if (isset($template)) { $model = $template; $model->name = ''; + $model->position = null; } $last = array_key_last($options);