diff --git a/files/templates/comments.html b/files/templates/comments.html index f1b32c12d7..e9bc7ecd3d 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -259,13 +259,8 @@
-
- GIF + {{macros.file_input('file-edit-reply-' ~ c.id, 'comment-edit-body-' ~ c.id)}} - - - {{macros.file_input('file-edit-reply-' ~ c.id, False)}} -
Formatting help @@ -543,11 +538,8 @@
-
- - {{macros.file_input('file-upload-reply-' ~ c.fullname, False, not get_setting('dm_media'))}} -
+ {{macros.file_input('file-upload-reply-' ~ c.fullname, 'reply-form-body-' ~ c.id, not get_setting('dm_media'))}}
@@ -724,8 +716,8 @@ {% if not request.headers.get("xhr") %} {% if v %} - {% include "modals/gif.html" %} {% include "modals/emoji.html" %} + {% include "modals/gif.html" %} {% if v.admin_level >= PERMS['USER_BAN'] %} {% include "modals/punish.html" %} {% endif %} diff --git a/files/templates/contact.html b/files/templates/contact.html index 4502b41209..d25e557680 100644 --- a/files/templates/contact.html +++ b/files/templates/contact.html @@ -9,11 +9,7 @@
- - - {{macros.file_input('file-uplod', False)}} + {{macros.file_input('file-upload', 'input-message')}}
@@ -22,6 +18,7 @@

Warrant Canary has been moved to Monthly Website Stats Posts.

{% include "modals/emoji.html" %} + {% include "modals/gif.html" %} {% else %}

by email: {{EMAIL}}

{% endif %} diff --git a/files/templates/post.html b/files/templates/post.html index a9c731d60d..e7c96b1389 100644 --- a/files/templates/post.html +++ b/files/templates/post.html @@ -158,15 +158,8 @@
-
- + {{macros.file_input('file-upload-edit-' ~ p.id, 'post-edit-box-' ~ p.id)}} - - - {{macros.file_input('file-upload-edit-' ~ p.id, False)}} - - -
Formatting help diff --git a/files/templates/settings/common.html b/files/templates/settings/common.html index 9d832895f0..ec0eb5bfe3 100644 --- a/files/templates/settings/common.html +++ b/files/templates/settings/common.html @@ -71,24 +71,18 @@
{% endmacro %} -{% macro text_area_section(id, form_action, form_name, section_title, contents, below_text, placeholder_text, show_extras, show_file_upload, maxlength) %} +{% macro text_area_section(id, form_action, form_name, section_title, contents, below_text, placeholder_text, show_extras, maxlength) %}
+ {% if show_extras %} -
- - - - - {% if show_file_upload %} - {{macros.file_input('file-upload-common', False)}} - {% endif %} -
+ {{macros.file_input('file-upload-common-' ~ id, id ~'-text')}} {% endif %} +
{{below_text}} diff --git a/files/templates/settings/personal.html b/files/templates/settings/personal.html index 02f20117f0..a9d3c52e71 100644 --- a/files/templates/settings/personal.html +++ b/files/templates/settings/personal.html @@ -235,14 +235,14 @@ {%- endif %} {% if FEATURES['USERS_PROFILE_BODYTEXT'] %} - {{common.text_area_section('profile-bio', '/settings/personal', 'bio', 'Bio', v.bio, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Tell the community a bit about yourself.', true, true, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT)}} + {{common.text_area_section('profile-bio', '/settings/personal', 'bio', 'Bio', v.bio, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Tell the community a bit about yourself.', true, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT)}} {% endif %} - {{common.text_area_section('profile-friends', '/settings/personal', 'friends', 'Friends', v.friends, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Enter your friends on the site...', false, false, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT)}} + {{common.text_area_section('profile-friends', '/settings/personal', 'friends', 'Friends', v.friends, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Enter your friends on the site...', false, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT)}} - {{common.text_area_section('profile-enemies', '/settings/personal', 'enemies', 'Enemies', v.enemies, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Enter your enemies on the site...', false, false, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT)}} + {{common.text_area_section('profile-enemies', '/settings/personal', 'enemies', 'Enemies', v.enemies, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Enter your enemies on the site...', false, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT)}} - {{common.text_area_section('profile-signature', '/settings/personal', 'sig', 'Signature', v.sig, 'Limit of 200 characters', 'Enter a signature...', true, false, 200)}} + {{common.text_area_section('profile-signature', '/settings/personal', 'sig', 'Signature', v.sig, 'Limit of 200 characters', 'Enter a signature...', true, 200)}} {{common.toggle_section('Private Mode', 'privateswitch', 'private', v.is_private, 'This will hide your profile page from others.', false)}} {{common.toggle_section('Lifetime donated visiblity', 'lifetimedonated_visibleswitch', 'lifetimedonated_visible', v.lifetimedonated_visible, 'Make the "lifetime donated" field in your profile visible to everyone instead of just you.', false)}} diff --git a/files/templates/submit.html b/files/templates/submit.html index 2f6c38b5e9..52da2a78ce 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -58,11 +58,8 @@
Toggle preview
- GIF - - - {{macros.file_input('file-upload-submit', False)}} + {{macros.file_input('file-upload-submit', 'post-text')}}
diff --git a/files/templates/userpage/banner.html b/files/templates/userpage/banner.html index 8cf7be98da..eac8132df3 100644 --- a/files/templates/userpage/banner.html +++ b/files/templates/userpage/banner.html @@ -186,9 +186,7 @@ - - - {{macros.file_input('file-upload-macro', False, not get_setting('dm_media'))}} + {{macros.file_input('file-upload-macro', 'input-message', not get_setting('dm_media'))}} @@ -479,9 +477,8 @@
- - {{macros.file_input('file-upload-mobile', True)}} + {{macros.file_input('file-upload-mobile', 'input-message-mobile')}}
diff --git a/files/templates/userpage/userpage.html b/files/templates/userpage/userpage.html index b784879f1c..52acae41ba 100644 --- a/files/templates/userpage/userpage.html +++ b/files/templates/userpage/userpage.html @@ -42,8 +42,9 @@ {% endif %} -{% if v and v.id != u.id and not request.path.endswith('/comments') and not request.path.endswith(u.username) %} +{% if v and v.id != u.id and request.path.endswith('/posts') %} {% include "modals/emoji.html" %} + {% include "modals/gif.html" %} {% endif %} {% endblock %} {% block GIFpicker %}{% endblock %} diff --git a/files/templates/util/macros.html b/files/templates/util/macros.html index b3ea16fcda..56d338b357 100644 --- a/files/templates/util/macros.html +++ b/files/templates/util/macros.html @@ -103,14 +103,20 @@ {% endmacro %} -{% macro file_input(id, image_only, disabled) %} - +{% macro file_input(input_id, textarea_id, disabled) %} +
+ + + + + +
{% endmacro %} -{% macro comment_reply_box(target_fullname, html_id, wrapper_css_classes="", subwrapper_css_classes="", hide="", allow_file_upload=true, enable_cancel_button=true) %} +{% macro comment_reply_box(target_fullname, html_id, wrapper_css_classes="", subwrapper_css_classes="", hide="", enable_cancel_button=true) %}
{% if v %}
@@ -120,17 +126,8 @@
-
- + {{file_input('file-upload-reply-' ~ target_fullname, 'reply-form-body-' ~ target_fullname, False)}} - - - {% if allow_file_upload %} - {{file_input('file-upload-reply-' ~ target_fullname, False)}} - {% endif %} -
{% if enable_cancel_button %}