Browse Source

Don't include attachments in signature editor. #271

Rafał Pitoń 11 years ago
parent
commit
4e86884bb3
2 changed files with 5 additions and 2 deletions
  1. 3 1
      templates/cranefly/editor.html
  2. 2 1
      templates/cranefly/usercp/signature.html

+ 3 - 1
templates/cranefly/editor.html

@@ -1,4 +1,4 @@
-{% macro editor(field, submit_button, placeholder=None, rows=4, hide_links=False, hide_images=False, hide_hr=False, zen=False, extra=None) %}
+{% macro editor(field, submit_button, placeholder=None, rows=4, hide_links=False, hide_images=False, hide_hr=False, hide_attachments=False, zen=False, extra=None) %}
 <div class="editor editor-editable">
 <div class="editor editor-editable">
   {% if field.errors %}
   {% if field.errors %}
   <div class="editor-error">
   <div class="editor-error">
@@ -30,7 +30,9 @@
     <button name="save" type="submit" class="btn btn-primary pull-right">{{ submit_button }}</button>
     <button name="save" type="submit" class="btn btn-primary pull-right">{{ submit_button }}</button>
     {% if extra %}{{ extra }}{% endif %}
     {% if extra %}{{ extra }}{% endif %}
   </div>
   </div>
+  {% if not hide_attachments %}
   {{ attachments_editor() }}
   {{ attachments_editor() }}
+  {% endif %}
 </div>
 </div>
 {% endmacro %}
 {% endmacro %}
 
 

+ 2 - 1
templates/cranefly/usercp/signature.html

@@ -30,7 +30,8 @@
     {{ editor.editor(form.signature, lang_save_signature(),
     {{ editor.editor(form.signature, lang_save_signature(),
       hide_links=(not acl.usercp.allow_signature_links()),
       hide_links=(not acl.usercp.allow_signature_links()),
       hide_images=(not acl.usercp.allow_signature_images()),
       hide_images=(not acl.usercp.allow_signature_images()),
-      hide_hr=True) }}
+      hide_hr=True,
+      hide_attachments=True,) }}
   </form>
   </form>
 
 
 </div>
 </div>