@extends('layouts.master') @section('navigation') @if($role==2) @include('local.managers.sCoords._navigation') @elseif($role==3) @include('local.managers.pCoords._navigation') @else @include('local.professors._navigation') @endif @stop @section('main')
Create a TA
{{ Form::open(array('action' => 'TransformativeActionsController@createTA')) }}
{{ Form::label('text', 'Name') }} {{ Form::text('text', '', array('class' => 'form-control', 'id' =>'text2')) }}
{{ Form::label('description', 'Description') }} {{ Form::textarea('description', '', array('class' => 'form-control', 'id' =>"description2")) }}


{{ Form::submit('Create', array('class' => 'btn btn-primary btn-block')) }} {{ Form::close() }}
Edit a TA




{{ Form::open(array('action' => 'TransformativeActionsController@updateTA')) }}
{{ Form::label('text', 'Name') }} {{ Form::text('text', '', array('class' => 'form-control')) }}
{{ Form::label('description', 'Description') }} {{ Form::textarea('description', '', array('class' => 'form-control')) }}
{{-- @foreach ($objectives as $id => $text) @endforeach


{{ Form::submit('Update', array('class' => 'btn btn-primary btn-block')) }} {{ Form::close() }} {{ Form::open(array('action' => 'TransformativeActionsController@deleteTA')) }} {{Form::submit("Delete", array('class'=> 'btn btn-primary btn-block', 'id'=>"DeleteButton"))}}
@stop @section('javascript') // -------------------------------------------------------------------------- // Page load // -------------------------------------------------------------------------- $("select[name='type_of_ta']").on('change', function(){ if($(this).val()=="new"){ var new_div = $('
',{ 'class':'form-group new_type' }).html(""); var input = $("", { 'type': 'text', 'name':"new_type", 'class':'form-control' }); new_div.append(input); $(this).parent().parent().after(new_div) } else{ $(this).parent().parent().next('.new_type').remove(); } }) // Hide accordion panel contents by default $('.panel-group .panel-body').hide(); $('#outcome-display').parent().hide(); $('.remove-objective').hide(); $('.remove-course').hide(); ////createPanel // remove TA approval section if the user isnt a program coordinator var dummyApproval = $('#dummyApproval'); dummyApproval.find('select').prop('disabled', 'disabled'); dummyApproval.find('option').remove(); var role = {{Auth::user()['role']}}; if (role != 4){ dummyApproval.find('select').append(''); $('#approvePanel .add-course').hide(); } /* else if (role == 4){ dummyApproval.find('select').append(''); $('#approvePanel').parent().hide(); //hide the select for changin Availability $('#editApproval').find('select').prop('disabled', 'disabled'); //add an input since disabled the form wont recognize it $('#editApproval').append('') // in edit panel, hide the professor filter $('.filterProfessor').parent().hide(); $('.filterProfessor').parent().next().hide(); // hide
}*/ $('.createObjectives').prop('disabled', 'disabled'); $('#createPanel .add-objective').prop('disabled', 'disabled'); ////editPanel // disable the buttons of the edit section if there are no TA for selection if(($('#editSelectTA').val() === "")){ $('#editPanel').find('select').prop('disabled', 'disabled'); $('#editPanel').find('button').prop('disabled', 'disabled'); $('#editPanel').find('input').prop('disabled', 'disabled'); }else{ var ta_id = $('#editSelectTA').val(); if(ta_id != 0){ load_ta_info_for_edit(ta_id); } } ////approvePanel $('#approvePanel .add-objective').hide(); // disable the buttons of the approval section if there are no TA for selection if(($('#approvalSelectTA').val() === "")){ $('#approvePanel').find('select').prop('disabled', 'disabled'); $('#approvePanel').find('button').prop('disabled', 'disabled'); $('#approvePanel').find('input').prop('disabled', 'disabled'); $('#approvalDescription').prop('disabled', 'disabled'); }else{ var ta_id = $('#approvalSelectTA').val(); //if(ta_id != 0){ // load_ta_info_for_approval(ta_id); //} } // $('.filterSection').hide(); // -------------------------------------------------------------------------- // Functions // -------------------------------------------------------------------------- function load_objectives_from_outcome(outcome_id) { $.post( "{{ URL::action('TransformativeActionsController@objectivesFromOutcome') }}", { outcome_id: (outcome_id), }, function(data) { var panel = $('#createPanel'); // var objectives = data.objectives; //delete al current select panel.find('.remove-objective').parent().remove(); //create select var new_div = $('
',{ 'class': 'createObjectives' }); var new_inner_div = $('
',{ 'class': 'form-group col-md-11' }); var new_select = $('',{ 'class': 'form-control editObjectives selectpicker', 'data-live-search': 'true', 'name': 'objectiveid[]' }); var new_button = $('