3
3
{block "title"}Eventum Installation{/block}
5
5
{block name="content"}
7
7
<script type="text/javascript">
9
9
function validateForm(f)
11
11
if (Validation.isFieldWhitespace('hostname')) {
12
12
Validation.selectField('hostname');
13
alert('{/literal}{t escape=js}Please enter the hostname for the server of this installation of Eventum.{/t}{literal}');
13
alert('{t escape=js}Please enter the hostname for the server of this installation of Eventum.{/t}');
16
16
if (Validation.isFieldWhitespace('relative_url')) {
17
17
Validation.selectField('relative_url');
18
alert('{/literal}{t escape=js}Please enter the relative URL of this installation of Eventum.{/t}{literal}');
18
alert('{t escape=js}Please enter the relative URL of this installation of Eventum.{/t}');
21
21
if (Validation.isFieldWhitespace('db_hostname')) {
22
22
Validation.selectField('db_hostname');
23
alert('{/literal}{t escape=js}Please enter the database hostname for this installation of Eventum.{/t}{literal}');
23
alert('{t escape=js}Please enter the database hostname for this installation of Eventum.{/t}');
26
26
if (Validation.isFieldWhitespace('db_name')) {
27
27
Validation.selectField('db_name');
28
alert('{/literal}{t escape=js}Please enter the database name for this installation of Eventum.{/t}{literal}');
28
alert('{t escape=js}Please enter the database name for this installation of Eventum.{/t}');
31
31
if (Validation.isFieldWhitespace('db_username')) {
32
32
Validation.selectField('db_username');
33
alert('{/literal}{t escape=js}Please enter the database username for this installation of Eventum.{/t}{literal}');
33
alert('{t escape=js}Please enter the database username for this installation of Eventum.{/t}');
36
36
if (Eventum.getField('alternate_user').is(':checked')) {
37
37
if (Validation.isFieldWhitespace('eventum_user')) {
38
38
Validation.selectField('eventum_user');
39
alert('{/literal}{t escape=js}Please enter the alternate username for this installation of Eventum.{/t}{literal}');
39
alert('{t escape=js}Please enter the alternate username for this installation of Eventum.{/t}');
44
44
var field = Eventum.getField('setup[smtp][from]');
45
45
if (Validation.isFieldWhitespace(field)) {
46
46
Validation.selectField(field);
47
alert('{/literal}{t escape=js}Please enter the sender address that will be used for all outgoing notification emails.{/t}{literal}');
47
alert('{t escape=js}Please enter the sender address that will be used for all outgoing notification emails.{/t}');
50
50
if (!Validation.isEmail(field.val())) {
51
51
Validation.selectField(field);
52
alert('{/literal}{t escape=js}Please enter a valid email address for the sender address.{/t}{literal}');
52
alert('{t escape=js}Please enter a valid email address for the sender address.{/t}');
55
55
field = Eventum.getField('setup[smtp][host]');
56
56
if (Validation.isWhitespace(field)) {
57
57
Validation.selectField(field);
58
alert('{/literal}{t escape=js}Please enter the SMTP server hostname.{/t}{literal}');
58
alert('{t escape=js}Please enter the SMTP server hostname.{/t}');
61
61
field = Eventum.getField('setup[smtp][port]');
62
62
if ((Validation.isFieldWhitespace(field)) || (!Validation.isNumberOnly(field.val()))) {
63
63
Validation.selectField(field);
64
alert('{/literal}{t escape=js}Please enter the SMTP server port number.{/t}{literal}');
64
alert('{t escape=js}Please enter the SMTP server port number.{/t}');
67
67
var auth_field = Eventum.getField('setup[smtp][auth]');
68
68
if (!Validation.hasOneChecked(auth_field)) {
69
alert('{/literal}{t escape=js}Please indicate whether the SMTP server requires authentication or not.{/t}{literal}');
69
alert('{t escape=js}Please indicate whether the SMTP server requires authentication or not.{/t}');
72
72
if (auth_field.val() == 1) {
73
73
if (Validation.isFieldWhitespace('setup[smtp][username]')) {
74
74
Validation.selectField('setup[smtp][username]');
75
alert('{/literal}{t escape=js}Please enter the SMTP server username.{/t}{literal}');
75
alert('{t escape=js}Please enter the SMTP server username.{/t}');
78
78
if (Validation.isFieldWhitespace('setup[smtp][password]')) {
79
79
Validation.selectField('setup[smtp][password]');
80
alert('{/literal}{t escape=js}Please enter the SMTP server password.{/t}{literal}');
80
alert('{t escape=js}Please enter the SMTP server password.{/t}');