diff --git a/app/models/comment.rb b/app/models/comment.rb index ad0e4bd09..5e22612d9 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -41,7 +41,7 @@ class Comment < ActiveRecord::Base } validates :title, presence: { message: "Le titre est obligatoire" }, - length: { maximum: 100, message: "Le titre est trop long" } + length: { maximum: 160, message: "Le titre est trop long" } validates :wiki_body, presence: { message: "Vous ne pouvez pas poster un commentaire vide" } wikify_attr :body diff --git a/app/views/comments/_form.html.haml b/app/views/comments/_form.html.haml index d95b70a57..ccee7b42e 100644 --- a/app/views/comments/_form.html.haml +++ b/app/views/comments/_form.html.haml @@ -2,7 +2,7 @@ %p = form.label :title, "Sujet du commentaire" - = form.text_field :title, autocomplete: 'off', required: 'required', spellcheck: 'true', maxlength: 100 + = form.text_field :title, autocomplete: 'off', required: 'required', spellcheck: 'true', maxlength: 160 %p = form.label :wiki_body, "Commentaire complet" = form.text_area :wiki_body, required: 'required', spellcheck: 'true', class: 'markItUp', placeholder: "Vous pouvez écrire votre commentaire ici.\n\nMerci de rester poli et courtois, on compte sur vous !" diff --git a/app/views/redaction/news/_form.html.haml b/app/views/redaction/news/_form.html.haml index 2c640cc2e..0cbe54694 100644 --- a/app/views/redaction/news/_form.html.haml +++ b/app/views/redaction/news/_form.html.haml @@ -2,6 +2,6 @@ = form.label :section_id, "Section" = form.collection_select :section_id, Section.published, :id, :title = form.label :title, "Titre" - = form.text_field :title, autocomplete: 'off', required: 'required', spellcheck: 'true', maxlength: 100 + = form.text_field :title, autocomplete: 'off', required: 'required', spellcheck: 'true', maxlength: 160 %button.cancel(type="button") Annuler = form.submit "OK" diff --git a/app/views/redaction/news/reorganize.html.haml b/app/views/redaction/news/reorganize.html.haml index 4c8eff90b..269a4c202 100644 --- a/app/views/redaction/news/reorganize.html.haml +++ b/app/views/redaction/news/reorganize.html.haml @@ -16,7 +16,7 @@ = form.collection_select :section_id, Section.published, :id, :title %p = form.label :title, "Titre" - = form.text_field :title, autocomplete: 'off', required: 'required', spellcheck: 'true', maxlength: 100 + = form.text_field :title, autocomplete: 'off', required: 'required', spellcheck: 'true', maxlength: 160 %p = form.label :wiki_body, "Chapeau" = form.text_area :wiki_body, required: 'required', spellcheck: 'true', class: 'markItUp'