@extends('layouts.master') @section('navigation') @if (Auth::user()->role == 1) @include('local.managers.admins._navigation') @elseif(Auth::user()->role == 2) @include('local.managers.sCoords._new_navigation') @elseif(Auth::user()->role == 3) @include('local.managers.pCoords._new_navigation') @endif @stop @section('main')
Create
{{ Form::open(['action' => 'Objective2Controller@create']) }}
{{ Form::label('program_id', 'Associated Program') }}

@foreach ($programs as $program)
@endforeach
{{ Form::label('text', 'Text') }} {{ Form::text('text', '', ['class' => 'form-control']) }}
{{ Form::submit('Create', ['class' => 'btn btn-primary btn-block', 'id' => 'createObjectiveButton']) }} {{ Form::close() }}
Edit
{{ Form::open(['action' => 'Objective2Controller@update']) }}
{{ Form::label('program_id2', 'Associated Program') }}
{{-- Form::select('assoc_outcome_fetch', $outcomes, null, ['class'=>'form-control selectpicker', 'id'=>'assoc_outcomes_fetch', 'onchange'=>'fetchAllObjectives("select-program", "assoc_outcomes_fetch")']) --}}

{{ Form::label('objective_id', 'Objectives') }}


{{ Form::label('program_id', 'Associated Program') }}

@foreach ($programs as $program)
@endforeach
{{ Form::label('status', 'Status') }}
{{ Form::label('text', 'Text') }} {{ Form::text('text', Input::old('text'), ['class' => 'form-control', 'id' => 'objective-text']) }}
{{ Form::submit('Update', ['class' => 'btn btn-primary btn-block', 'id' => 'update_button_to_modal']) }} {{ Form::close() }}
@stop @section('javascript') // -------------------------------------------------------------------------- // Page load // -------------------------------------------------------------------------- // Hide accordion panel contents by default $('.panel-group .panel-body').hide(); $('#outcome-display').parent().hide(); // fetchObjectiveForEditing(); // setCriterionStatus(); fetchAllObjectives("select-program", "assoc_outcomes_fetch") // -------------------------------------------------------------------------- // Functions // -------------------------------------------------------------------------- // Fetch criterion info for editing $('#button-add-outcome').on('click', function(e) { // Prevent the default action of the clicked item. In this case that is submit e.preventDefault(); return false; }); $('#button-add-assoc-outcome').on('click', function(e) { // Prevent the default action of the clicked item. In this case that is submit e.preventDefault(); return false; }); // -------------------------------------------------------------------------- // Events // -------------------------------------------------------------------------- // When panel heading is clicked, toggle it $('.panel-group .panel-heading').on('click', function() { $(this).next().stop().slideToggle(); }) // When list item is clicked, load corresponding info $('#select-objective').on('change', function() { fetchObjectiveForEditing(); $('.selectpicker').selectpicker('refresh'); }); // When list item is clicked, load corresponding info $('.selectpicker').on('change', function() { //alert($(this).find(':selected').val()); $('.selectpicker').selectpicker('refresh'); }); @stop