To help clean up some visual clutter, it would be helpful to display file requirements (validations) only when they're needed inside of a popup instead of directly on the page.

CommentFileSizeAuthor
#4 show_file_requirements-2449211-4.patch21.32 KBneardark

Comments

  • markcarver committed ea8825a on 7.x-3.x
    Issue #2449211 by markcarver: Show file requirements in a popup.
    
    A...
markhalliwell’s picture

Version: 7.x-3.x-dev » 8.x-3.x-dev
Assigned: Unassigned » neardark
Status: Active » Patch (to be ported)

@neardark, this will need to be converted to and tested on 8.x.

  • markcarver committed ea8825a on 7.x-4.x
    Issue #2449211 by markcarver: Show file requirements in a popup.
    
    A...
neardark’s picture

Assigned: neardark » Unassigned
Status: Patch (to be ported) » Needs review
StatusFileSize
new21.32 KB

Patch of port for review. Changed some things, so worth a peek.

markhalliwell’s picture

Status: Needs review » Needs work
  1. +++ b/includes/alter.inc
    +++ b/includes/alter.inc
    @@ -267,36 +267,6 @@ function bootstrap_js_alter(&$js) {
    
    @@ -460,3 +430,40 @@ function bootstrap_menu_local_tasks_alter(&$data, &$router_item, $root_path) {
    +function bootstrap_page_attachments_alter(&$variables) {
    

    There's no need to move the JS settings, hook_js_alter() is still a valid alter hook allowed for themes.

  2. +++ b/includes/common.inc
    @@ -1009,3 +1009,62 @@ function _bootstrap_tooltip_description($description) {
    +function _bootstrap_popover_link($link_title, $id, $popover_title, $placement = 'top') {
    ...
    +function _bootstrap_popover_content($id, $content) {
    

    I wouldn't split this functionality out just yet. This is the only place this is using it and until we have more, it makes no sense. If anything we really should create an entirely new theme hook like bootstrap_popup or something, but that's an entirely separate feature.

  3. +++ b/js/core/modules/file/file.js
    index 6ae2704..0000000
    --- a/templates/file/file-managed-file.func.php
    
    +++ b/templates/file/file-upload-help.vars.php
    index 3c72ae4..0000000
    --- a/templates/file/file-widget-multiple.func.php
    
    +++ /dev/null
    index 7fc56f8..0000000
    --- a/templates/file/file-widget.func.php
    

    Are these files really intended to be fully removed? Is there templates that need to be created instead? Having entire files removed at this point isn't recommended unless there is indeed a replacement available, otherwise we risk losing parity (and features) between 7.x-3.x and 8.x-3.x.

neardark’s picture

Re #1:

OK, thanks. I'll re-add in js_alter()

Re #2:

Ah, yes, ok.

Re #3:

Are these files really intended to be fully removed? Is there templates that need to be created instead? Having entire files removed at this point isn't recommended unless there is indeed a replacement available, otherwise we risk losing parity (and features) between 7.x-3.x and 8.x-3.x.

Yes, they should be removed as multi-file widget and file-managed seem to be handled fine with the core preprocess functions. But this probably bears more testing. I'll go back and re-test.

My goal is to retain all features of course. As far is keeping parity across branches that's a bit more difficult, unless I'm not understanding something.

markhalliwell’s picture

Version: 8.x-3.x-dev » 7.x-3.x-dev
Status: Needs work » Closed (fixed)

Not porting this to 8.x (for now).