|
22 | 22 |
|
23 | 23 | $dependencyArray = []; |
24 | 24 |
|
25 | | - //convert dependency array to simple matrix ( prymary id as key and array with secondaries id ) |
| 25 | + //convert dependency array to simple matrix ( primary id as key and array with secondaries id ) |
26 | 26 | foreach ($dependencies as $primary) { |
27 | 27 | $dependencyArray[$primary->id] = []; |
28 | 28 | foreach ($primary->{$primary_dependency['entity_secondary']} as $secondary) { |
|
45 | 45 |
|
46 | 46 | $secondary_ids = []; |
47 | 47 |
|
48 | | - //create secondary dependency from primary relation, used to check what chekbox must be check from second checklist |
| 48 | + //create secondary dependency from primary relation, used to check what checkbox must be checked from second checklist |
49 | 49 | if (old($primary_dependency['name'])) { |
50 | 50 | foreach (old($primary_dependency['name']) as $primary_item) { |
51 | 51 | foreach ($dependencyArray[$primary_item] as $second_item) { |
52 | 52 | $secondary_ids[$second_item] = $second_item; |
53 | 53 | } |
54 | 54 | } |
55 | | - } else { //create dependecies from relation if not from validate error |
| 55 | + } else { //create dependencies from relation if not from validate error |
56 | 56 | foreach ($primary_array as $primary_item) { |
57 | 57 | foreach ($primary_item[$secondary_dependency['entity']] as $second_item) { |
58 | 58 | $secondary_ids[$second_item['id']] = $second_item['id']; |
@@ -219,7 +219,7 @@ function bpFieldInitChecklistDependencyElement(element) { |
219 | 219 | //check and disable secondies checkbox |
220 | 220 | thisField.find('input.secondary_list[value="'+value+'"]').prop( "checked", true ); |
221 | 221 | thisField.find('input.secondary_list[value="'+value+'"]').prop( "disabled", true ); |
222 | | - //remove hidden fields with secondary dependency if was setted |
| 222 | + //remove hidden fields with secondary dependency if was set |
223 | 223 | var hidden = thisField.find('input.secondary_hidden[value="'+value+'"]'); |
224 | 224 | if(hidden) |
225 | 225 | hidden.remove(); |
|
0 commit comments