Jump to content

Common Add-Row, Edit-Row, Server Management Methods/templates?


Max

Recommended Posts

Trying to write my own module.

Noticed that I can use the convenience class ModuleFields to programmatically build a form for the interface to edit the package properties, without having to bother with .pdt templates.

Which is great.

 

However that does not seems to be the case for the interface to manage servers and server groups.

It seems that currently each module independently has its own add_row.pdt, edit_row.pdt, manage.pdt templates and has to implement manageModule(), manageAddRow(), manageEditRow(), addModuleRow(), editModuleRow(), moduleRowName(), moduleRowNamePlural(), moduleGroupName() and moduleRowMetaKey() methods.

Was wondering if that couldn't be simplified a bit in a future release.

 

It would be nice if for the common case of a module row consisting of a "server hostname/IP" "username" and "password" a module could inherit from a common base class, and only had to provide a function to test the connection details entered.

Link to comment
Share on other sites

This is in theory, but you could use a generic template for both add and edit with just a placeholder variable, then generate the form using ModuleFields, then just push it to the template. Makes it 100% programmatic (sp?). however, now sure how flexible the ModuleFields class is (Not in front of my code atm).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...