View | Details | Raw Unified | Return to bug 26436
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/members.js (-6 / +4 lines)
Lines 203-218 $(document).ready(function(){ Link Here
203
        e.preventDefault();
203
        e.preventDefault();
204
        $(this).parents('fieldset').first().remove();
204
        $(this).parents('fieldset').first().remove();
205
    });
205
    });
206
207
    $(document.body).on('change','.select_city',function(){
206
    $(document.body).on('change','.select_city',function(){
208
        var selected_city = $(this).val();
207
        var selected_city = $(this).val();
209
        var addressfield = $(this).data("addressfield");
208
        var addressfield = $(this).data("addressfield");
210
        var myRegEx=new RegExp(/(.*)\|(.*)\|(.*)\|(.*)/);
209
        var myRegEx=new RegExp(/(.*)\|(.*)\|(.*)\|(.*)/);
211
        var matches = selected_city.match( myRegEx );
210
        var matches = selected_city.match( myRegEx );
212
        $("#" + addressfield + "zipcode").val( matches[1] );
211
        $('input[name="' + addressfield + "zipcode").val( matches[1] );
213
        $("#" + addressfield + "city").val( matches[2] );
212
        $('input[name="' + addressfield + "city").val( matches[2] );
214
        $("#" + addressfield + "state").val( matches[3] );
213
        $('input[name="' + addressfield + "state").val( matches[3] );
215
        $("#" + addressfield + "country").val( matches[4] );
214
        $('input[name="' + addressfield + "country").val( matches[4] );
216
    });
215
    });
217
216
218
    dateformat = $("#dateofbirth").siblings(".hint").first().html();
217
    dateformat = $("#dateofbirth").siblings(".hint").first().html();
219
- 

Return to bug 26436