
        function yelp() {
            $(document).ready(function () {
                $('#add_new_source').click(function(e) {
                    e.preventDefault();
                    e.preventDefault();
                    var newWidget = $(this).attr('data-prototype');
                    var itemCount = $('input[id^="form_new_source_"]').length;
                    var itemContainer = $('input[id^="form_new_source_"]:last').closest('.form-group').clone(true);
                    newWidget = newWidget.replace(/__name__/g, itemCount);
                    itemContainer.find('input').replaceWith(newWidget);
                    itemContainer.find('label').text("{{ 'source'|trans }} # " + ($('input[id^="form_"][type="text"]').length + 1));
                    itemContainer.insertAfter($(this).closest('.form-group'));
                    $(this).closest(".add_new_source_container").remove();
                    return false;
                });
            });
        }

        document.addEventListener("DOMContentLoaded", yelp, false);
