Browse Source

Administradores, program pairing bug

parent
commit
cf6a3ed506
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      app/views/local/managers/admins/assign_other_programs.blade.php

+ 4
- 2
app/views/local/managers/admins/assign_other_programs.blade.php View File

114
                     <div class="form-group" id = "other_program_div_edit">
114
                     <div class="form-group" id = "other_program_div_edit">
115
                         {{ Form::label('program', 'Choose other program') }}
115
                         {{ Form::label('program', 'Choose other program') }}
116
                         <select id="program-edit" name="other_program[]" class="form-control selectpicker">
116
                         <select id="program-edit" name="other_program[]" class="form-control selectpicker">
117
-                            
117
+                            <option value="0">Nothing Selected</option>
118
                             @foreach ($programs as $program)
118
                             @foreach ($programs as $program)
119
                                 @if (Input::old('program') != $program->id)
119
                                 @if (Input::old('program') != $program->id)
120
                                     <option value="{{ $program->id }}">{{ $program->name }}
120
                                     <option value="{{ $program->id }}">{{ $program->name }}
226
                 function(paired_programs){
226
                 function(paired_programs){
227
 
227
 
228
                     $('.removable').remove();
228
                     $('.removable').remove();
229
+                    $('#other_program_div_edit').find('select.selectpicker').eq(0).val(0);
229
 
230
 
230
                     $.each(paired_programs, function(index, program_id){
231
                     $.each(paired_programs, function(index, program_id){
231
 
232
 
236
                             addOtherProgram("#add-other-program-edit", "#other_program_div_edit", 'removable')
237
                             addOtherProgram("#add-other-program-edit", "#other_program_div_edit", 'removable')
237
                         }
238
                         }
238
 
239
 
239
-                        $('.selectpicker').selectpicker('refresh');
240
+                        
240
                     })
241
                     })
242
+                    $('.selectpicker').selectpicker('refresh');
241
                 }
243
                 }
242
             )
244
             )
243
         }
245
         }