@extends('backend.layouts.master') @section('pageTitle') Student @endsection @section('bodyCssClass') @endsection @section('pageContent')

Student @if($regiInfo) Update @else Add New @endif

Note: Create a class and section before create new student. And subject if student have elective subject.

@csrf @if($regiInfo) {{ method_field('PATCH') }} @endif

Student Info:

{{ $errors->first('name') }}
{{ $errors->first('nick_name') }}
{{ $errors->first('dob') }}
@php $param = ['class' => 'form-control select2', 'placeholder' => 'select an option', 'required' => 'true']; if($gender) { $param['readonly'] = 'true'; } @endphp {!! Form::select('gender', AppHelper::GENDER, $gender , $param) !!} {{ $errors->first('gender') }}
{!! Form::select('religion', AppHelper::RELIGION, $religion , ['class' => 'form-control select2', 'placeholder' => 'select an option', 'required' => 'true']) !!} {{ $errors->first('religion') }}
{!! Form::select('blood_group', AppHelper::BLOOD_GROUP, $bloodGroup , ['class' => 'form-control select2', 'placeholder' => 'select an option']) !!} {{ $errors->first('blood_group') }}
{!! Form::select('nationality', ['Bangladeshi' => 'Bangladeshi', 'Other' => 'Other'], $nationality , ['class' => 'form-control', 'required' => 'true']) !!} {{ $errors->first('nationality') }}
nationality == "Bangladeshi") readonly @endif placeholder="Nationality" value="@if($student && $student->nationality != "Bangladeshi"){{$student->nationality}}@else{{old('nationality')}}@endif" maxlength="50" > {{ $errors->first('nationality_other') }}
@if($student && isset($student->photo)) @endif {{ $errors->first('photo') }}
{{ $errors->first('email') }}
{{ $errors->first('phone_no') }}
{{ $errors->first('extra_activity') }}
{{ $errors->first('note') }}

Guardian Info:

{{ $errors->first('father_name') }}
{{ $errors->first('father_phone_no') }}
{{ $errors->first('mother_name') }}
{{ $errors->first('mother_phone_no') }}
{{ $errors->first('guardian') }}
{{ $errors->first('guardian_phone_no') }}
{{ $errors->first('present_address') }}
{{ $errors->first('permanent_address') }}

Academic Info:

{{ $errors->first('regi_no') }}
@if(AppHelper::getInstituteCategory() == 'college')
@if($regiInfo)
Year can't be change. @else {!! Form::select('academic_year', $academic_years, $acYear, ['placeholder' => 'Pick a year...','class' => 'form-control select2', 'required' => 'true']) !!} {{ $errors->first('academic_year') }} @endif
@endif
@if($regiInfo)
Class can't be change. @else {!! Form::select('class_id', $classes, $iclass , ['id' => 'student_add_edit_class_change', 'placeholder' => 'Pick a class...','class' => 'form-control select2', 'required' => 'true']) !!} {{ $errors->first('class_id') }} @endif
{!! Form::select('section_id', $sections, $section , ['placeholder' => 'Pick a section...', 'id' => 'checkStudentCapacity', 'class' => 'form-control select2', 'required' => 'true']) !!} {{ $errors->first('section_id') }}
{!! Form::select('shift', ['Morning' => 'Morning', 'Day' => 'Day', 'Evening' => 'Evening' ], $shift , ['placeholder' => 'Pick a shift...','class' => 'form-control select2', 'required' => 'true']) !!} {{ $errors->first('shift') }}
{{ $errors->first('card_no') }}
{{ $errors->first('roll_no') }}
{{ $errors->first('board_regi_no') }}
@php $sms_no = 0; if($student){ $sms_no = $student->sms_receive_no; } @endphp {!! Form::select('sms_receive_no', AppHelper::STUDENT_SMS_NOTIFICATION_NO, $sms_no , ['class' => 'form-control', 'required' => 'true']) !!} {{ $errors->first('sms_receive_no') }}
{{ $errors->first('siblings') }}
@if(count($houseList))
@php $house = ' '; if($regiInfo){ $house = $regiInfo->house; } @endphp {!! Form::select('house', $houseList, $house , ['class' => 'form-control']) !!} {{ $errors->first('house') }}
@endif

Subject Info:

{!! Form::select('core_subjects[]', $coreSubjects, $csubjects , ['multiple' => 'true', 'readonly' => 'true', 'class' => 'form-control select2', 'required' => 'true']) !!} {{ $errors->first('core_subjects') }}
have_selective_subject) style="display: none;" @endif>
@php $params = ['multiple' => 'true', 'class' => 'form-control select2', 'placeholder' => 'select subjects', 'data-placeholder' => 'select subjects']; if($classInfo && $classInfo->have_selective_subject){ $params['data-max'] = $classInfo->max_selective_subject; } @endphp {!! Form::select('selective_subjects[]', $selectiveSubjects, $ssubjects , $params) !!} {{ $errors->first('selective_subjects') }}
have_elective_subject) style="display: none;" @endif>
{!! Form::select('fourth_subject', $electiveSubjects, $esubject , ['data-placeholder' => 'select a subject', 'data-allow-clear' => 'true', 'placeholder' => 'select a subject', 'class' => 'form-control select2']) !!} {{ $errors->first('fourth_subject') }}

Access Info:

@if(!$student)
{{ $errors->first('username') }}
{{ $errors->first('password') }}
@endif @if($student && !$student->user_id)
{!! Form::select('user_id', $users, null , ['placeholder' => 'Pick if needed','class' => 'form-control select2']) !!} {{ $errors->first('user_id') }}
@endif
@endsection @section('extraScript') @endsection