@extends('layouts.master') @section('navigation') @include('local.managers.pCoords._navigation') @stop @section('main')
Create
{{ Form::open(array('action' => 'CriteriaController@create', 'id'=> 'create_criterion')) }}
{{ Form::select('outcome[]', $outcomes, reset($outcomes), ['class'=>'form-control selectpicker', 'id' =>'outcome0', 'onchange'=>'fetchObjectiveForSelect("outcome0", "objectiveGroupFor0")']) }}


{{ 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('maximum_score', 'Maximum Score') }} {{ Form::text('maximum_score', '1', array('class' => 'form-control', 'id'=>'maximum_score', 'oninput'=>'addOptions("Num_scale", "maximum_score", "Scales")')) }}
{{ Form::label('scales', 'Number of Scales') }}
{{ 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', 'id'=>'create_the_criterion')) }} {{ Form::close() }}
Edit
{{ Form::open(array('action' => 'CriteriaController@update', 'id'=>'update_criterion')) }}
{{ Form::label('program_id2', 'Associated Program')}}
{{ Form::select('assoc_outcome_fetch', $outcomes, null, ['class'=>'form-control selectpicker', 'id'=>'assoc_outcomes_fetch', 'onchange'=>'fetchAllCriterion("select-program", "assoc_outcomes_fetch")']) }}

{{ Form::label('criterion_id', 'Criterion') }}
{{ Form::select('outcome[]', $outcomes, null, ['class'=>'form-control selectpicker', 'id'=>'assoc_outcome_0', 'onchange'=>'fetchAssocObjective("assoc_outcome_0")']) }}

{{ 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('maximum_score', 'Maximum Score') }} {{ Form::text('maximum_score', '', array('class' => 'form-control', 'id'=>'assoc_maximum_score', 'oninput'=>'addOptions("Num_assoc_scale", "assoc_maximum_score", "Assoc_Scales")')) }}
{{ Form::label('scales', 'Number of Scales') }}
{{ 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', 'id'=>'update_the_criterion')) }} {{ Form::close() }} {{ Form::open(array('action' => 'CriteriaController@delete')) }} {{Form::submit("Delete", array('class'=> 'btn btn-primary btn-block', 'id'=>"DeleteButton"))}}
@stop @section('javascript') // -------------------------------------------------------------------------- // Page load // -------------------------------------------------------------------------- // Hide accordion panel contents by default $('.panel-group .panel-body').hide(); $('#outcome-display').parent().hide(); fetchCriterionForEditing(); fetchObjectiveForSelect('outcome0', 'objectiveGroupFor0'); // setCriterionStatus(); fetchAllCriterion("select-program", "assoc_outcomes_fetch"); // -------------------------------------------------------------------------- // Functions // -------------------------------------------------------------------------- $('#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; }); $('.filterButton').on('click', function(e) { // Prevent the default action of the clicked item. In this case that is submit e.preventDefault(); return false; }); $('.button-add-objective-assoc').on('click', function(e) { // Prevent the default action of the clicked item. In this case that is submit e.preventDefault(); return false; }); $('#button-add-outcome-assoc').on('click', function(e) { // Prevent the default action of the clicked item. In this case that is submit e.preventDefault(); return false; }); $('.button-add-objective').on('click', function(e) { // Prevent the default action of the clicked item. In this case that is submit e.preventDefault(); return false; }); // Fetch criterion info for editing // -------------------------------------------------------------------------- // Events // -------------------------------------------------------------------------- // When panel heading is clicked, toggle it $('.panel-group .panel-heading').on('click', function() { $(this).next().stop().slideToggle(); }) //$('#outcome[0]').on('change', function(){ //$('.selectpicker').selectpicker('refresh'); //}) // When list item is clicked, load corresponding info // When list item is clicked, load corresponding info $('.selectpicker').on('change', function() { //alert($(this).find(':selected').val()); $('.selectpicker').selectpicker('refresh'); }); @stop