' + (frm['comment'] || '').replace(/\r/g, "") + '
'; var pack = function(name,key){return ['','',name, key ? ': ' : '','', frm[key]||'', key ? '$nbsp;$nbsp;':'', '
'].join('');} var body = [pack('종류','type'), pack('이름','name'), pack('이메일','email'), pack('연락처', 'phone'), pack('내용',''), comment].join(""); qna.subject = '[' + (frm['type'] || '기타') + '] 관련 민원 내용'; qna.body = body; //if (callback) callback(null, qna); thiz.submitQNAForm(qna, function(err, $doc, html){ var widget_code = 'w2020010338bde02e2db20'; if (callback) callback(err, html); else if (err) thiz.showModal('error', err, widget_code); else if (!err) thiz.showModal('complete', '등록되었습니다.', widget_code); }); }) }, hideModal: function(){ var $body = $('body'); $('.modal.in.modal_site_alert').hide(); $body.toggleClass('site_alert_open', false); }, showModal: function(type,msg,widget_code){ this.hideModal(); var modal_target; var $body = $('body'); $body.toggleClass('site_alert_open', true); if(type == 'complete'){ modal_target = 'input_form_complete_modal_' + widget_code; } else { modal_target = 'input_form_error_modal_' + widget_code; } if(msg != undefined && msg.trim() != ''){ $('#'+modal_target+' .modal-content .container-fluid p').html(msg); if(type == 'complete'){ var form_url_link = ' onclick="location.href=\'/shop_mypage/?m2=qna\'"'; $('#'+modal_target+' .btn-group-justified').html(''+LOCALIZE.버튼_확인()+''); } } $('#'+modal_target).show(); }, doLoad: function(page){ console && console.log('doLoad()..', page); if (page == 'inquiry'){ var info = MY_TOOLS.getProfile(); info && $('#input_txt_081a58c93ea2c').val(info.name); info && $('#input_txt_h47tgsD7m7').val(info.email); $('#w2020010338bde02e2db20 a._input_form_submit').attr('onclick', 'MY_TOOLS.submitInquiry(); return false;'); } }, }; if (typeof MY_TOOLS != 'undefined') MY_TOOLS.changeMenuText();