@extends('commons.layouts.admin') @section('content') {!! Form::model($model, ['class'=>'form-horizontal']) !!} @include('commons.layouts.partials._alert')

{{App\Language::trans('Detail Form')}}

{!! Form::label('code', App\Language::trans('Code'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('code', null, ['class'=>'form-control','required']) !!} {!!$errors->first('code', '')!!}
{!! Form::label('name', App\Language::trans('Name'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('name', null, ['class'=>'form-control','required']) !!} {!!$errors->first('name', '')!!}
{!! Form::label('is_hourly', App\Language::trans('Hourly Rate'), ['class'=>'control-label col-md-4']) !!}
{!!$errors->first('is_hourly', '')!!}
{!! Form::label('hourly_rate', App\Language::trans('Hourly / Rate'), ['class'=>'control-label col-md-4']) !!}
{!! Form::number('hourly_rate', null, ['class'=>'form-control','min'=>'0','step'=>'0.01']) !!} {!!$errors->first('hourly_rate', '')!!}
@include('utility_charges.charges.__partials.__price_range')

{{App\Language::trans('More Detail Form')}}

{!! Form::label('status', App\Language::trans('Status'), ['class'=>'control-label col-md-4']) !!}
{!!$errors->first('status', '')!!}
{!! Form::close() !!} @endsection @section('script') @if($model->is_hourly || old('is_hourly')) $("#prices").hide(); @else $("input[name=hourly_rate]").closest(".form-group").hide(); @endif $("#is_hourly_yes").on("click", function(){ $("input[name=hourly_rate]").closest(".form-group").show(); $("#prices").hide(); }); $("#is_hourly_no").on("click", function(){ $("#prices").show(); $("input[name=hourly_rate]").closest(".form-group").hide(); }); @endsection