1
1
{extends "manage/manage.tpl.html"}
3
{block "manage_content"} {literal}
3
{block "manage_content"}
4
4
<script type="text/javascript">
6
6
function validateForm()
8
8
var f = $('#email_account_form');
9
9
if (f.find('[name=project]').val() == -1) {
10
alert('{/literal}{t escape=js}Please choose the project to be associated with this email account.{/t}{literal}');
10
alert('{t escape=js}Please choose the project to be associated with this email account.{/t}');
11
11
Validation.selectField('project');
14
14
if (f.find('[name=type]').val() == -1) {
15
alert('{/literal}{t escape=js}Please choose the type of email server to be associated with this email account.{/t}{literal}');
15
alert('{t escape=js}Please choose the type of email server to be associated with this email account.{/t}');
16
16
Validation.selectField('type');
19
19
if (Validation.isFieldWhitespace('hostname')) {
20
alert('{/literal}{t escape=js}Please enter the hostname for this email account.{/t}{literal}');
20
alert('{t escape=js}Please enter the hostname for this email account.{/t}');
21
21
Validation.selectField('hostname');
24
24
var port_val = f.find('[name=port]').val();
25
25
if (Validation.isWhitespace(port_val)) {
26
alert('{/literal}{t escape=js}Please enter the port number for this email account.{/t}{literal}');
26
alert('{t escape=js}Please enter the port number for this email account.{/t}');
27
27
Validation.selectField('port');
30
30
if (!Validation.isNumberOnly(port_val)) {
31
alert('{/literal}{t escape=js}Please enter a valid port number for this email account.{/t}{literal}');
31
alert('{t escape=js}Please enter a valid port number for this email account.{/t}');
32
32
Validation.selectField('port');
35
35
var server_type = f.find('[name=type]').val();
36
36
if ((server_type.indexOf('imap') != -1) && (Validation.isFieldWhitespace('folder'))) {
37
alert('{/literal}{t escape=js}Please enter the IMAP folder for this email account.{/t}{literal}');
37
alert('{t escape=js}Please enter the IMAP folder for this email account.{/t}');
38
38
Validation.selectField('folder');
41
41
if (Validation.isFieldWhitespace('username')) {
42
alert('{/literal}{t escape=js}Please enter the username for this email account.{/t}{literal}');
42
alert('{t escape=js}Please enter the username for this email account.{/t}');
43
43
Validation.selectField('username');
46
46
if (Validation.isFieldWhitespace('password')) {
47
alert('{/literal}{t escape=js}Please enter the password for this email account.{/t}{literal}');
47
alert('{t escape=js}Please enter the password for this email account.{/t}');
48
48
Validation.selectField('password');
78
78
function checkDelete(f)
80
80
if (!Validation.hasOneChecked('items[]')) {
81
alert('{/literal}{t escape=js}Please select at least one of the accounts.{/t}{literal}');
81
alert('{t escape=js}Please select at least one of the accounts.{/t}');
84
if (!confirm('{/literal}{t escape=js}This action will remove the selected entries.{/t}{literal}')) {
84
if (!confirm('{t escape=js}This action will remove the selected entries.{/t}')) {