diff --git a/app/views/comments/_form.html.erb b/app/views/comments/_form.html.erb index 0c4b3d63afe..7cf1da846e6 100644 --- a/app/views/comments/_form.html.erb +++ b/app/views/comments/_form.html.erb @@ -86,6 +86,16 @@ $('#comment-form .control-group .help-block ').remove() $('#comment-form .control-group').append('Error: there was a problem.') }) + + function insertTitleSuggestionTemplate() { + var element = $('#text-input'); + var currentText = $('#text-input').val().trim(); + var template = "\n[propose:title]Propose your title here[/propose]"; + if(currentText.length == 0) + template = "[propose:title]Propose your title here[/propose]"; + var newText = currentText+template; + element.val(newText); + }
@@ -105,7 +115,8 @@  
<%= raw t('comments._form.logged_in', :username => current_user.username) %> | <%= t('comments._form.formatting') %> | - <%= t('comments._form.notifications') %> + <%= t('comments._form.notifications') %> | + Propose Title