1$(document).ready(function(){ 2 $('.assist__inputname').on('input', function(){ 3 var validvalue = toValidValue($(this).val()); 4 $(this).val(validvalue); 5 var isValidForm = true; 6 var $form = $(this).closest('form'); 7 $form.find('.assist__inputname').each(function(i, e){ 8 isValidForm = isValidForm && $(e).val().length > 0; 9 }); 10 $form.find('.btn_submit').prop('disabled', !isValidForm); 11 }) 12 13 $('.modal form').on('submit', function(){ 14 return $(this).find('.btn_submit').prop('disabled') ? false : true; 15 }) 16 17 function toValidValue(val){ 18 var validvalue = ''; 19 var val = val.toLowerCase().replace(/\s+/g, ''); 20 var replacer = { 21 й : 'q', Ñ : 'w', Ñ : 'e', к : 'r', е : 't', 22 н : 'y', г : 'u', Ñ : 'i', Ñ : 'o', з : 'p', 23 Ñ : 'a', Ñ : 's', в : 'd', а : 'f', п : 'g', 24 Ñ : 'h', о : 'j', л : 'k', д : 'l', Ñ : 'z', 25 Ñ : 'x', Ñ : 'c', м : 'v', и : 'b', Ñ : 'n', 26 Ñ : 'm', 27 }; 28 for(var i = 0; i < val.length; i++){ 29 var symbol = val.charAt(i); 30 validvalue += replacer[symbol] ? replacer[symbol] : symbol; 31 } 32 validvalue = validvalue.replace(/[^\w]/g, '').replace(/\d/g, ''); 33 return validvalue.toUpperCase(); 34 } 35});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.