lolautruche/SQLIImport — pull request #6 by bchoquet-heliopsis (2012-04-03 16:49:32+00:00)
Title: Options GUI

At last, a long time discussed pull request :)

I tried to make it as simple as possible :

* each handler's options are defined in sqliimport.ini.append.php
* on handler selection in admin interface, an AJAX request is made returning an HTML form for handler options
* form is generated by loading a subtemplate for each option according to its type
* each subtemplate is responsible for adding a form field named `ImportOptions[
]` whose value will be stored in database

NB : there is no server side validation for options input but there wasn't either in the textarea version

For complex option input, one can define a YUI3 module to manage his needs and fill in a hidden input field with the computed value. A boilerplate for such a module can be seen in `design/admin/javascript/sqliimportsampleoptionmodule.js`.

Finally, I added a file option type enabling file upload, validation and storage.

I reckon the code is well commented enough, tell me if you need any more details