Adding Forms and Fields: Difference between revisions

From IHRIS Wiki
No edit summary
Line 3: Line 3:
== Step 1: Create the module ==
== Step 1: Create the module ==


Change into your site's modules directory and create a new directory called ProfDevelopment and change into this directory.  Create and edit a new file called ProfDevelopment.xml with the following contents:
Change into your site's modules directory and create a new directory called ProfDevelopment and change into this directory.  Create lib and templates directory in the module directory.  Create and edit a new file called ProfDevelopment.xml with the following contents:


<source lang="xml">
<source lang="xml">
Line 10: Line 10:
<I2CEConfiguration name="ProfDevelopment">
<I2CEConfiguration name="ProfDevelopment">
</I2CEConfiguration>
</I2CEConfiguration>
</source>
== Step 2: Modify the View Page ==
Copy the Manage view page from the ihris-manage lib directory (iHRIS_PageViewManage.php) to the module lib directory and rename it iHRIS_PageViewManagePD.php.  Modify the list of child forms to include person_profdev and person_continuous_profdev.
Copy the view.html template file from the ihris-manage templates directory to the module templates directory.  Make the following changes:
Copy the menu_view_person.html template file from the ihris-manage templates directory to the module templates directory.  Make the following changes:
== Step 3: Add in the Professional Development templates ==
In the templates directory create the following files and contents:
== Step 4: Enable the module in the site config file ==
Edit your site configuration file and add in the following line:
<source lang="xml">
<enable name="ProfDevelopment" />
</enable>
</source>
</source>

Revision as of 15:57, 14 February 2009

This will describe how to add a new module to iHRIS Manage to add in two new forms for tracking Professional Development for an employee. These instructions could be modified for iHRIS Qualify with a few minor changes.

Step 1: Create the module

Change into your site's modules directory and create a new directory called ProfDevelopment and change into this directory. Create lib and templates directory in the module directory. Create and edit a new file called ProfDevelopment.xml with the following contents:

<source lang="xml"> <?xml version="1.0"?> <!DOCTYPE I2CEConfiguration SYSTEM "I2CE_Configuration.dtd"> <I2CEConfiguration name="ProfDevelopment"> </I2CEConfiguration> </source>


Step 2: Modify the View Page

Copy the Manage view page from the ihris-manage lib directory (iHRIS_PageViewManage.php) to the module lib directory and rename it iHRIS_PageViewManagePD.php. Modify the list of child forms to include person_profdev and person_continuous_profdev.

Copy the view.html template file from the ihris-manage templates directory to the module templates directory. Make the following changes:

Copy the menu_view_person.html template file from the ihris-manage templates directory to the module templates directory. Make the following changes:

Step 3: Add in the Professional Development templates

In the templates directory create the following files and contents:

Step 4: Enable the module in the site config file

Edit your site configuration file and add in the following line:

<source lang="xml"> <enable name="ProfDevelopment" /> </enable> </source>