Fixed #9973 - add use_default_eula to categories API endpoint

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2021-09-10 20:23:49 -07:00
parent 0d633688a4
commit 514f9aa64a
3 changed files with 9 additions and 0 deletions

View file

@ -29,6 +29,7 @@ class CategoriesTransformer
'image' => ($category->image) ? Storage::disk('public')->url('categories/'.e($category->image)) : null,
'category_type' => ucwords(e($category->category_type)),
'has_eula' => ($category->getEula() ? true : false),
'use_default_eula' => ($category->use_default_eula=='1' ? true : false),
'eula' => ($category->getEula()),
'checkin_email' => ($category->checkin_email =='1'),
'require_acceptance' => ($category->require_acceptance == '1'),

View file

@ -56,6 +56,13 @@ class CategoryPresenter extends Presenter
"title" => trans('admin/categories/table.eula_text'),
"visible" => false,
"formatter" => 'trueFalseFormatter',
],[
"field" => "use_default_eula",
"searchable" => false,
"sortable" => true,
"title" => trans('admin/categories/general.use_default_eula_column'),
"visible" => false,
"formatter" => 'trueFalseFormatter',
],[
"field" => "checkin_email",
"searchable" => false,

View file

@ -17,6 +17,7 @@ return array(
'no_default_eula' => 'No primary default EULA found. Add one in Settings.',
'update' => 'Update Category',
'use_default_eula' => 'Use the <a href="#" data-toggle="modal" data-target="#eulaModal">primary default EULA</a> instead.',
'use_default_eula_column' => 'Use default EULA',
'use_default_eula_disabled' => '<del>Use the primary default EULA instead.</del> No primary default EULA is set. Please add one in Settings.',
);