fixes post flood error messages
This commit is contained in:
parent
05eec6deae
commit
e60c4c72d9
1 changed files with 2 additions and 2 deletions
|
@ -106,11 +106,11 @@ class AddPostForm(forms.ModelForm):
|
|||
if forum_settings.POST_FLOOD and not self.user.has_perm('djangobb_forum.fast_post'):
|
||||
if self.user.has_perm('djangobb_forum.med_post'):
|
||||
if lastpost_diff.total_seconds() < forum_settings.POST_FLOOD_MED:
|
||||
self._errors['body'] = _("Sorry, you have to wait %d seconds between posts." % forum_settings.POST_FLOOD_MED)
|
||||
self._errors['body'] = self.error_class([_("Sorry, you have to wait %d seconds between posts." % forum_settings.POST_FLOOD_MED)])
|
||||
|
||||
else:
|
||||
if lastpost_diff.total_seconds() < forum_settings.POST_FLOOD_SLOW:
|
||||
self._errors['body'] = _("Sorry, you have to wait %d seconds between posts." % forum_settings.POST_FLOOD_SLOW)
|
||||
self._errors['body'] = self.error_class([_("Sorry, you have to wait %d seconds between posts." % forum_settings.POST_FLOOD_SLOW)])
|
||||
|
||||
|
||||
return cleaned_data
|
||||
|
|
Reference in a new issue