@extends('socialite::layouts.admin') @section('content')
@include('flash::message')

{{ $mode.' '.trans('socialite::admin.page_category') }}

@if($mode=="create")
@else @endif {{ csrf_field() }}
{{ Form::label('name', trans('socialite::admin.name'), ['class' => 'col-sm-2 control-label']) }}
@if($mode == "create") {{ Form::text('name',null,['class' => 'form-control']) }} @else {{ Form::text('name', $category->name, ['class' => 'form-control']) }} @endif @if ($errors->has('name')) {{ $errors->first('name') }} @endif
{{ Form::label('description', trans('socialite::common.description'), ['class' => 'col-sm-2 control-label']) }}
@if($mode =="create") {{ Form::textarea('description', null ,['class' => 'form-control']) }} @else {{ Form::textarea('description', $category->description, ['class' => 'form-control']) }} @endif @if ($errors->has('description')) {{ $errors->first('description') }} @endif
{{ Form::label('active', trans('socialite::admin.active'), ['class' => 'col-sm-2 control-label']) }}
@if($mode =="create") {{ Form::select('active', array(1 => trans('socialite::admin.active'), 0 => trans('socialite::admin.inactive')), null , ['class' => 'form-control', 'placeholder' => trans('socialite::admin.please_select')]) }} @else {{ Form::select('active', array(1 => trans('socialite::admin.active'), 0 => trans('socialite::admin.inactive')), $category->active , ['class' => 'form-control', 'placeholder' => trans('socialite::admin.please_select')]) }} @endif @if ($errors->has('active')) {{ $errors->first('active') }} @endif
@if($mode=="create") @else @endif
@endsection