浏览代码

Administradores, program pairing bug

父节点
当前提交
cf6a3ed506
共有 1 个文件被更改,包括 4 次插入2 次删除
  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 查看文件

@@ -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
         }