Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gmclelland opened this issue Oct 2, 2017 · 3 comments
Open

Comments

@gmclelland
Copy link
Contributor

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
Copy link

Toutouwai commented Jan 17, 2018

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
Copy link
Contributor Author

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
Copy link
Owner

rolandtoth commented Feb 21, 2019

@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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants