@extends('layouts.master') @section('navigation') @include('local.managers.pCoords._navigation') @stop @section('main')
Create
{{ Form::open(array('action' => 'Objective2Controller@create' )) }}
{{ Form::label('program_id', 'Associated Program') }}


{{ Form::label('text', 'Text') }} {{ Form::text('text', '', array('class' => 'form-control')) }}
{{ Form::submit('Create', array('class' => 'btn btn-primary btn-block')) }} {{ Form::close() }}
Edit
{{ Form::open(array('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') }}


{{ Form::label('status', 'Status') }}
{{ Form::label('text', 'Text') }} {{ Form::text('text', Input::old('text'), array('class' => 'form-control', 'id'=>'objective-text')) }}
{{ Form::submit('Update', array('class' => 'btn btn-primary btn-block', 'id' => 'update_button')) }} {{ 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