~eventum-developers/eventum/trunk

« back to all changes in this revision

Viewing changes to templates/manage/projects.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
3
{block "manage_content"}
4
 
{literal}
 
4
 
5
5
<script type="text/javascript">
6
6
<!--
7
7
function validateForm()
9
9
  checkLeadSelection();
10
10
  if (Validation.isFieldWhitespace('title')) {
11
11
      Validation.selectField('title');
12
 
      alert('{/literal}{t escape=js}Please enter the title of this project.{/t}{literal}');
 
12
      alert('{t escape=js}Please enter the title of this project.{/t}');
13
13
      return false;
14
14
  }
15
15
  if (!Validation.hasOneSelected('users[]')) {
16
16
      Validation.selectField('users[]');
17
 
      alert('{/literal}{t escape=js}Please assign the users for this project.{/t}{literal}');
 
17
      alert('{t escape=js}Please assign the users for this project.{/t}');
18
18
      return false;
19
19
  }
20
20
  if (!Validation.hasOneSelected('statuses[]')) {
21
21
      Validation.selectField('statuses[]');
22
 
      alert('{/literal}{t escape=js}Please assign the statuses for this project.{/t}{literal}');
 
22
      alert('{t escape=js}Please assign the statuses for this project.{/t}');
23
23
      return false;
24
24
  }
25
25
 
26
26
  // the selected initial status should be one of the selected assigned statuses
27
27
  if ($.inArray(Eventum.getField('initial_status').val(), Eventum.getField('statuses[]').val()) == -1) {
28
28
      Validation.selectField('initial_status');
29
 
      alert('{/literal}{t escape=js}Please choose the initial status from one of the assigned statuses of this project.{/t}{literal}');
 
29
      alert('{t escape=js}Please choose the initial status from one of the assigned statuses of this project.{/t}');
30
30
      return false;
31
31
  }
32
32
  if (!Validation.isEmail(Eventum.getField('outgoing_sender_email').val())) {
33
33
      Validation.selectField('outgoing_sender_email');
34
 
      alert('{/literal}{t escape=js}Please enter a valid outgoing sender address for this project.{/t}{literal}');
 
34
      alert('{t escape=js}Please enter a valid outgoing sender address for this project.{/t}');
35
35
      return false;
36
36
  }
37
37
  if (!Validation.isFieldWhitespace('mail_aliases')) {
40
40
      $.each(aliases, function(index) {
41
41
          if (!Validation.isEmail(this)) {
42
42
              Validation.selectField('mail_aliases');
43
 
              alert('{/literal}{t escape=js}Please enter a comma separated list of valid mail address aliases for this project{/t}{literal}');
 
43
              alert('{t escape=js}Please enter a comma separated list of valid mail address aliases for this project{/t}');
44
44
              return_false = true;
45
45
              return false;
46
46
          }
62
62
  var total_selected = $('[name="items[]"]:checked').length;
63
63
  var total = $('[name="items[]"]').length
64
64
  if (total == total_selected) {
65
 
      alert('{/literal}{t escape=js}You cannot remove all of the projects in the system.{/t}{literal}');
 
65
      alert('{t escape=js}You cannot remove all of the projects in the system.{/t}');
66
66
      return false;
67
67
  }
68
68
  if (total_selected == 0) {
69
 
      alert('{/literal}{t escape=js}Please select at least one of the projects.{/t}{literal}');
 
69
      alert('{t escape=js}Please select at least one of the projects.{/t}');
70
70
      return false;
71
71
  }
72
 
  if (!confirm('{/literal}{t escape=js}WARNING: This action will remove the selected projects permanently.{/t}{literal}\n{/literal}{t}It will remove all of its associated entries as well (issues, notes, attachments,\netc), so please click OK to confirm.{/t}{literal}')) {
 
72
  if (!confirm('{t escape=js}WARNING: This action will remove the selected projects permanently.{/t}\n{t}It will remove all of its associated entries as well (issues, notes, attachments,\netc), so please click OK to confirm.{/t}')) {
73
73
      return false;
74
74
  } else {
75
75
      return true;
86
86
});
87
87
//-->
88
88
</script>
89
 
{/literal}
 
89
 
90
90
    <form id="project_form"  method="post">
91
91
    <table class="bordered">
92
92
      {if $smarty.get.cat|default:'' == 'edit'}