2.4. Templates

NorthStar makes extensive use of a template system that allows you to specify different template and field sets for different objects. Uses for this include being able to create different templates for Owner object additions. These templates can break owners into different account types (Frame Customer, DSL Customer, etc...) and then specify specific fields for each template.

2.4.1. Accessing the Templates Administration Interface

To access the admin interface for the template system click on the 'Manage Templates' link on the leftmost frame of your NorthStar screen. To be able to access this interface the user must have all the Template, Field, and Regex permissions set in their user profile. For more information on setting permissions refer to the 'Editing a User's Information' section of this guide.

2.4.2. Default Templates

Each object type in NorthStar has a default template associated with it. These templates are used as the default for objects if no template is specified or selected by the user. Default templates can be accessed just like any other template except they cannot be deleted. Fields from the default templates, however, can be added or removed as long as the fields are not in use by ANY objects (basically... once you add a field and add an object that has a value assigned to that field you can't delete it until you go back and remove all values).

2.4.3. Adding New Templates

Adding a new template to the system is fairly simple. You would first access the Template Admin Interface by following the instructions in the section above. You should be presented with a screen that ask's for the object type to view templates for. Select the object type and click the 'View Templates' button. Once the listing comes up click the 'Add Template' link at the top-right of the screen to add a new template. Fill out the name and description of the template and click the add template button. Thats it!!! Well.. not quite. For your template to really be of any use you need to add fields to it.

2.4.3.1. Adding Fields

Now that you have created your new template we need to add fields to it for data input. You should now be able to see the template that you created on the screen. To add a field to the template click the 'Add Field' link that is to the right of your template name.

When presented with the add field form you need to fill out all the form items in the form. Most fields are self-explanatory except for the Regex, Field Type, and Update Mode items. The Regex field selects the regular expression to be used to validate the input of this field (the Regex Admin is discussed in the next section).

The Field Type and Update Mode selections tell the script how to present and handle modifications to the data in a field. The Field Type option controls what type of input box will be presented to the user when they try to add or edit that particular field. The TEXT selection is a normal text box, the PASSWORD selection is a password text box, and the TEXTAREA selection is a multi-column edit box. The two different Update Modes are OVERWRITE and APPEND. The OVERWRITE selection will overwrite the current value for the field when it is changed. The APPEND selection will append the new data onto what was already there.

Once you have finished entering the parameters for the field, click the 'Add Field' button to add it. When the template listing comes up you can now click the folder next to your template name to expand the view and see the fields that are currently assigned to the template. To set the order of the fields in your template refer to the 'Editing Templates' section below.

2.4.3.2. Editing Fields

Editing a fields options can easily be done click clickin the 'Edit' link to the right of the field name. The form is the same as the one used to add new fields and has the current values filled in when it loads. Once you are done making your changes just click the 'Update Field' button and your settings will be saved.

2.4.3.3. Deleting Fields

Deleting fields from a template is currently best to do before anyone has actually added any objects that are using that template/field. To delete a field click the 'Delete' link to the right of it's name and on the confirmation screen click 'Continue' if you really want to delete it. Please note that fields can only be deleted if there are currently NO objects using that field.

2.4.4. Editing Templates

To edit a template click the link labeled 'Edit' next to the template name. Once in the edit form you can change values to meet your needs. You can also set the ordering of the fields within your template from this screen. To do this click the field name in the select box next to the 'Field Ordering' item and then use the 'Move Up' and 'Move Down' buttons to get the field where you want it to be. When your done click the 'Update Template' button to save your changes.

2.4.5. Deleting Templates

Templates can easily be deleting by just clicking the 'Delete' link to the right of their name. In order to delete a template you must make sure no objects are currently using that template. If the template is currently in use by any object the program will give you an error and refuse to delete the template.