@extends('admin.layout') @section('admin-title') {{ $category->id ? 'Edit' : 'Create' }} Item Category @endsection @section('admin-content') {!! breadcrumbs([ 'Admin Panel' => 'admin', 'Item Categories' => 'admin/data/item-categories', ($category->id ? 'Edit' : 'Create') . ' Category' => $category->id ? 'admin/data/item-categories/edit/' . $category->id : 'admin/data/item-categories/create', ]) !!}

{{ $category->id ? 'Edit' : 'Create' }} Item Category @if ($category->id) Delete Category @endif

{!! Form::open(['url' => $category->id ? 'admin/data/item-categories/edit/' . $category->id : 'admin/data/item-categories/create', 'files' => true]) !!}

Basic Information

{!! Form::label('Name') !!} {!! Form::text('name', $category->name, ['class' => 'form-control']) !!}
{!! Form::label('World Page Image (Optional)') !!} {!! add_help('This image is used only on the world information pages.') !!}
{!! Form::label('image', 'Choose file...', ['class' => 'custom-file-label']) !!} {!! Form::file('image', ['class' => 'custom-file-input']) !!}
Recommended size: 200px x 200px
@if ($category->has_image)
{!! Form::checkbox('remove_image', 1, false, ['class' => 'form-check-input']) !!} {!! Form::label('remove_image', 'Remove current image', ['class' => 'form-check-label']) !!}
@endif
{!! Form::label('Description (Optional)') !!} {!! Form::textarea('description', $category->description, ['class' => 'form-control wysiwyg']) !!}
@if (Config::get('lorekeeper.settings.donation_shop.item_donations') == 1 || Config::get('lorekeeper.settings.donation_shop.item_donations') == 3)
{!! Form::checkbox('can_donate', 1, $category->can_donate, ['class' => 'form-check-input', 'data-toggle' => 'toggle', 'data-on' => 'Allow', 'data-off' => 'Disallow']) !!} {!! Form::label('is_character_owned', 'Can Be Donated', ['class' => 'form-check-label ml-3']) !!} {!! add_help('This will allow users to donate items in this category to the Donation Shop.') !!}
@endif
{!! Form::checkbox('can_user_sell', 1, $category->can_user_sell, ['class' => 'form-check-input', 'data-toggle' => 'toggle', 'data-on' => 'Allow', 'data-off' => 'Disallow']) !!} {!! Form::label('can_user_sell', 'Can Be Sold In User Shops', ['class' => 'form-check-label ml-3']) !!} {!! add_help('This will allow or disallow users to sell items in their user shops..') !!}
{!! Form::checkbox('is_visible', 1, $category->id ? $category->is_visible : 1, ['class' => 'form-check-input', 'data-toggle' => 'toggle']) !!} {!! Form::label('is_visible', 'Is Visible', ['class' => 'form-check-label ml-3']) !!} {!! add_help('If turned off, the category will not be visible in the category list or available for selection in search. Permissioned staff will still be able to add items to them, however.') !!}
{!! Form::checkbox('is_character_owned', 1, $category->is_character_owned, ['class' => 'form-check-input', 'data-toggle' => 'toggle', 'data-on' => 'Allow', 'data-off' => 'Disallow']) !!} {!! Form::label('is_character_owned', 'Can Be Owned by Characters', ['class' => 'form-check-label ml-3']) !!} {!! add_help('This will allow items in this category to be owned by characters.') !!}
{!! Form::label('character_limit', 'Character Hold Limit') !!} {!! add_help('This is the maximum amount of items from this category a character can possess. Set to 0 to allow infinite.') !!} {!! Form::text('character_limit', $category ? $category->character_limit : 0, ['class' => 'form-control stock-field', 'data-name' => 'character_limit']) !!}
{!! Form::checkbox('can_name', 1, $category->can_name, ['class' => 'form-check-input', 'data-toggle' => 'toggle', 'data-on' => 'Allow', 'data-off' => 'Disallow']) !!} {!! Form::label('can_name', 'Can be Named', ['class' => 'form-check-label ml-3']) !!} {!! add_help('This will set items in this category to be able to be named when in character inventories-- for instance, for pets. Works best in conjunction with a hold limit on the category.') !!}
{!! Form::submit($category->id ? 'Edit' : 'Create', ['class' => 'btn btn-primary']) !!}
{!! Form::close() !!} @if ($category->id)

Preview

@include('world._item_category_entry', ['imageUrl' => $category->categoryImageUrl, 'name' => $category->displayName, 'description' => $category->parsed_description, 'category' => $category])
@endif @endsection @section('scripts') @parent @endsection