rolandtoth / AdminOnSteroids

Various ProcessWire admin tweaks to boost productivity.
https://processwire.com/talk/topic/13389-adminonsteroids/
GNU General Public License v2.0
39 stars 10 forks source link

Add an "Add all" link to the allowed templates for parents/children #60

Open gmclelland opened 7 years ago

gmclelland commented 7 years ago

I noticed it gets tedious to have to add all the templates for Allowed template(s) for parents/children before the template is available to use under the "add new" page button.

It would be helpful to have an "Add all" link to quickly add all the templates from the select list. Then you can manually delete the ones you don't want from the list.

edit template activity-type pwoliver dev 2017-10-02 11-13-42

Ideally, it would be nice if the Processwire "Add new" button would automatically allow all new templates by default and only restrict those that have filled out the "allowed templates for parents/children". That way you don't have to configure that for every template.

Toutouwai commented 6 years ago

Is this something you do regularly? I don't see how this approach works, because if you add more than one template as allowed parent then only the first is used with the Add New shortcut. So really you can only have a single template for allowed parent for Add New purposes.

Or am I missing something?

2018-01-18_124647

gmclelland commented 6 years ago

Maybe I'm doing it wrong, but sometimes I can't get my templates to show under the add new button unless I configure the parent and child template settings for each template. This gets tedious for me and that's why I made this feature request.

Instead of selecting each template individually from the dropdown select, I could instead just click an "Add all" link that adds all the select option items to the field and then just trash the ones I don't want. Seems like it would speed up the workflow.

rolandtoth commented 5 years ago

@gmclelland

Is this still a valid request? I found that it's easy to add all options using this:

$('#Inputfield_parentTemplates option').attr('selected', true).parent().trigger('change');

(currently aos.min.js triggers a JS error but it's easy to fix)

What I don't know whether it would be beneficial to add it to all selects or just here or to use a button or something else (eg. a hotkey).