modified database upgrade script to include new permissions
fixed events add/edit javascript

When the user switches the event tempalate type to survey the
email reminder frequency field disappears. The reason was the
field uses radio buttons. All radio button fields disappear when
the template type is changed to survey.

I've fixed it by adding an id to the email reminder field to
differentiate between the other radio fields and it. Now the field
is shown at all times.
fixed emailer ajax search

The emailer only has one field that we can search by entering
a value in the textfield, which is the subject field. However
when we enter any partial parts of the subject line to the field
no email schedules are returned. When we enter an id (eg. 1),
however, we get one email schedule returned.

The reason that the emailer searh is using the email schedule id
instead of the subject field was because the searchBy value set
in the emailer controller was set to the id instead of subject.
This has now been changed.