~eventum-developers/eventum/trunk

« back to all changes in this revision

Viewing changes to templates/manage/users.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:
17
17
    projects[{$smarty.foreach.projects.iteration-1}] = {$prj_id};
18
18
  {/foreach}
19
19
 
20
 
  {literal}
 
20
 
21
21
  function validateForm()
22
22
  {
23
23
      if (Validation.isFieldWhitespace('email')) {
24
 
          alert('{/literal}{t escape=js}Please enter the email of this user.{/t}{literal}');
 
24
          alert('{t escape=js}Please enter the email of this user.{/t}');
25
25
          Validation.selectField('email');
26
26
          return false;
27
27
      }
28
28
      if (!Validation.isEmail(Eventum.getField('email').val())) {
29
 
          alert('{/literal}{t escape=js}Please enter a valid email address.{/t}{literal}');
 
29
          alert('{t escape=js}Please enter a valid email address.{/t}');
30
30
          Validation.selectField('email');
31
31
          return false;
32
32
      }
33
33
      var password = Eventum.getField('password').val();
34
34
      if (Eventum.getField('cat').val() == 'update') {
35
35
          if ((!Validation.isWhitespace(password)) && (password.length < 6)) {
36
 
              alert('{/literal}{t escape=js}Please enter a password of at least 6 characters.{/t}{literal}');
 
36
              alert('{t escape=js}Please enter a password of at least 6 characters.{/t}');
37
37
              Validation.selectField('password');
38
38
              return false;
39
39
          }
40
40
      } else {
41
41
          if ((Validation.isWhitespace(password)) || (password.length < 6)) {
42
 
              alert('{/literal}{t escape=js}Please enter a password of at least 6 characters.{/t}{literal}');
 
42
              alert('{t escape=js}Please enter a password of at least 6 characters.{/t}');
43
43
              Validation.selectField('password');
44
44
              return false;
45
45
          }
46
46
      }
47
47
      if (Validation.isFieldWhitespace('full_name')) {
48
 
          alert('{/literal}{t escape=js}Please enter the full name of this user.{/t}{literal}');
 
48
          alert('{t escape=js}Please enter the full name of this user.{/t}');
49
49
          Validation.selectField('full_name');
50
50
          return false;
51
51
      }
58
58
      var total = Eventum.getField('items[]').length;
59
59
      if (Eventum.getField('status').val() == 'inactive') {
60
60
          if (active_users.length < 2) {
61
 
              alert('{/literal}{t escape=js}You cannot change the status of the only active user left in the system.{/t}{literal}');
 
61
              alert('{t escape=js}You cannot change the status of the only active user left in the system.{/t}');
62
62
              return false;
63
63
          }
64
64
          if (total == total_selected) {
65
 
              alert('{/literal}{t escape=js}You cannot inactivate all of the users in the system.{/t}{literal}');
 
65
              alert('{t escape=js}You cannot inactivate all of the users in the system.{/t}');
66
66
              return false;
67
67
          }
68
68
      }
69
69
      if (!Validation.hasOneChecked('items[]')) {
70
 
          alert('{/literal}{t escape=js}Please select at least one of the users.{/t}{literal}');
 
70
          alert('{t escape=js}Please select at least one of the users.{/t}');
71
71
          return false;
72
72
      }
73
 
      if (!confirm('{/literal}{t escape=js}This action will change the status of the selected users.{/t}{literal}')) {
 
73
      if (!confirm('{t escape=js}This action will change the status of the selected users.{/t}')) {
74
74
          return false;
75
75
      } else {
76
76
          return true;
107
107
      $('#delete_form').submit(checkDelete);
108
108
  });
109
109
 
110
 
  {/literal}
 
110
 
111
111
  //-->
112
112
  </script>
113
113
  <form id="user_form" method="post" action="{$core.rel_url}manage/users.php">