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