Commit 853ce5307f2cddd9c3cfe08778aaa21fa47a0cbf
1 parent
8e9b94ba
Exists in
master
and in
5 other branches
Fix new proposal
Showing
2 changed files
with
4 additions
and
4 deletions
Show diff stats
js/handlebars-helpers.js
| ... | ... | @@ -82,7 +82,7 @@ define(['handlebars'], function(Handlebars){ |
| 82 | 82 | |
| 83 | 83 | Handlebars.registerHelper('proposal_action', function(discussion, target) { |
| 84 | 84 | if(discussion.setting && discussion.setting.moderate_proposals) { |
| 85 | - return '/api/v1/articles/'+target.id+'/children/suggest'; | |
| 85 | + return '/api/v1/proposals_discussion_plugin/'+target.id+'/propose'; | |
| 86 | 86 | } else { |
| 87 | 87 | return '/api/v1/articles/'+target.id+'/children'; |
| 88 | 88 | } | ... | ... |
js/main.js
| ... | ... | @@ -108,7 +108,7 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | if(!logged_in) { |
| 111 | - $(this).closest('.support-proposal').find('.send-button a').click(); | |
| 111 | + $(this).closest('.support-proposal').find('.button-send a').click(); | |
| 112 | 112 | e.preventDefault(); |
| 113 | 113 | return; |
| 114 | 114 | } |
| ... | ... | @@ -644,12 +644,12 @@ define(['handlebars', 'fastclick', 'handlebars_helpers'], function(Handlebars, F |
| 644 | 644 | Main.updateHash(newHash); |
| 645 | 645 | }); |
| 646 | 646 | |
| 647 | - $( '.send-button a' ).on('click', function(e){ | |
| 647 | + $( '.button-send a' ).on('click', function(e){ | |
| 648 | 648 | e.preventDefault(); |
| 649 | 649 | |
| 650 | 650 | //display form to send proposal (or login form for non-logged users) |
| 651 | 651 | var $this = $(this); |
| 652 | - loginButton = $this.parents('.send-button'); | |
| 652 | + loginButton = $this.parents('.button-send'); | |
| 653 | 653 | loginButton.hide(); |
| 654 | 654 | $this.parents('.success-proposal-sent').hide(); |
| 655 | 655 | $wrapper = $this.parents('.make-proposal'); | ... | ... |