~eventum-developers/eventum/trunk

« back to all changes in this revision

Viewing changes to templates/manage/email_accounts.tpl.html

  • Committer: Elan Ruusamäe
  • Date: 2015-04-03 17:16:08 UTC
  • Revision ID: glen@delfi.ee-20150403171608-u41tcmt49uayv0g4
discard {literal} from templates

it is rarely needed in Smarty3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
{extends "manage/manage.tpl.html"}
2
2
 
3
 
{block "manage_content"}              {literal}
 
3
{block "manage_content"}
4
4
  <script type="text/javascript">
5
5
  <!--
6
6
  function validateForm()
7
7
  {
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');
12
12
          return false;
13
13
      }
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');
17
17
          return false;
18
18
      }
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');
22
22
          return false;
23
23
      }
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');
28
28
          return false;
29
29
      }
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');
33
33
          return false;
34
34
      }
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');
39
39
          return false;
40
40
      }
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');
44
44
          return false;
45
45
      }
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');
49
49
          return false;
50
50
      }
78
78
  function checkDelete(f)
79
79
  {
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}');
82
82
          return false;
83
83
      }
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}')) {
85
85
          return false;
86
86
      } else {
87
87
          return true;
94
94
  });
95
95
  //-->
96
96
  </script>
97
 
  {/literal}
 
97
 
98
98
  <form id="email_account_form"  method="post">
99
99
  {if $smarty.get.cat|default:'' == 'edit'}
100
100
  <input type="hidden" name="cat" value="update">