Class: SecretariesHelper

SecretariesHelper

new SecretariesHelper()

This class contains the methods that will be used by the "Secretaries" tab of the page.
Source:

Methods

delete(id)

Delete a secretary record from database.
Parameters:
Name Type Description
id int Record id to be deleted.
Source:

display(secretary)

Display a secretary record into the admin form.
Parameters:
Name Type Description
secretary object Contains the secretary record data.
Source:

filter(key)

Filters secretary records depending a string key.
Parameters:
Name Type Description
key string This is used to filter the secretary records of the database.
Source:

getFilterHtml(secretary) → {string}

Get an secretary row html code that is going to be displayed on the filter results list.
Parameters:
Name Type Description
secretary object Contains the secretary record data.
Source:
Returns:
The html code that represents the record on the filter results list.
Type
string

resetForm()

Resets the admin tab form back to its initial state.
Source:

save(secretary)

Save secretary record to database.
Parameters:
Name Type Description
secretary object Contains the admin record data. If an 'id' value is provided then the update operation is going to be executed.
Source:

validate(secretary) → {bool}

Validates a secretary record.
Parameters:
Name Type Description
secretary object Contains the admin data to be validated.
Source:
Returns:
Returns the validation result.
Type
bool