@extends('layouts.master') @section('navigation') @if (Auth::user()->role == 1) @include('local.managers.admins._new_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' => '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 Program2') }}

@if (count($programs) == 1)
@else @foreach ($programs as $program)
@endforeach @endif
{{ Form::label('name', 'Name') }} {{ Form::text('name', '', ['class' => 'form-control']) }}
{{ Form::label('subcriteria', 'Subcriteria') }}

Manually add bullets or numbering.

{{ Form::textarea('subcriteria', '', ['class' => 'form-control', 'rows' => 3, 'aria-labelledby' => 'subcriteria']) }}
{{ Form::label('maximum_score', 'Maximum Score') }} {{ Form::text('maximum_score', '8', ['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', '', ['class' => 'form-control', 'rows' => 2, 'placeholder' => '(optional)', 'aria-labelledby' => 'copyright']) }}
{{ Form::label('notes', 'Notes') }} {{ Form::textarea('notes', '', ['class' => 'form-control', 'rows' => 2, 'placeholder' => '(optional)', 'aria-labelledby' => 'notes']) }}
{{ Form::submit('Create', ['class' => 'btn btn-primary btn-block', 'id' => 'create_the_criterion_button', 'data-form-id' => 'create_criterion']) }} {{ Form::close() }}
Edit
{{ Form::open(['action' => 'CriteriaController@update', 'id' => 'update_criterion', 'data-form-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' => 'fetchObjectiveForSelect("assoc_outcome_0", "assoc_objectiveGroupFor0")']) }}

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

@if (count($programs) == 1)
@else @foreach ($programs as $program)
@endforeach @endif
{{ Form::label('status', 'Status') }}
{{ Form::label('name', 'Name') }} {{ Form::text('name', Input::old('name'), ['class' => 'form-control', 'id' => 'criterion_name']) }}
{{ Form::label('subcriteria', 'Subcriteria') }}

Manually add bullets or numbering.

{{ Form::textarea('subcriteria', '', ['class' => 'form-control', 'rows' => 3, 'id' => 'criterion_subcriteria']) }}
{{ Form::label('maximum_score', 'Maximum Score') }} {{ Form::text('maximum_score', '', ['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'), ['class' => 'form-control', 'rows' => 2, 'id' => 'criterion_copyright', 'placeholder' => '(optional)']) }}
{{ Form::label('notes', 'Additional Notes') }} {{ Form::textarea('notes', Input::old('notes'), ['class' => 'form-control', 'rows' => 2, 'id' => 'criterion_notes', 'placeholder' => '(optional)']) }}
{{ Form::submit('Update', ['class' => 'btn btn-primary btn-block', 'id' => 'update_the_criterion_button', 'data-form-id' => 'update_criterion']) }} {{ Form::close() }} {{ Form::open(['action' => 'CriteriaController@delete', 'id' => 'deleteCriterionForm']) }} {{ Form::hidden('criterion_delete', '0', ['id' => 'deleteCriteria']) }} {{ Form::submit('Delete', ['class' => 'btn btn-primary btn-block', 'id' => 'DeleteButton']) }} {{ Form::close() }}
@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"); visiblePrograms('allOutcomes'); // -------------------------------------------------------------------------- // 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