Changeset 2650379
- Timestamp:
- 12/29/2021 09:41:43 AM (4 years ago)
- Location:
- kuicklist
- Files:
-
- 2 edited
-
tags/1.0.6/admin/class-kuicklist-admin.php (modified) (1 diff)
-
trunk/admin/class-kuicklist-admin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kuicklist/tags/1.0.6/admin/class-kuicklist-admin.php
r2650354 r2650379 187 187 188 188 // Group by folders 189 foreach ($response->data as $key => $folder) { 190 $dd_html .= '<optgroup label="'.$folder->name.'">'; 191 foreach ($folder->checklists as $checklist) { 192 $dd_html .= '<option value="'.$checklist->en_id.'" '.($kuicklist_checklist_id == $checklist->en_id ? 'selected' : '').' >'.$checklist->name.'</option>'; 189 foreach ($response->data as $key => $value) { 190 if(isset($value->checklists)) { 191 $dd_html .= '<optgroup label="'.$value->name.'">'; 192 foreach ($value->checklists as $checklist) { 193 $dd_html .= '<option value="'.$checklist->en_id.'" '.($kuicklist_checklist_id == $checklist->en_id ? 'selected' : '').' >'.$checklist->name.'</option>'; 194 } 195 196 $dd_html .= '</optgroup>'; 197 } else { 198 // fallback if user has cache the data as without folders structure 199 $dd_html .= '<option value="'.$value->en_id.'" '.($kuicklist_checklist_id == $value->en_id ? 'selected' : '').' >'.$value->name.'</option>'; 193 200 } 194 195 $dd_html .= '</optgroup>';196 201 } 197 202 -
kuicklist/trunk/admin/class-kuicklist-admin.php
r2650353 r2650379 187 187 188 188 // Group by folders 189 foreach ($response->data as $key => $folder) { 190 $dd_html .= '<optgroup label="'.$folder->name.'">'; 191 foreach ($folder->checklists as $checklist) { 192 $dd_html .= '<option value="'.$checklist->en_id.'" '.($kuicklist_checklist_id == $checklist->en_id ? 'selected' : '').' >'.$checklist->name.'</option>'; 189 foreach ($response->data as $key => $value) { 190 if(isset($value->checklists)) { 191 $dd_html .= '<optgroup label="'.$value->name.'">'; 192 foreach ($value->checklists as $checklist) { 193 $dd_html .= '<option value="'.$checklist->en_id.'" '.($kuicklist_checklist_id == $checklist->en_id ? 'selected' : '').' >'.$checklist->name.'</option>'; 194 } 195 196 $dd_html .= '</optgroup>'; 197 } else { 198 // fallback if user has cache the data as without folders structure 199 $dd_html .= '<option value="'.$value->en_id.'" '.($kuicklist_checklist_id == $value->en_id ? 'selected' : '').' >'.$value->name.'</option>'; 193 200 } 194 195 $dd_html .= '</optgroup>';196 201 } 197 202
Note: See TracChangeset
for help on using the changeset viewer.