Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

3 Просмотр краткой истории своих запросов

4. Пример кода для вставки на сайт:

Code Block
languagejavascript
linenumberstrue
<STYLE TYPE='text/css'>BODY, input, select, table {
font-size: 12px;font-family: Arial,Helvetica,FreeSans,'sans - serif';}
</STYLE>
<div id='feedback-main-div' style='font-size: 12px; font-family: Arial,Helvetica,FreeSans,sans-serif'>
<div id='feedback-error'></div>
<form enctype='multipart/form-data' id='feedback-form' name='feedback-form' target='feedback-response' method='post' action='http://localhost:8080/plugins/servlet/feedback/create'>
<input type='hidden' name='form-index' id='form-index' value='1'/>
<div><input type='text' id='feedback-summary' name='feedback-summary' size='60' placeholder='Тема обращения' value=''/></div>
<div><TEXTAREA id='feedback-body' name='feedback-body' COLS='62' ROWS='5' placeholder='Тут можно указать подробности...'></TEXTAREA></div>
<div><select id='feedback-component' name='feedback-component'>
<option value='' selected >Выберите компонент</option>
</select>
</div>
<input type='text' id='feedback-email' name='feedback-email' placeholder='E-mail для ответа' size='38' value=''/>
<div><input type='file' id='feedback-attachment' name='feedback-attachment' size='38' /></div>
<input type='button' value=' Задать вопрос ' onclick='addFeedback()'/>
</form></div>
<iframe id='feedback-response' name='feedback-response' frameborder='no' style='display: none' width='450' height='200'></iframe><div id='feedback-new-issue-div'><input type='button' id='feedback-new-issue-button' value='Создать еще запрос'></div><script type='text/javascript'>
jQuery(window).load(function()
{
   jQuery('#feedback-main-div').show();
   jQuery('#feedback-new-issue-div').hide();
   jQuery('#feedback-response').hide();
   jQuery('#feedback-new-issue-button').click(function ()
   {
    jQuery('#feedback-form')[0].reset();
    jQuery('#feedback-main-div').show();
    jQuery('#feedback-new-issue-div').hide();
    jQuery('#feedback-response').hide();
   });
});

function addFeedback() {
   var summary = jQuery('#feedback-summary').val();
   var email = jQuery('#feedback-email').val();
   if (summary.trim() == '' || email.trim() == '')
   {
    var message = '';
    if (summary.trim() == '')
    {
     message = message + '<div>Введите тему обращения</div>';
    }
    if (email.trim() == '')
    {
     message = message + '<div>Введите E-mail для ответа</div>';
    }
    jQuery('#feedback-error').html(message);
    return false;
}
   jQuery('#feedback-error').html('');
   jQuery('#feedback-main-div').hide();
   jQuery('#feedback-new-issue-div').show();
   jQuery('#feedback-response').show();
   jQuery('#feedback-form').submit();
   return false;
}
</script>
Include Page
MAIN:Подвал сайта Teamlead
MAIN:Подвал сайта Teamlead