diff --git a/app/community/routes.py b/app/community/routes.py index 0866da08..a46f8a1a 100644 --- a/app/community/routes.py +++ b/app/community/routes.py @@ -553,7 +553,7 @@ def add_discussion_post(actor): if community.posting_warning: flash(community.posting_warning) - return render_template('community/add_discussion_post.html', title=_('Add post to community'), form=form, community=community, + return render_template('community/add_post.html', title=_('Add post to community'), form=form, community=community, markdown_editor=current_user.markdown_editor, low_bandwidth=False, actor=actor, moderating_communities=moderating_communities(current_user.get_id()), joined_communities=joined_communities(current_user.id), @@ -633,7 +633,7 @@ def add_image_post(actor): form.communities.data = community.id form.notify_author.data = True - return render_template('community/add_image_post.html', title=_('Add post to community'), form=form, community=community, + return render_template('community/add_post.html', title=_('Add post to community'), form=form, community=community, markdown_editor=current_user.markdown_editor, low_bandwidth=False, actor=actor, moderating_communities=moderating_communities(current_user.get_id()), joined_communities=joined_communities(current_user.id), @@ -713,7 +713,7 @@ def add_link_post(actor): form.communities.data = community.id form.notify_author.data = True - return render_template('community/add_link_post.html', title=_('Add post to community'), form=form, community=community, + return render_template('community/add_post.html', title=_('Add post to community'), form=form, community=community, markdown_editor=current_user.markdown_editor, low_bandwidth=False, actor=actor, moderating_communities=moderating_communities(current_user.get_id()), joined_communities=joined_communities(current_user.id), @@ -793,7 +793,7 @@ def add_video_post(actor): form.communities.data = community.id form.notify_author.data = True - return render_template('community/add_video_post.html', title=_('Add post to community'), form=form, community=community, + return render_template('community/add_post.html', title=_('Add post to community'), form=form, community=community, markdown_editor=current_user.markdown_editor, low_bandwidth=False, actor=actor, moderating_communities=moderating_communities(current_user.get_id()), joined_communities=joined_communities(current_user.id), @@ -862,7 +862,7 @@ def add_poll_post(actor): if community.posting_warning: flash(community.posting_warning) - return render_template('community/add_poll_post.html', title=_('Add poll to community'), form=form, community=community, + return render_template('community/add_post.html', title=_('Add poll to community'), form=form, community=community, markdown_editor=current_user.markdown_editor, low_bandwidth=False, actor=actor, moderating_communities=moderating_communities(current_user.get_id()), joined_communities=joined_communities(current_user.id), diff --git a/app/templates/community/add_image_post.html b/app/templates/community/add_image_post.html deleted file mode 100644 index 2bb1d212..00000000 --- a/app/templates/community/add_image_post.html +++ /dev/null @@ -1,93 +0,0 @@ -{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %} - {% extends 'themes/' + theme() + '/base.html' %} -{% else %} - {% extends "base.html" %} -{% endif %} %} -{% from 'bootstrap/form.html' import render_field %} - -{% block app_content %} -
{{ _('Provide a URL ending with .mp4 or .webm.') }}
+ {% endif %} {{ render_field(form.body) }} {% if not low_bandwidth %} {% if markdown_editor %} @@ -37,6 +47,47 @@ {{ _('Enable markdown editor') }} {% endif %} {% endif %} + + {% if post.type == POST_TYPE_POLL %} + + {{ render_field(form.mode) }} + {{ render_field(form.finish_in) }} + {{ render_field(form.local_only) }} + {% endif %} + {{ render_field(form.tags) }} {{ _('Separate each tag with a comma.') }} diff --git a/app/templates/community/add_video_post.html b/app/templates/community/add_video_post.html deleted file mode 100644 index 23c899c8..00000000 --- a/app/templates/community/add_video_post.html +++ /dev/null @@ -1,93 +0,0 @@ -{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %} - {% extends 'themes/' + theme() + '/base.html' %} -{% else %} - {% extends "base.html" %} -{% endif %} %} -{% from 'bootstrap/form.html' import render_field %} - -{% block app_content %} -