Commit 5a89cabd78d6b92fc4326ef6139628e612644ea7
1 parent
ea8c5991
add Vitaliy's widgets
Showing
4 changed files
with
22 additions
and
2 deletions
Show diff stats
backend/assets/AppAsset.php
common/widgets/views/education_field.php
frontend/assets/AppAsset.php
| 1 | +$('body').on('click', '.delete-field-item', function(){ | |
| 2 | + | |
| 3 | + $(this).parent('.form-group').remove(); | |
| 4 | + | |
| 5 | +}); | |
| 6 | + | |
| 7 | + | |
| 8 | +$('.add_field').click(function(){ | |
| 9 | + var block = $('.fields_video_result'); | |
| 10 | + var sub_block = '<div class="form-group">'+ | |
| 11 | + '<input type="text" class="form-control" value="" name="Fields[video]['+ start_i++ +'][value]">'+ | |
| 12 | + '<span data-id="none" title="удалить" class="glyphicon glyphicon-trash delete-field-item"></span>'+ | |
| 13 | + '<div>'; | |
| 14 | + block.append(sub_block); | |
| 15 | + | |
| 16 | +}); | |
| 0 | 17 | \ No newline at end of file | ... | ... |