dokuwiki-plugin-bureaucracy
dokuwiki-plugin-bureaucracy copied to clipboard
Feature: chaining form actions
After playing around with the script action introduced in the 2017-07-27 release, I thought it would be nice if I could combine the power of the fully custom handlers that it allows, while leveraging the existing, standard functionality provided by the template action.
In other words, I would like to be able to "chain" form actions, i.e. first call a script to pre-process the submitted data, then use template to create a page with modified data.
My use case is that I need to perform manipulation on a user-submitted date, to create a new page in a namespace derived from the date's year, based on a school calendar (August -> July), so 2017-10-13 goes in 2017:2017-10-13, whereas 2017-05-31 should be stored in 2016:2017-5-31)
Unfortunately the plugin currently does not allow this, but it would be quite simple to enable it: passing the $fields parameter by reference, and making the setVal() method public.
Would you guys consider this ? I can submit a pull request if you think this would be a useful feature.
@splitbrain @Klap-in your feedback would be appreciated.
Friendly bump...
We always appreciate pull requests, but I can not guarantee that I can have a look at it in a timely manner.
@splitbrain thanks for the feedback
We always appreciate pull requests
Who doesn't ? :wink:
I asked first, as I wanted you guy's opinion on whether you would find this feature useful, and I didn't want to spend time coding something that would ultimately not be acceptable in the plugin's roadmap... Especially considering that there are nearly 20 pending PR's, most of them without any kind of feedback (including 2 of mine).
I can not guarantee that I can have a look at it in a timely manner.
I understand that, we all have the same problem I guess :sweat:
I'll submit a PR then.
I'll submit a PR then.
Done