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

{!! 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('Is Charge Hourly'), ['class'=>'control-label col-md-12']) !!}
is_hourly) == true ? ($model->is_hourly == true ? 'checked' : '') : 'checked'}}>
is_hourly) == true ? ($model->is_hourly == false ? 'checked' : '') : ''}}>
{!!$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', '')!!}
{!! Form::label('status', App\Language::trans('Status'), ['class'=>'control-label col-md-12']) !!}
status) == true ? ($model->status == true ? 'checked' : '') : 'checked'}}>
status) == true ? ($model->status == false ? 'checked' : '') : ''}}>
{!!$errors->first('status', '')!!}
@include('_version_02.utility_charges.charges.__partials.__price_range') @include('_version_02.commons.layouts.partials._form_floaring_footer_standard')
{!! Form::close() !!} @endsection @section('script') if($('#is_hourly').val() == 1) { $("input[name=hourly_rate]").closest(".form-group").show(); $("#prices").addClass('hide'); //.hide(); $("#prices_section").addClass('hide'); //.hide(); } @if($model->is_hourly || old('is_hourly')) $("#prices").hide(); @else $("input[name=hourly_rate]").closest(".form-group").hide(); @endif $("#is_hourly").on("click", function(){ $("input[name=hourly_rate]").closest(".form-group").show(); $("#prices").addClass('hide'); //.hide(); $("#prices_section").addClass('hide'); //.hide(); }); $("#is_hourly_off").on("click", function(){ $("#prices").removeClass('hide'); //.show(); $("#prices_section").removeClass('hide'); //.show(); $("input[name=hourly_rate]").closest(".form-group").hide(); }); @endsection