dokuwiki-plugin-bureaucracy icon indicating copy to clipboard operation
dokuwiki-plugin-bureaucracy copied to clipboard

Feature: chaining form actions

Open dregad opened this issue 8 years ago • 5 comments

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.

dregad avatar Oct 13 '17 16:10 dregad

@splitbrain @Klap-in your feedback would be appreciated.

dregad avatar Nov 05 '17 14:11 dregad

Friendly bump...

dregad avatar Mar 19 '18 10:03 dregad

We always appreciate pull requests, but I can not guarantee that I can have a look at it in a timely manner.

splitbrain avatar Mar 19 '18 10:03 splitbrain

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

dregad avatar Mar 19 '18 11:03 dregad

I'll submit a PR then.

Done

dregad avatar Mar 19 '18 12:03 dregad