Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js |
— | — | @@ -1027,7 +1027,7 @@ |
1028 | 1028 | getFormData: function () { |
1029 | 1029 | var data = {}; |
1030 | 1030 | var rating = $.articleFeedbackv5.find( '.articleFeedbackv5-rating input:hidden' ).val(); |
1031 | | - if ( '0' != rating ) { |
| 1031 | + if ( true ) { // '0' != rating ) { |
1032 | 1032 | data.rating = rating; |
1033 | 1033 | } |
1034 | 1034 | data.comment = $.articleFeedbackv5.find( '.articleFeedbackv5-comment textarea' ).val(); |
— | — | @@ -2760,13 +2760,19 @@ |
2761 | 2761 | * @param object errors errors, indexed by field name |
2762 | 2762 | */ |
2763 | 2763 | $.articleFeedbackv5.markFormErrors = function ( errors ) { |
| 2764 | + aft5_debug( 'got here' ); |
2764 | 2765 | if ( '_api' in errors ) { |
2765 | | - if ( $.articleFeedbackv5.debug ) { |
2766 | | - $.articleFeedbackv5.markTopError( errors._api.info ); |
| 2766 | + if ( typeof errors._api == 'object' ) { |
| 2767 | + if ( 'info' in errors._api ) { |
| 2768 | + mw.log( mw.msg( errors._api.info ) ); |
| 2769 | + } else { |
| 2770 | + mw.log( mw.msg( 'articlefeedbackv5-error-submit' ) ); |
| 2771 | + } |
| 2772 | + $.articleFeedbackv5.markTopError( mw.msg( 'articlefeedbackv5-error-submit' ) ); |
2767 | 2773 | } else { |
2768 | | - mw.log( mw.msg( 'articlefeedbackv5-error-submit' ) ); |
| 2774 | + mw.log( mw.msg( errors._api ) ); |
| 2775 | + $.articleFeedbackv5.markTopError( errors._api ); |
2769 | 2776 | } |
2770 | | - mw.log( mw.msg( errors._api.info ) ); |
2771 | 2777 | } else { |
2772 | 2778 | mw.log( mw.msg( 'articlefeedbackv5-error-validation' ) ); |
2773 | 2779 | if ( 'nofeedback' in errors ) { |