@extends('layouts.master') @section('navigation') @include('local.managers.admins._navigation') @stop @section('main')
Create
{{ Form::open(array('action' => 'CriteriaController@create')) }}
{{ Form::label('outcome_id', 'Associated Learning Outcome') }}
{{ Form::label('program_id', 'Associated Program') }}
{{ Form::label('name', 'Name') }} {{ Form::text('name', '', array('class' => 'form-control')) }}
{{ Form::label('subcriteria', 'Subcriteria') }}

Manually add bullets or numbering.

{{ Form::textarea('subcriteria', '', array('class' => 'form-control', 'rows'=>3, 'aria-labelledby'=>'subcriteria')) }}
{{ Form::label('description12', 'Beginning (1-2)') }} {{ Form::textarea('description12', '', array('class' => 'form-control', 'rows'=>2, 'aria-labelledby'=>'description12')) }}
{{ Form::label('description34', 'In Progress (3-4)') }} {{ Form::textarea('description34', '', array('class' => 'form-control', 'rows'=>2, 'aria-labelledby'=>'description34')) }}
{{ Form::label('description56', 'Satisfactory (5-6)') }} {{ Form::textarea('description56', '', array('class' => 'form-control', 'rows'=>2, 'aria-labelledby'=>'description56')) }}
{{ Form::label('description78', 'Excellent (7-8)') }} {{ Form::textarea('description78', '', array('class' => 'form-control', 'rows'=>2, 'aria-labelledby'=>'description78')) }}
{{ Form::label('copyright', 'Copyright') }} {{ Form::textarea('copyright', '', array('class' => 'form-control', 'rows'=>2, 'placeholder'=>'(optional)', 'aria-labelledby'=>'copyright')) }}
{{ Form::label('notes', 'Notes') }} {{ Form::textarea('notes', '', array('class' => 'form-control', 'rows'=>2, 'placeholder'=>'(optional)', 'aria-labelledby'=>'notes')) }}
{{ Form::submit('Create', array('class' => 'btn btn-primary btn-block')) }} {{ Form::close() }}
Edit
{{ Form::open(array('action' => 'CriteriaController@update')) }}
{{ Form::label('criterion_id', 'Criterion') }}
{{ Form::label('assoc_outcome_id', 'Associated Learning Outcome') }}
{{ Form::label('program_id2', 'Associated Program') }}
{{ Form::label('status', 'Status') }}
{{ Form::label('name', 'Name') }} {{ Form::text('name', Input::old('name'), array('class' => 'form-control', 'id'=>'criterion_name')) }}
{{ Form::label('subcriteria', 'Subcriteria') }}

Manually add bullets or numbering.

{{ Form::textarea('subcriteria', '', array('class' => 'form-control', 'rows'=>3, 'id' => 'criterion_subcriteria')) }}
{{ Form::label('description12', 'Beginning (1-2)') }} {{ Form::textarea('description12', Input::old('description12'), array('class' => 'form-control', 'rows'=>2, 'id'=>'criterion_description12')) }}
{{ Form::label('description34', 'In Progress (3-4)') }} {{ Form::textarea('description34', Input::old('description34'), array('class' => 'form-control', 'rows'=>2, 'id'=>'criterion_description34')) }}
{{ Form::label('description56', 'Satisfactory (5-6)') }} {{ Form::textarea('description56', Input::old('description56'), array('class' => 'form-control', 'rows'=>2, 'id'=>'criterion_description56')) }}
{{ Form::label('description78', 'Excellent (7-8)') }} {{ Form::textarea('description78', Input::old('description78'), array('class' => 'form-control', 'rows'=>2, 'id'=>'criterion_description78')) }}
{{ Form::label('copyright', 'Copyright Information') }} {{ Form::textarea('copyright', Input::old('copyright'), array('class' => 'form-control', 'rows'=>2, 'id'=>'criterion_copyright', 'placeholder'=>'(optional)')) }}
{{ Form::label('notes', 'Additional Notes') }} {{ Form::textarea('notes', Input::old('notes'), array('class' => 'form-control', 'rows'=>2, 'id'=>'criterion_notes', 'placeholder'=>'(optional)')) }}
{{ Form::submit('Update', array('class' => 'btn btn-primary btn-block')) }} {{ Form::close() }}
@stop @section('javascript') // -------------------------------------------------------------------------- // Page load // -------------------------------------------------------------------------- // Hide accordion panel contents by default $('.panel-group .panel-body').hide(); $('#outcome-display').parent().hide(); fetchCriterionForEditing(); // setCriterionStatus(); // -------------------------------------------------------------------------- // Functions // -------------------------------------------------------------------------- // Fetch criterion info for editing function fetchCriterionForEditing() { var id = $('#select-criterion').find(':selected').val(); $.post( "{{ URL::action('CriteriaController@fetchCriterionWithTrashed') }}", { id: id }, function(json) { var name = json.name; var subcriteria = ''; if(json.subcriteria){ subcriteria= JSON.parse(json.subcriteria).join('\n'); } var description12 = json.description12; var description34 = json.description34; var description56 = json.description56; var description78 = json.description78; var copyright = json.copyright; var notes = json.notes; // Display info $('#criterion_name').val(name); $('#criterion_subcriteria').text(subcriteria); $('#criterion_description12').text(description12); $('#criterion_description34').text(description34); $('#criterion_description56').text(description56); $('#criterion_description78').text(description78); // If copyright or notes aren't empty, load them if(copyright){ $('#criterion_copyright').text(copyright); }else{ $('#criterion_copyright').text(''); } if(notes){ $('#criterion_notes').text(notes); }else{ $('#criterion_notes').text(''); } // Select associated outcome $('#assoc_outcome_id').val(json.outcome_id); $('#assoc_outcome_id').selectpicker('refresh'); // Select associated program if(json.program_id) { $('#program_id2').val(json.program_id); } else { $('#program_id2').val(0); } $('#program_id2').selectpicker('refresh'); // Select status if(json.deleted_at) $('#status').val(0); else $('#status').val(1); }, 'json' ); } // -------------------------------------------------------------------------- // 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-criterion').on('change', function() { fetchCriterionForEditing(); $('.selectpicker').selectpicker('refresh'); }); // When list item is clicked, load corresponding info $('.selectpicker').on('change', function() { //alert($(this).find(':selected').val()); $('.selectpicker').selectpicker('refresh'); }); @stop