Commit 161155ac181002d2e681735579ab0f82ec0751cb
1 parent
5d163f4b
09.02.16
Showing
1 changed file
with
4 additions
and
3 deletions
Show diff stats
common/widgets/views/education_field.php
| ... | ... | @@ -9,7 +9,8 @@ |
| 9 | 9 | <div class="field_list"> |
| 10 | 10 | |
| 11 | 11 | <?php $t = 0; |
| 12 | - $label = 0; | |
| 12 | + | |
| 13 | + $label = 0; // add this var | |
| 13 | 14 | |
| 14 | 15 | for($i = 1; $i <= count($model); $i++): |
| 15 | 16 | $row = $i; |
| ... | ... | @@ -20,7 +21,7 @@ |
| 20 | 21 | 'class' => 'form-group', |
| 21 | 22 | 'id' => isset( $model[ $i ][ 'parent_key' ] ) ? $model[ $i ][ 'parent_key' ] : 0, |
| 22 | 23 | ]) ?> |
| 23 | - <input id="edu-name-<?= ++$label ?>" type="text" placeholder="Название" class="form-control custom-input-2" value="<?= isset( $model[ $t ][ 'value' ] ) ? $model[ $t ][ 'value' ] : '' ?>" name="Fields[education][<?= $row ?>][0][name]"/> | |
| 24 | + <input id="edu-name-<?= ++$label ?>" type="text" placeholder="Название" class="form-control custom-input-2" value="<?= isset( $model[ $t ][ 'value' ] ) ? $model[ $t ][ 'value' ] : '' ?>" name="Fields[education][<?= $row ?>][0][name]"/> | |
| 24 | 25 | <label for="edu-name-<?= $label ?>"></label> |
| 25 | 26 | |
| 26 | 27 | <input id="edu-to-<?= ++$label ?>" type="number" class="form-control form-control custom-input-2 custom-input-2-date" value="<?= isset( $model[ ++$t ][ 'value' ] ) ? $model[ $t ][ 'value' ] : '' ?>" name="Fields[education][<?= $row ?>][1][year_from]"/> |
| ... | ... | @@ -40,7 +41,7 @@ |
| 40 | 41 | |
| 41 | 42 | <script> |
| 42 | 43 | var start_i_<?=$this->context->id?> = <?=$i?>; |
| 43 | - var start_label_<?=$this->context->id?> = <?=$label?>; | |
| 44 | + var start_label_<?=$this->context->id?> = <?=$label?>; // add this var | |
| 44 | 45 | $ (document) |
| 45 | 46 | .ready ( |
| 46 | 47 | function () | ... | ... |