-
phones.msn
565 566 7 7 $(document).ready(function(){ 8 8 9 9 % foreach my $cred ( @credentials ) { 10 $('#<% $name %>_name_<% $cred->id %>_text').focusout(function(){ 10 $('#<% $name %>_name_orig_<% $cred->id %>_text').focusout(function(){ 11 11 var oPhone = $(this); 12 12 $.get('/contenido/ajax/credential_phone_valid.html', { 'id' : '<% $object->id %>', 'phone' : $(oPhone).val() }, function(data){ 13 13 if ( data.error ) { … … 19 19 }); 20 20 % } 21 21 22 $('#<% $name %>_name__text').focusout(function(){ 22 $('#<% $name %>_name_orig__text').focusout(function(){ 23 23 var oPhone = $(this); 24 24 $.get('/contenido/ajax/credential_phone_valid.html', { 'id' : '<% $object->id %>', 'phone' : $(oPhone).val() }, function(data){ 25 25 if ( data.error ) { … … 40 40 <tr bgcolor="white"> 41 41 <th>Main</th> 42 42 <th>Телефон</th> 43 <th></th> 43 <th>ID</th> 44 44 <th>Активен</th> 45 45 <th>Удалить</th> 46 46 <th></th> … … 51 51 % my $active = $cred->status == 1 ? ' checked' : ''; 52 52 <tr bgcolor="<% $bgcolor %>"> 53 53 <td width="1%"><input type="radio" name="<% $name %>.main" value="<% $cred->id %>"<% $checked %>></td> 54 <td width="86%"><& /contenido/components/inputs/string.msn, name => $name.'_name_'.$cred->id, prop => $prop, check => $cred->name, object => $object &></td> 55 <td width="10%"><& /contenido/components/inputs/string.msn, name => $name.'_name_'.$cred->id, prop => $prop, check => $cred->name_orig, object => $object &></td> 54 <td width="84%"><& /contenido/components/inputs/string.msn, name => $name.'_name_orig_'.$cred->id, prop => $prop, check => $cred->name_orig, object => $object &></td> 55 <td width="12%"><& /contenido/components/inputs/string.msn, name => $name.'_name_'.$cred->id, prop => $prop, check => $cred->name, object => $object &></td> 56 56 <td width="1%"><input type="checkbox" name="<% $name %>_active_<% $cred->id %>" value="1"<% $active %>></td> 57 57 <td width="1%"><input type="checkbox" name="<% $name %>.delete" value="<% $cred->id %>"></td> 58 58 <td width="1%" id="<% $name %>_<% $cred->id %>_check"><span style="color:green">Ok</span></td> … … 60 60 % } 61 61 <tr bgcolor="<% $i++ % 2 ? 'white' : '#e0e0e0' %>"> 62 62 <td><input type="radio" name="<% $name %>.main" value=""></td> 63 <td><& /contenido/components/inputs/string.msn, name => $name.'_name_', prop => $prop, check => '', object => $object &></td> 63 <td><& /contenido/components/inputs/string.msn, name => $name.'_name_orig_', prop => $prop, check => '', object => $object &></td> 64 64 <td></td> 65 65 <td><input type="checkbox" name="<% $name %>_active_" value="1"></td> 66 66 <td></td>