Ignore:
Timestamp:
02/08/23 20:42:53 (21 months ago)
Author:
Gjoko Kostadinov <gjoko.kostadinov@…>
Branches:
master
Children:
46fd0c7
Parents:
a436340
Message:

Fix page layout and js bugs.

Location:
src/main/resources/static/js
Files:
2 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/resources/static/js/register_business.js

    ra436340 r2b0a4db  
    99
    1010        $.each(data, function(index, obj) {
    11             $el.append($("<option></option>")
    12                 .attr("value", obj.value).text(obj.text));
     11            $el.append("<option value=" + obj.value + ">" + obj.text + "</option>");
    1312        });
    1413    });
     
    1615    $("#companyType").change(function() {
    1716        var selectedVal = $(this).find(':selected').val();
    18         var selectedText = $(this).find(':selected').text();
    1917        alert(JSON.stringify(enumerations[selectedVal-1]));
     18        var selectedObj = enumerations[selectedVal-1];
     19        var $el = $("#predefined_services");
     20        $el.empty();
     21        $.each(selectedObj['serviceTypes'], function (index, obj) {
     22            $el.append(
     23                '<div class="form-check">\n' +
     24                '    <input class="form-check-input" type="checkbox" value=\"' + obj.id + '\" id=\"'+ obj.id +'\">\n' +
     25                '        <label class="form-check-label" for=\"' + obj.id + '\">\n' +
     26                              obj.name +
     27                '         </label>\n' +
     28                '    </div>')
     29        });
    2030    })
    2131});
    22 
    23 document.addEventListener('DOMContentLoaded', e => {
    24     $('#input-prefetch').autocomplete()
    25 }, false);
Note: See TracChangeset for help on using the changeset viewer.