mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Default templates: Added page picker and working forms
- Adapted existing page picker to be usable elsewhere. - Added endpoint for getting templates for entity picker. - Added search template filter to support above. - Updated book save handling to check/validate submitted template. - Allows non-visible pages to flow through the save process, if not being changed. - Updated page deletes to handle removal of default usage on books. - Tweaked wording and form styles to suit. - Updated migration to explicity reflect default value.
This commit is contained in:
@ -202,6 +202,10 @@ class TrashCan
|
||||
$attachmentService->deleteFile($attachment);
|
||||
}
|
||||
|
||||
// Remove book template usages
|
||||
Book::query()->where('default_template', '=', $page->id)
|
||||
->update(['default_template' => null]);
|
||||
|
||||
$page->forceDelete();
|
||||
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user