From: marty l. <mal...@gm...> - 2014-04-12 19:34:58
|
1) can "webmin accounts" be involved in the module configuration. i.e. can "some accounts" which can run the module be selected to "edit" the configuration. Can this be on an "option by option" basis? 2) Are there hooks to having a "parser" when free-form text is submitted (i.e. if you want a "number" between 10 and 100, something which "confirms" the text field is a number and within bounds (i.e. after a submittal, a way to run a parser function) 3) Is there a way to hook a function after the module editor is "completed" so "something knows" editing has taken place (before the actions on the module are run?) Any examples which accomplish this (possibly in alternate ways) would be appreciated. I'm thinking of having the "editor" as a webmin action so I can control it. marty |
From: Jamie C. <jca...@we...> - 2014-04-13 23:00:02
|
On 12/Apr/2014 12:34 marty leisner <mal...@gm...> wrote .. > 1) can "webmin accounts" be involved in the module configuration. > i.e. can "some accounts" which can run the module be selected to "edit" the > configuration. > Can this be on an "option by option" basis? Yes, you can control on a per-user per-module basis. In the Webmin Users module you can click on a user and then on a module name (to bring up the detailed access control page), and at the top there will be a setting to determine if the Module Config page is available or not. > 2) Are there hooks to having a "parser" when free-form text is submitted > (i.e. if you want a "number" between 10 and 100, something which "confirms" > the text field is a number and within bounds (i.e. after a submittal, a way > to run a parser function) Yes - you can create a config_info.pl file in your module, which defines functions to show and validate a config field define in config.info. See the standard "mysql" module for an example. > 3) Is there a way to hook a function after the module editor is "completed" > so "something knows" > editing has taken place (before the actions on the module are run?) > > Any examples which accomplish this (possibly in alternate ways) would be > appreciated. > > I'm thinking of having the "editor" as a webmin action so I can control it. I'm not quite sure what you mean here, sorry. - Jamie |
From: marty l. <mal...@gm...> - 2014-04-14 20:27:17
|
On Sun, Apr 13, 2014 at 6:59 PM, Jamie Cameron <jca...@we...> wrote: > On 12/Apr/2014 12:34 marty leisner <mal...@gm...> wrote .. > .... > > 3) Is there a way to hook a function after the module editor is > "completed" > > so "something knows" > > editing has taken place (before the actions on the module are run?) > > > > Any examples which accomplish this (possibly in alternate ways) would be > > appreciated. > > > > I'm thinking of having the "editor" as a webmin action so I can control > it. > > I'm not quite sure what you mean here, sorry. > > - Jamie > > Thanks for all the help... Is there a way to run a function after the editing has been completed? (i.e. if we have to "do certain things" before displaying the webmin module controls)? marty |
From: Jamie C. <jca...@we...> - 2014-04-14 22:43:30
|
On 14/Apr/2014 13:26 marty leisner <mal...@gm...> wrote .. > On Sun, Apr 13, 2014 at 6:59 PM, Jamie Cameron <jca...@we...> wrote: > > > On 12/Apr/2014 12:34 marty leisner <mal...@gm...> wrote .. > > > > > 3) Is there a way to hook a function after the module editor is > > "completed" > > > so "something knows" > > > editing has taken place (before the actions on the module are run?) > > > > > > Any examples which accomplish this (possibly in alternate ways) would be > > > appreciated. > > > > > > I'm thinking of having the "editor" as a webmin action so I can control > > it. > > > > I'm not quite sure what you mean here, sorry. > > > > - Jamie > > > > > Thanks for all the help... > > Is there a way to run a function after the editing has been completed? > > (i.e. if we have to "do certain things" before displaying the webmin module > controls)? Yes, in your module's config_info.pl file you can define a function called config_post_save that will be called after the config is saved. |