Clearer indication of whether or not the user will be emailed a eula

This commit is contained in:
snipe 2017-10-11 14:44:25 -07:00
parent 485b6397d0
commit 6d4574130f
4 changed files with 11 additions and 12 deletions

View file

@ -20,9 +20,9 @@ class CategoriesController extends Controller
public function index(Request $request) public function index(Request $request)
{ {
$this->authorize('view', Category::class); $this->authorize('view', Category::class);
$allowed_columns = ['id', 'name','category_type','use_default_eula','require_acceptance','checkin_email']; $allowed_columns = ['id', 'name','category_type','use_default_eula','eula_text', 'require_acceptance','checkin_email'];
$categories = Category::select(['id', 'created_at', 'updated_at', 'name','category_type','use_default_eula','require_acceptance','checkin_email']) $categories = Category::select(['id', 'created_at', 'updated_at', 'name','category_type','use_default_eula','eula_text', 'require_acceptance','checkin_email'])
->withCount('assets', 'accessories', 'consumables', 'components'); ->withCount('assets', 'accessories', 'consumables', 'components');
if ($request->has('search')) { if ($request->has('search')) {

View file

@ -26,7 +26,7 @@ class CategoriesTransformer
'id' => (int) $category->id, 'id' => (int) $category->id,
'name' => e($category->name), 'name' => e($category->name),
'type' => e($category->category_type), 'type' => e($category->category_type),
'use_default_eula' => ($category->use_default_eula =='1') ? true : false, 'eula' => ($category->getEula()) ? true : false,
'checkin_email' => ($category->checkin_email =='1') ? true : false, 'checkin_email' => ($category->checkin_email =='1') ? true : false,
'require_acceptance' => ($category->require_acceptance =='1') ? true : false, 'require_acceptance' => ($category->require_acceptance =='1') ? true : false,
'assets_count' => $category->assets_count, 'assets_count' => $category->assets_count,

View file

@ -63,20 +63,21 @@ class CategoryPresenter extends Presenter
"title" => trans('general.components'), "title" => trans('general.components'),
"visible" => true "visible" => true
], [ ], [
"field" => "use_default_eula", "field" => "eula",
"searchable" => false, "searchable" => false,
"sortable" => false, "sortable" => false,
"title" => trans('admin/categories/table.eula_text'), "title" => trans('admin/categories/table.eula_text'),
"visible" => false, "visible" => false,
"formatter" => 'trueFalseFormatter', "formatter" => 'trueFalseFormatter',
], [ ], [
"field" => "require_acceptance", "field" => "require_acceptance",
"searchable" => false, "searchable" => false,
"sortable" => false, "sortable" => false,
"title" => trans('admin/categories/table.require_acceptance'), "title" => trans('admin/categories/table.require_acceptance'),
"visible" => true, "visible" => true,
"formatter" => 'trueFalseFormatter', "formatter" => 'trueFalseFormatter',
], [ ],
[
"field" => "actions", "field" => "actions",
"searchable" => false, "searchable" => false,
"sortable" => false, "sortable" => false,

View file

@ -91,16 +91,14 @@
{!! $errors->first('note', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!} {!! $errors->first('note', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div> </div>
</div> </div>
<button type="submit" class="btn btn-success pull-right"><i <div class="box-footer">
class="fa fa-check icon-white"></i> {{ trans('general.checkin') }}</button> <a class="btn btn-link" href="{{ URL::previous() }}"> {{ trans('button.cancel') }}</a>
</form> <button type="submit" class="btn btn-success pull-right"><i class="fa fa-check icon-white"></i> {{ trans('general.checkout') }}</button>
</div> </div>
</form> </form>
</div> <!--/.col-md-12--> </div> <!--/.col-md-12-->
</div> <!--/.box-body--> </div> <!--/.box-body-->
<div class="box-footer">
<a class="btn btn-link" href="{{ URL::previous() }}"> {{ trans('button.cancel') }}</a>
</div>
</div> <!--/.box.box-default--> </div> <!--/.box.box-default-->
</div> </div>
</div> </div>