includes/clientside/static/comments.js
changeset 550 685e839d934e
parent 541 acb7e23b6ffa
child 582 a38876c0793c
equal deleted inserted replaced
549:6894cfd94dfb 550:685e839d934e
    51           alert($lang.get('comment_msg_comment_posted'));
    51           alert($lang.get('comment_msg_comment_posted'));
    52           hideCommentForm();
    52           hideCommentForm();
    53           materializeComment(response);
    53           materializeComment(response);
    54           break;
    54           break;
    55         case 'error':
    55         case 'error':
    56           new messagebox(MB_OK|MB_ICONSTOP, ( response.title ? response.title : 'Error fetching comment data' ), response.error);
    56           new MessageBox(MB_OK|MB_ICONSTOP, ( response.title ? response.title : 'Error fetching comment data' ), response.error);
    57           break;
    57           break;
    58         default:
    58         default:
    59           alert(ajax.responseText);
    59           alert(ajax.responseText);
    60           break;
    60           break;
    61       }
    61       }
   344     var captcha_code = '';
   344     var captcha_code = '';
   345     var captcha_id   = '';
   345     var captcha_id   = '';
   346   }
   346   }
   347   if ( subj == '' )
   347   if ( subj == '' )
   348   {
   348   {
   349     new messagebox(MB_OK|MB_ICONSTOP, 'Input validation failed', 'Please enter a subject for your comment.');
   349     new MessageBox(MB_OK|MB_ICONSTOP, 'Input validation failed', 'Please enter a subject for your comment.');
   350     return false;
   350     return false;
   351   }
   351   }
   352   if ( text == '' )
   352   if ( text == '' )
   353   {
   353   {
   354     new messagebox(MB_OK|MB_ICONSTOP, 'Input validation failed', 'Please enter some text for the body of your comment .');
   354     new MessageBox(MB_OK|MB_ICONSTOP, 'Input validation failed', 'Please enter some text for the body of your comment .');
   355     return false;
   355     return false;
   356   }
   356   }
   357   var req = {
   357   var req = {
   358     'mode' : 'submit',
   358     'mode' : 'submit',
   359     'name' : name,
   359     'name' : name,