Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When domain access settings are displayed in a vertical tab on the node edit form, the tab does not have a summary.
I think some useful information could be displayed in the tab summary, e.g.
- All affiliates - when all affiliates is checked, regardless of remaining settings,
- No affiliates - when all checkboxes are unchecked,
- sub1.example.com - where exactly one domain is checked, and all-affiliates is unchecked,
- 3 affiliates - multiple checkboxes are set, and all-affiliates is unchecked.
Patch to follow.
Comment | File | Size | Author |
---|---|---|---|
#3 | domain-vertical-tab-summary-2020611-3.patch | 3.46 KB | justanothermark |
#3 | interdiff.txt | 2.28 KB | justanothermark |
#1 | domain-vertical-tab-summary-2020611-1.patch | 3.05 KB | andrewmacpherson |
#1 | domain-vertical-tab-summary_all.png | 27.97 KB | andrewmacpherson |
#1 | domain-vertical-tab-summary_none.png | 27.87 KB | andrewmacpherson |
Comments
Comment #1
andrewmacpherson CreditAttribution: andrewmacpherson commentedThis patch does the following:
Comment #2
agentrickardYes please. Can we get a review or two?
Comment #3
justanothermark CreditAttribution: justanothermark commentedThe patch looks good except when the 'Domain selection format' (bottom of admin/structure/domain/settings) is set to select list rather than checkboxes.
I'm not sure if passing the value through Drupal.settings is the best way to handle this but the attached patch works whether checkboxes or a select list are used so should help us get to a final patch.
Comment #4
andrewmacpherson CreditAttribution: andrewmacpherson commentedThanks Mark, I'll have a more detailed look at this tonight.
Comment #6
agentrickardCommitted.
Comment #8
sepapp2 CreditAttribution: sepapp2 commentedIf a user does not have access to all domains, and is not given the permission level to "Set domain access status for all content" then edit pages are giving the error message "Cannot read property 'fieldType' of undefined in relation to this line:
var fieldTypeSelector = (Drupal.settings.domain.fieldType == 0) ? ':checked' : ':selected';
If you give the user that permission level the vertical tab renders out without an error, but it gives them access to all domains and not just what they are assigned too.
Comment #9
agentrickard