IMMREX7

aku nok ndi : /home/spdtg/www/schoolmis/resources/views/superadmin/schools/
File Up :
aku nok ndi : /home/spdtg/www/schoolmis/resources/views/superadmin/schools/index.blade.php

@extends('superadmin.layout')
@section('content')
<div class="row clearfix">
    <div class="col-sm-12">
        <div class="card">
            <div class="header">
                <h2><strong>@if(isset($school))Edit @else  Add @endif</strong> School</h2>
            </div>
            <div class="body">
                @if(isset($school))
                {!! Form::model($school, ['method' => 'PATCH', 'action' => ['SchoolRegController@update', $school->idSchool],'files'=>true, 'class' => 'form-horizontal']) !!}
                @else
                {!! Form::open(['url' => 'admin/schregister', 'class' => 'form-horizontal','files'=>true]) !!}
                @endif
                <fieldset>
                    <legend style="color: #6572b8;font-weight: bold;">Account Information</legend>
                    <div class="row clearfix">
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">Name</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('userName',null,['class' => 'form-control']) !!}
                                @if ($errors->has('userName'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('userName') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">Email</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('userEmail',null,['class' => 'form-control','maxlength'=>'100']) !!}
                                @if ($errors->has('userEmail'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('userEmail') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                    </div>
                    <div class="row clearfix">
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">Mobile</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('userMobile',null,['class' => 'form-control','maxlength'=>'15']) !!}
                                @if ($errors->has('userMobile'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('userMobile') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                        <div class="col-sm-2 form-control-label">
                            <label for="classname">City</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('userCity',null,['class' => 'form-control','maxlength'=>'100']) !!}
                                @if ($errors->has('userCity'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('userCity') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                    </div>
                    <div class="row clearfix">
                        <div class="col-sm-2 form-control-label">
                            <label for="classname">Pincode</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('userPincode',null,['class' => 'form-control','maxlength'=>'6','minlength'=>'6']) !!}
                                @if ($errors->has('userPincode'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('userPincode') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">Password</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                @if(isset($school))
                                {!! Form::text('password',$school->schuser->pwd,['class' => 'form-control']) !!}
                                @else
                                {!! Form::text('password',null,['class' => 'form-control']) !!}
                                @endif
                                @if ($errors->has('password'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('password') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                    </div>
                </fieldset>
                <fieldset>
                    <legend style="color: #6572b8;font-weight: bold;">Center Profile</legend>
                    <div class="row clearfix">
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">School Name</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('schoolName',null,['class' => 'form-control','maxlength'=>'200','minlength'=>'3']) !!}
                                @if ($errors->has('schoolName'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('schoolName') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">School Logo</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                <img style="width: 100px;height: 100px; margin-top:10px;"  id="uploadPreview" name="image">
                                @if(isset($school))
                                <img src="{{ asset('storage/schools/'.$school->idSchool.'/'.$school->schoolLogo)}}" height="100">
                                @endif
                                <input type="file"  name="schoolLogo" id="image" onchange="PreviewImage();">
                                @if ($errors->has('schoolLogo'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('schoolLogo') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                    </div>
                    <div class="row clearfix">
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">Contact Person</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('contactPerson',null,['class' => 'form-control','maxlength'=>'100']) !!}
                                @if ($errors->has('contactPerson'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('contactPerson') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">State</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                @if(isset($school))
                                    @if($school->idCountry == 1)
                                    {!! Form::select('idState',$states,null,['class' => 'form-control show-tick ms select2', 'id'=>'states']) !!}
                                    @else
                                    {!! Form::select('idState',statesQatar(),null,['class' => 'form-control show-tick ms select2', 'id'=>'states']) !!}
                                    @endif
                                @else
                                {!! Form::select('idState',$states,null,['class' => 'form-control show-tick ms select2', 'id'=>'states']) !!}
                                @endif
                                @if ($errors->has('idState'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('idState') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                    </div>
                    <div class="row clearfix">
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">Country</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::select('idCountry',$country,null,['class' => 'form-control show-tick ms select2','onchange'=>'updateStates(this);']) !!}
                                @if ($errors->has('idCountry'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('idCountry') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                    </div>
                    <div class="row clearfix">
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">City</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('city',null,['class' => 'form-control','maxlength'=>'100']) !!}
                                @if ($errors->has('city'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('city') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                        <div class="col-sm-2 form-control-label">
                            <label for="classname">Street</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('street',null,['class' => 'form-control','maxlength'=>'250']) !!}
                                @if ($errors->has('street'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('street') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                    </div>
                    <div class="row clearfix">
                        <div class="col-sm-2 form-control-label">
                            <label for="classname">Landmark</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('landmark',null,['class' => 'form-control','maxlength'=>'200']) !!}
                                @if ($errors->has('landmark'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('landmark') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                        <div class="col-sm-2 form-control-label">
                            <label for="classname">Sub Area</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('subArea',null,['class' => 'form-control']) !!}
                                @if ($errors->has('subArea'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('subArea') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                    </div>
                    <div class="row clearfix">
                        <div class="col-sm-2 form-control-label">
                            <label for="classname">Area</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('area',null,['class' => 'form-control']) !!}
                                @if ($errors->has('area'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('area') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                        <div class="col-sm-2 form-control-label">
                            <label for="classname">Telephone</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('telephone',null,['class' => 'form-control']) !!}
                                @if ($errors->has('telephone'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('telephone') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                    </div>
                    <div class="row clearfix">
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">Moblie</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('mobile',null,['class' => 'form-control']) !!}
                                @if ($errors->has('mobile'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('mobile') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">Email</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('email',null,['class' => 'form-control']) !!}
                                @if ($errors->has('email'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('email') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                    </div>
                    <div class="row clearfix">
                        <div class="col-sm-2 form-control-label">
                            <label for="classname">Website</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('website',null,['class' => 'form-control']) !!}
                                @if ($errors->has('website'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('website') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                         <div class="col-sm-2 form-control-label">
                             <label for="classname" class="required">School Code</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('schoolCode',null,['class' => 'form-control']) !!}
                                @if ($errors->has('schoolCode'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('schoolCode') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                    </div>
                    <div class="row clearfix">
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">Payment Start Date</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::date('pg_start',null,['class' => 'form-control']) !!}
                            </div>
                        </div>
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">Payment End Date</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::date('pg_stop',null,['class' => 'form-control']) !!}
                            </div>
                        </div>
                    </div>
                </fieldset>
                <fieldset>
                    <legend style="color: #6572b8;font-weight: bold;">SMS Integration data</legend>
                    <div class="row clearfix">
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">SMS API LoginID</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('smsUsername',null,['class' => 'form-control']) !!}
                                @if ($errors->has('smsUsername'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('smsUsername') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">SMS API Password</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('smsPassword',null,['class' => 'form-control','maxlength'=>'100']) !!}
                                @if ($errors->has('smsPassword'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('smsPassword') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                    </div>

                    <div class="row clearfix">
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">Sender ID</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('smsSenderId',null,['class' => 'form-control','maxlength'=>'6']) !!}
                                @if ($errors->has('smsSenderId'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('smsSenderId') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">SMS Regard Text</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('sms_regard_text',null,['class' => 'form-control']) !!}
                             
                            </div>
                        </div>
                    </div>
                     <div class="row clearfix">
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">SEND SMS</label>
                        </div>
                        <div class="col-sm-3">
                             <input type="radio" name="smsmode" value="none" @php if(isset($school)) if($school->smsmode == "none") echo "checked"; @endphp> None
                            <br>
                            <input type="radio" name="smsmode" value="auto" @php if(isset($school)) if($school->smsmode == "auto") echo "checked"; @endphp> Auto
                            <br>
                            <input type="radio" name="smsmode" value="onclick" @php if(isset($school)) if($school->smsmode == "onclick") echo "checked"; @endphp> On Click
                        </div>
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">Notification</label>
                        </div>
                        <div class="col-sm-3">
                             <input type="radio" name="notificationmode" value="none" @php if(isset($school)) if($school->notificationmode == "none") echo "checked"; @endphp> None
                            <br>
                            <input type="radio" name="notificationmode" value="auto" @php if(isset($school)) if($school->notificationmode == "auto") echo "checked"; @endphp> Auto
                            <br>
                            <input type="radio" name="notificationmode" value="onclick" @php if(isset($school)) if($school->notificationmode == "onclick") echo "checked"; @endphp> On Click
                        </div>
                     </div>
                    <div class="row  clearfix">
                        <div class="col-sm-1"></div>
                        <div class="col-sm-8">
                            @if(isset($school))

                            <table class="table table-bordered" id="edit">
                                <thead>
                                    <tr>
                                        <th>Template Name</th>
                                        <th>Template ID</th>
                                        <th></th>
                                    </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td>
                                        @php $mp = \App\SchoolSmsTemplate::where('idSchool','=',$school->idSchool)->where('template_name','=','manual_present')->first(); @endphp
                                        Manual Attendance Present
                                        <input type="hidden" name="templates[1][template_name]" value="manual_present"/>
                                        @if(!empty($mp)) <input type="hidden" name="templates[1][idSmsTemplate]" value="{{$mp->idSmsTemplate}}"/>@endif
                                    </td>
                                    <td>
                                        @if(!empty($mp))
                                        <input type="text" name="templates[1][template_id]" value="{{$mp->template_id}}" class="form-control">
                                        @else
                                        {!! Form::text('templates[1][template_id]',null,['class' => 'form-control']) !!}
                                        @endif
                                    </td>
                                    <td>
                                        <input type="checkbox" name="templates[1][template_status]" value="Y" @php if(isset($mp->status)) if($mp->status == "Y") echo "checked"; @endphp>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        @php $ma = \App\SchoolSmsTemplate::where('idSchool','=',$school->idSchool)->where('template_name','=','manual_absent')->first(); @endphp
                                        @if(!empty($ma))<input type="hidden" name="templates[2][idSmsTemplate]" value="{{$ma->idSmsTemplate}}">@endif
                                        Manual Attendance Absent
                                        <input type="hidden" name="templates[2][template_name]" value="manual_absent">
                                    </td>
                                    <td>
                                        @if(!empty($ma))
                                        <input type="text" name="templates[2][template_id]" value="{{$ma->template_id}}" class="form-control">
                                        @else
                                        {!! Form::text('templates[2][template_id]',null,['class' => 'form-control']) !!}
                                        @endif
                                    </td>
                                    <td>
                                        <input type="checkbox" name="templates[2][template_status]" value="Y" @php if(isset($ma->status)) if($ma->status == "Y") echo "checked"; @endphp>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        @php $sr = \App\SchoolSmsTemplate::where('idSchool','=',$school->idSchool)->where('template_name','=','school_reached')->first(); @endphp
                                        @if(!empty($sr)) <input type="hidden" name="templates[3][idSmsTemplate]" value="{{$sr->idSmsTemplate}}">@endif
                                        School Reached
                                        <input type="hidden" name="templates[3][template_name]" value="school_reached">
                                    </td>
                                    <td>
                                        @if(!empty($sr)) 
                                        <input type="text" name="templates[3][template_id]" value="{{$sr->template_id}}" class="form-control">
                                        @else
                                        {!! Form::text('templates[3][template_id]',null,['class' => 'form-control']) !!}
                                        @endif
                                    </td>
                                    <td>
                                        <input type="checkbox" name="templates[3][template_status]" value="Y" @php if(isset($sr->status)) if($sr->status == "Y") echo "checked"; @endphp>
                                    </td>
                                </tr>
                                <tr>
                                        <td>
                                            @php $sl = \App\SchoolSmsTemplate::where('idSchool','=',$school->idSchool)->where('template_name','=','school_left')->first(); @endphp
                                            @if(!empty($sl)) <input type="hidden" name="templates[4][idSmsTemplate]" value="{{$sl->idSmsTemplate}}">@endif
                                            School Left
                                            <input type="hidden" name="templates[4][template_name]" value="school_left">
                                        </td>
                                        <td>
                                            @if(!empty($sl)) 
                                            <input type="text" name="templates[4][template_id]" value="{{$sl->template_id}}" class="form-control">
                                            @else
                                            {!! Form::text('templates[4][template_id]',null,['class' => 'form-control']) !!}
                                            @endif
                                        </td>
                                        <td>
                                            <input type="checkbox" name="templates[4][template_status]" value="Y" @php if(isset($sl->status)) if($sl->status == "Y") echo "checked"; @endphp>
                                        </td>
                                </tr>
                                <tr>
                                        <td>
                                            @php $mv = \App\SchoolSmsTemplate::where('idSchool','=',$school->idSchool)->where('template_name','=','mobile_verify_otp')->first(); @endphp
                                            @if(!empty($mv)) <input type="hidden" name="templates[5][idSmsTemplate]" value="{{$mv->idSmsTemplate}}">@endif
                                            Mobile No. Verification
                                            <input type="hidden" name="templates[5][template_name]" value="mobile_verify_otp">
                                        </td>
                                        <td>
                                            @if(!empty($mv))
                                            <input type="text" name="templates[5][template_id]" value="{{$mv->template_id}}" class="form-control">
                                            @else
                                            {!! Form::text('templates[5][template_id]',null,['class' => 'form-control']) !!}
                                            @endif
                                        </td>
                                        <td>
                                            <input type="checkbox" name="templates[5][template_status]" value="Y" @php if(isset($mv->status)) if($mv->status == "Y") echo "checked"; @endphp>
                                        </td>
                                </tr>
                                <tr>
                                        <td>
                                            @php $visitor = \App\SchoolSmsTemplate::where('idSchool','=',$school->idSchool)->where('template_name','=','visitor')->first(); @endphp
                                            @if(!empty($visitor))<input type="hidden" name="templates[6][idSmsTemplate]" value="{{$visitor->idSmsTemplate}}">@endif
                                            Visitor
                                            <input type="hidden" name="templates[6][template_name]" value="visitor">
                                        </td>
                                        <td>
                                            @if(!empty($visitor))
                                            <input type="text" name="templates[6][template_id]" value="{{$visitor->template_id}}" class="form-control">
                                            @else
                                            {!! Form::text('templates[6][template_id]',null,['class' => 'form-control']) !!}
                                            @endif
                                        </td>
                                        <td>
                                            <input type="checkbox" name="templates[6][template_status]" value="Y" @php if(isset($visitor->status)) if($visitor->status == "Y") echo "checked"; @endphp>
                                        </td>
                                </tr>
                                <tr>
                                    <td>
                                        @php $fp = \App\SchoolSmsTemplate::where('idSchool','=',$school->idSchool)->where('template_name','=','forgot_password')->first(); @endphp
                                        @if(!empty($fp))<input type="hidden" name="templates[7][idSmsTemplate]" value="{{$fp->idSmsTemplate}}">@endif
                                        Forgot Password
                                        <input type="hidden" name="templates[7][template_name]" value="forgot_password">
                                    </td>
                                    <td>
                                        @if(!empty($fp))
                                        <input type="text" name="templates[7][template_id]" value="{{$fp->template_id}}" class="form-control">
                                        @else
                                        {!! Form::text('templates[7][template_id]',null,['class' => 'form-control']) !!}
                                        @endif
                                    </td>
                                    <td>
                                        <input type="checkbox" name="templates[7][template_status]" value="Y" @php if(isset($fp->status)) if($fp->status == "Y") echo "checked"; @endphp>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        @php $emp_att = \App\SchoolSmsTemplate::where('idSchool','=',$school->idSchool)->where('template_name','=','emp_attendance')->first(); @endphp
                                        @if(!empty($emp_att))<input type="hidden" name="templates[8][idSmsTemplate]" value="{{$emp_att->idSmsTemplate}}">@endif
                                        Employee Attendance Reached
                                        <input type="hidden" name="templates[8][template_name]" value="emp_attendance">
                                    </td>
                                    <td>
                                        @if(!empty($emp_att))
                                        <input type="text" name="templates[8][template_id]" value="{{$emp_att->template_id}}" class="form-control">
                                        @else
                                        {!! Form::text('templates[8][template_id]',null,['class' => 'form-control']) !!}
                                        @endif
                                    </td>
                                    <td>
                                        <input type="checkbox" name="templates[8][template_status]" value="Y" @php if(isset($emp_att->status)) if($emp_att->status == "Y") echo "checked"; @endphp>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        @php $emp_att = \App\SchoolSmsTemplate::where('idSchool','=',$school->idSchool)->where('template_name','=','emp_attendance_left')->first(); @endphp
                                        @if(!empty($emp_att))<input type="hidden" name="templates[9][idSmsTemplate]" value="{{$emp_att->idSmsTemplate}}">@endif
                                        Employee Attendance Left
                                        <input type="hidden" name="templates[9][template_name]" value="emp_attendance_left">
                                    </td>
                                    <td>
                                        @if(!empty($emp_att))
                                        <input type="text" name="templates[9][template_id]" value="{{$emp_att->template_id}}" class="form-control">
                                        @else
                                        {!! Form::text('templates[9][template_id]',null,['class' => 'form-control']) !!}
                                        @endif
                                    </td>
                                    <td>
                                        <input type="checkbox" name="templates[9][template_status]" value="Y" @php if(isset($emp_att->status)) if($emp_att->status == "Y") echo "checked"; @endphp>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            @else 
                            <table class="table table-bordered">
                                <thead>
                                    <tr>
                                        <th>Template Name</th>
                                        <th>Template ID</th>
                                        <th></th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>
                                            Manual Attendance Present
                                            <input type="hidden" name="templates[1][template_name]" value="manual_present">
                                        </td>
                                        <td>{!! Form::text('templates[1][template_id]',null,['class' => 'form-control']) !!}</td>
                                        <td>
                                        <input type="checkbox" name="templates[1][template_status]" value="Y">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Manual Attendance Absent
                                            <input type="hidden" name="templates[2][template_name]" value="manual_absent">
                                        </td>
                                        <td>
                                            {!! Form::text('templates[2][template_id]',null,['class' => 'form-control']) !!}
                                        </td>
                                        <td>
                                        <input type="checkbox" name="templates[2][template_status]" value="Y">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            School Reached
                                            <input type="hidden" name="templates[3][template_name]" value="school_reached">
                                        </td>
                                        <td>{!! Form::text('templates[3][template_id]',null,['class' => 'form-control']) !!}</td>
                                        <td>
                                        <input type="checkbox" name="templates[3][template_status]" value="Y">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            School Left
                                            <input type="hidden" name="templates[4][template_name]" value="school_left">
                                        </td>
                                        <td>{!! Form::text('templates[4][template_id]',null,['class' => 'form-control']) !!}</td>
                                        <td>
                                        <input type="checkbox" name="templates[4][template_status]" value="Y">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Mobile No. Verification
                                            <input type="hidden" name="templates[5][template_name]" value="mobile_verify_otp">
                                        </td>
                                        <td>{!! Form::text('templates[5][template_id]',null,['class' => 'form-control']) !!}</td>
                                        <td>
                                        <input type="checkbox" name="templates[5][template_status]" value="Y">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Visitor
                                            <input type="hidden" name="templates[6][template_name]" value="visitor">
                                        </td>
                                        <td>{!! Form::text('templates[6][template_id]',null,['class' => 'form-control']) !!}</td>
                                        <td>
                                        <input type="checkbox" name="templates[6][template_status]" value="Y">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Forgot Password
                                            <input type="hidden" name="templates[7][template_name]" value="forgot_password">
                                        </td>
                                        <td>{!! Form::text('templates[7][template_id]',null,['class' => 'form-control']) !!}</td>
                                        <td>
                                        <input type="checkbox" name="templates[7][template_status]" value="Y">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Employee Attendance Reached
                                            <input type="hidden" name="templates[8][template_name]" value="emp_attendance">
                                        </td>
                                        <td>{!! Form::text('templates[8][template_id]',null,['class' => 'form-control']) !!}</td>
                                        <td>
                                        <input type="checkbox" name="templates[8][template_status]" value="Y">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Employee Attendance Left
                                            <input type="hidden" name="templates[9][template_name]" value="emp_attendance_left">
                                        </td>
                                        <td>{!! Form::text('templates[9][template_id]',null,['class' => 'form-control']) !!}</td>
                                        <td>
                                        <input type="checkbox" name="templates[9][template_status]" value="Y">
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            @endif
                        </div>
                        <div class="col-sm-1"></div>
                    </div>
                </fieldset> 
                <fieldset>
                     <legend style="color: #6572b8;font-weight: bold;">Attendance Device ID</legend>
                    <div class="row clearfix">
                        <div class="col-sm-2 form-control-label required">
                            <label for="classname">Device ID(Attendance)</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('Device_ID',null,['class' => 'form-control']) !!}
                                @if ($errors->has('Device_ID'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('Device_ID') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                    </div>
                </fieldset>
                <fieldset>
                    <legend style="color: #6572b8;font-weight: bold;">GPS Integration data</legend>
                    <div class="row clearfix">
                        <div class="col-sm-2 form-control-label">
                            <label for="classname">Gps Link</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('gpsLink',null,['class' => 'form-control']) !!}
                                @if ($errors->has('gpsLink'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('gpsLink') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                        <div class="col-sm-2 form-control-label">
                            <label for="classname">Gps User Id</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('userId',null,['class' => 'form-control','maxlength'=>'6']) !!}
                                @if ($errors->has('userId'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('userId') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                    </div>
                    <div class="row  clearfix">
                        <div class="col-sm-2 form-control-label">
                            <label for="classname">Gps Password</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('gpsPassword',null,['class' => 'form-control']) !!}
                                @if ($errors->has('gpsPassword'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('gpsPassword') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                    </div>
                    <div class="row  clearfix">
                        <div class="col-sm-2 form-control-label">
                            <label for="classname">API Token</label>
                        </div>
                        <div class="col-sm-3">
                            <div class="form-group">
                                {!! Form::text('api_token',null,['class' => 'form-control']) !!}
                                @if ($errors->has('api_token'))
                                <label id="minmaxlength-error" class="error" for="minmaxlength">
                                    <strong>{{ $errors->first('api_token') }}</strong>
                                </label>
                                @endif
                            </div>
                        </div>
                    </div>
                </fieldset>
                <fieldset>
                    <legend style="color: #6572b8;font-weight: bold;">Payment Link Registration</legend>
                    <div class="col-sm-3 form-control-label required">
                        <label for="classname">Registration Fee Payment Link</label>
                    </div>
                    <div class="col-sm-4">
                        <div class="form-group">
                            {!! Form::text('regPaymentLink',null,['class' => 'form-control']) !!}
                            @if ($errors->has('regPaymentLink'))
                            <label id="minmaxlength-error" class="error" for="minmaxlength">
                                <strong>{{ $errors->first('regPaymentLink') }}</strong>
                            </label>
                            @endif
                        </div>
                    </div>
                </fieldset>
                <fieldset>
                    <legend style="color: #6572b8;font-weight: bold;">App Fee Collection</legend>
                    <div class="col-sm-3 form-control-label">
                        <label for="classname">Amount</label>
                    </div>
                    <div class="col-sm-4">
                        <div class="form-group">
                            {!! Form::number('appFee',null,['class' => 'form-control' , 'step'=>'any']) !!}
                            @if ($errors->has('appFee'))
                            <label id="minmaxlength-error" class="error" for="minmaxlength">
                                <strong>{{ $errors->first('appFee') }}</strong>
                            </label>
                            @endif
                        </div>
                    </div>
                </fieldset>
                <div class="row clearfix">
                    <div class="col-sm-8 offset-sm-2">
                        @if(isset($school))
                        {!! Form::submit('UPDATE',['class' => 'btn btn-raised btn-primary btn-round waves-effect']) !!}
                        @else
                        {!! Form::submit('SAVE',['class' => 'btn btn-raised btn-primary btn-round waves-effect']) !!}
                        @endif
                        {!! Form::close() !!} 
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
@stop
@section('script')
<script>
function updateStates(item){
    var country = item.value;
    if(country == 1){
        $('#states').empty(); 
        @foreach(states() as $key => $value)
        $('#states').append('<option value="{{$key}}">{{$value}}</option>')
        @endforeach
    }else if(country == 2){
        $('#states').empty(); 
        @foreach(statesQatar() as $key => $value)
        $('#states').append('<option value="{{$key}}">{{$value}}</option>')
        @endforeach
    }
    console.log(country);
}

function PreviewImage() {
    var oFReader = new FileReader();
    oFReader.readAsDataURL(document.getElementById("image").files[0]);
    oFReader.onload = function (oFREvent) {
        document.getElementById("uploadPreview").src = oFREvent.target.result;
    };
}     
</script>
@stop

Copyright © 2021 - 2025 IMMREX7