123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346 |
- @extends('admin.layout.index')
- @push('css-head')
- @endpush
- @section('content')
- <!-- Page header -->
- <div class="page-header page-header-light">
- <div class="breadcrumb-line breadcrumb-line-light header-elements-md-inline">
- <div class="d-flex">
- <div class="breadcrumb">
- <a href="{{url('/admin')}}" class="breadcrumb-item"><i class="icon-home2 mr-2"></i> Dashboard</a>
- <a href="{{url('/admin/courses')}}" class="breadcrumb-item"> Courses</a>
- <span class="breadcrumb-item active">Create New</span>
- </div>
- </div>
- </div>
- </div>
- <!-- /page header -->
- <!-- Content area -->
- <div class="content">
- <div class="card">
- <div class="card-body">
- @if (count($errors) > 0)
- <div class="alert alert-danger alert-no-border alert-txt-colored alert-close alert-dismissible fade show" role="alert">
- <button type="button" class="close" data-dismiss="alert" aria-label="Close">
- <span aria-hidden="true">×</span>
- </button>
- <strong>Whoops!</strong> There were some problems with your input.
- <ul>
- @foreach ($errors->all() as $error)
- <li>{{ $error }}</li>
- @endforeach
- </ul>
- </div>
- @endif
- {!!Form::open(array('url'=>'admin/courses/store','method'=>'POST'))!!}
- <div class="row">
- <div class="col-md-4">
- <div class="form-group">
- <label>Destination:</label>
- <select class="form-control destination" name="destination_id" required="">
- <option disabled="" selected="" value="">Choose One..</option>
- @foreach($destinations as $row)
- <option value="{{$row['id']}}::{{$row['name']}}">{{$row['name']}}</option>
- @endforeach
- </select>
- </div>
- </div>
- <div class="col-md-8" id="instituteDiv">
- <div class="form-group">
- <label>Institute:</label>
- <select class="form-control select2 institute" name="institute_id" required="">
- <option disabled="" selected="" value="">Choose One..</option>
- </select>
- </div>
- </div>
- <div class="col-md-4 d-none" id="campusDiv">
- <div class="form-group">
- <label>Campus:</label>
- <select class="form-control campus select2" multiple name="campuses[]">
- <option disabled="">Choose One..</option>
- </select>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-md-4">
- <div class="form-group">
- <label>Course Level:</label>
- <select class="form-control level" name="level_id" required="">
- <option disabled="" selected="" value="">Choose One..</option>
- </select>
- </div>
- </div>
- <div class="col-md-4">
- <div class="form-group">
- <label>Department:</label>
- <input type="text" class="form-control" name="department" id="department" required="">
- </div>
- </div>
- <div class="col-md-4">
- <div class="form-group">
- <label>Intake:</label>
- <select class="form-control select2 intake" multiple name="intakes[]" >
- <option disabled="">Choose One..</option>
- </select>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-md-4">
- <div class="form-group">
- <label>Course Name:</label>
- <input type="text" class="form-control" name="courseName" id="courseName" required="">
- </div>
- </div>
- <div class="col-md-4">
- <div class="form-group">
- <label>Course Length (month):</label>
- <input type="number" class="form-control" name="courseLength" id="courseLength" required="">
- </div>
- </div>
- <div class="col-md-4">
- <div class="form-group">
- <label>Tution Fee:</label>
- <input type="number" class="form-control" name="tutionFee" id="tutionFee" required="">
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-md-3">
- <div class="form-group">
- <label>IELTS:</label>
- <input type="text" class="form-control" name="ielts" id="ielts">
- </div>
- </div>
- <div class="col-md-3">
- <div class="form-group">
- <label>TOEFL:</label>
- <input type="text" class="form-control" name="toefl" id="toefl">
- </div>
- </div>
- <div class="col-md-3">
- <div class="form-group">
- <label>Duolingo:</label>
- <input type="text" class="form-control" name="duolingo" id="duolingo">
- </div>
- </div>
- <div class="col-md-3">
- <div class="form-group">
- <label>PTE:</label>
- <input type="text" class="form-control" name="pte" id="pte">
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-md-3">
- <div class="form-group">
- <label>Scolarship:</label>
- <input type="text" class="form-control" name="scholarship" id="scholarship">
- </div>
- </div>
- <div class="col-md-3">
- <div class="form-group">
- <label>Deposit Required:</label>
- <input type="text" class="form-control" name="depositRequired" id="depositRequired" >
- {{-- <div class="input-group">
- <input type="number" min="0" max="100" class="form-control" name="depositRequired" id="depositRequired" >
- <span class="input-group-addon mt-2">%</span>
- </div> --}}
- </div>
- </div>
- <div class="col-md-3">
- <div class="form-group">
- <label>SOP:</label>
- <select class="form-control" name="sop" required="">
- <option value="0">No</option>
- <option selected="" value="1">Yes</option>
- </select>
- </div>
- </div>
- <div class="col-md-3">
- <div class="form-group">
- <label>CV:</label>
- <select class="form-control" name="cv" required="">
- <option value="0">No</option>
- <option selected="" value="1">Yes</option>
- </select>
- </div>
- </div>
- {{-- <div class="col-md-3">
- <div class="form-group">
- <label>UCAS Fee:</label>
- <select class="form-control" name="ucasFee" required="">
- <option selected="" value="0">No</option>
- <option value="1">Yes</option>
- </select>
- </div>
- </div> --}}
- </div>
- <div class="row">
- {{-- <div class="col-md-3">
- <div class="form-group">
- <label>Minimum GPA:</label>
- <input type="number" step=".1" min="0" max="9" class="form-control" name="minGpa" id="minGpa" >
- </div>
- </div> --}}
- <div class="col-md-9">
- <div class="form-group">
- <label>Keywords</label>
- <input type="text" class="form-control tokenfield" name="tags" value="">
- </div>
- </div>
-
- <div class="col-md-3">
- <div class="form-group">
- <label>Reference:</label>
- <select class="form-control" name="reference" required="">
- <option selected="" value="0">N/A</option>
- <option value="1">1</option>
- <option value="2">2</option>
- </select>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <div class="form-group">
- <label>Entry Requirements</label>
- <textarea class="form-control summernote" name="entry_requirement"></textarea>
- </div>
- </div>
- </div>
- <div class="text-right">
- <a href="{{ url('admin/courses/create') }}" class="btn btn-secondary pull-left">
- Refresh
- <i class="icon-reload-alt ml-2"></i>
- </a>
- <button type="submit" class="btn btn-primary">Submit <i class="icon-paperplane ml-2"></i></button>
- </div>
- {!! Form::close() !!}
- </div>
- </div>
- </div>
- <!-- /content area -->
- @endsection
- @push('scripts')
- <script type="text/javascript" src="{{ asset('assets/global/js/plugins/forms/selects/select2.min.js')}}"></script>
- <script type="text/javascript" src="{{ asset('assets/global/js/plugins/forms/tags/tagsinput.min.js')}}"></script>
- <script type="text/javascript" src="{{ asset('assets/global/js/plugins/forms/tags/tokenfield.min.js')}}"></script>
- <script type="text/javascript" src="{{ asset('assets/global/js/plugins/editors/summernote/summernote.min.js')}}"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- $('.select2').select2();
- $('.tokenfield').tokenfield();
- $('.summernote').summernote();
- });
- $('.destination').on('change', function(){
- var destination = $('.destination option:selected').val();
- var select_tag = $('.institute');
- $.get("{{ route('admin.ajax-get', ['name'=>'sams_institutes']) }}", {
- destination : destination, type : 'all'
- }).done(function(res){
- select_tag.empty().append('<option disabled="" selected="" value="">Choose One..</option>');
-
- res.forEach(function(row){
- select_tag.append(
- $('<option></option>').val(row.institute_id+'::'+row.institute_name).html(row.institute_name)
- );
- });
- });
- $('.institute').empty().append('<option disabled="" selected="" value="">Choose One..</option>');
- $('.level').empty().append('<option disabled="" selected="" value="">Choose One..</option>');
- $('.campus').empty().append('<option disabled="">Choose One..</option>');
- $('.intake').empty().append('<option disabled="">Choose One..</option>');
- });
- $('.institute').on('change', function(){
- var institute = $('.institute option:selected').val();
- var select_tag = $('.level');
- $.get("{{ route('admin.ajax-get', ['name'=>'sams_levels']) }}", {
- institute : institute, group : 0
- }).done(function(res){
- select_tag.empty().append('<option disabled="" selected="" value="">Choose One..</option>');
-
- res.forEach(function(row){
- select_tag.append(
- $('<option></option>').val(row.id+'::'+row.name).html(row.name)
- );
- });
- });
- $.get("{{ route('admin.ajax-get', ['name'=>'sams_campuses']) }}", {
- institute : institute
- }).done(function(campuses){
- var select_tag = $('.campus');
- select_tag.empty().append('<option disabled="">Choose One..</option>');
-
- if(campuses.length > 0){
- campuses.forEach(function(row){
- select_tag.append(
- $('<option></option>').val(row.id+'::'+row.name).html(row.name)
- );
- });
- $('#instituteDiv').removeClass('col-md-8');
- $('#instituteDiv').addClass('col-md-4');
- $('#campusDiv').removeClass('d-none');
- }else{
- $('#instituteDiv').addClass('col-md-8');
- $('#instituteDiv').removeClass('col-md-4');
- $('#campusDiv').addClass('d-none');
- }
- });
- $.get("{{ route('admin.ajax-get', ['name'=>'sams_intakes']) }}", {
- institute : institute
- }).done(function(intakes){
- var select_tag = $('.intake');
- select_tag.empty().append('<option disabled="">Choose One..</option>');
- if(intakes.length > 0){
- intakes.forEach(function(row){
- select_tag.append(
- $('<option></option>').val(row.intake).html(getMonthName(row.intake))
- );
- });
- }else{
- select_tag.empty().append('<option disabled="">Choose One..</option>');
- }
- });
- });
- $('.level').on('change', function(){
- var institute = $('.institute option:selected').val();
- var level = $('.level option:selected').val();
- var select_tag = $('.intake');
- $.get("{{ route('admin.ajax-get', ['name'=>'sams_intakes']) }}", {
- institute : institute, level : level
- }).done(function(intakes){
- select_tag.empty().append('<option disabled="">Choose One..</option>');
- if(intakes.length > 0){
- intakes.forEach(function(row){
- select_tag.append(
- $('<option></option>').val(row.intake).html(getMonthName(row.intake))
- );
- });
- }else{
- select_tag.empty().append('<option disabled="">Choose One..</option>');
- }
- });
- });
- function getMonthName(monthNumber) {
- var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
- return months[monthNumber - 1];
- }
- </script>
- @endpush
|