Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mpPopupWorkingPlace( workplaceId ) {
- // edit
- if ( arguments.length > 0 ) {
- $( '#mp_popup_new_working_place' ).find( 'input[name="name"]' ).val( $('#mp_wp_' + workplaceId).find( 'span[data-field="name"]' ).html() );
- $( '#mp_popup_new_working_place' ).find( 'input[name="position"]' ).val( $('#mp_wp_' + workplaceId).find( 'span[data-field="position"]' ).html() );
- $( '#mp_popup_new_working_place' ).find( 'input[name="date_from"]' ).val( $('#mp_wp_' + workplaceId).find( 'span[data-field="date_from"]' ).html() );
- $( '#mp_popup_new_working_place' ).find( 'input[name="date_till"]' ).val( $('#mp_wp_' + workplaceId).find( 'span[data-field="date_till"]' ).html() );
- //$( '#mp_popup_new_working_place' ).find( '[name="currently_working"]' ).val();
- $( '#mp_popup_new_working_place' ).find( 'input[name="additional_info"]' ).val( $('#mp_wp_' + workplaceId).find( 'span[data-field="additional_info"]' ).html() );
- $( '#mp_popup_new_working_place' ).find( 'input[name="action"]' ).val( 'update' );
- $( '#mp_popup_new_working_place' ).find( 'input[name="id"]' ).val( workplaceId );
- } else {
- $( '#mp_popup_new_working_place' ).find( 'input[name="name"]' ).val( '' );
- $( '#mp_popup_new_working_place' ).find( 'input[name="position"]' ).val( '' );
- $( '#mp_popup_new_working_place' ).find( 'input[name="date_from"]' ).val( '' );
- $( '#mp_popup_new_working_place' ).find( 'input[name="date_till"]' ).val( '' );
- //$( '#mp_popup_new_working_place' ).find( '[name="currently_working"]' ).val();
- $( '#mp_popup_new_working_place' ).find( 'input[name="additional_info"]' ).val( '' );
- $( '#mp_popup_new_working_place' ).find( 'input[name="action"]' ).val( 'new' );
- $( '#mp_popup_new_working_place' ).find( 'input[name="id"]' ).val( '' );
- }
- $('#mp_popup_new_working_place').show();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement