~eventum-developers/eventum/trunk

« back to all changes in this revision

Viewing changes to templates/manage/faq.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:
5
5
  <!--
6
6
  var url = '{$smarty.server.PHP_SELF}';
7
7
  var id = {$smarty.get.id|intval|default:''};
8
 
  {literal}
 
8
 
9
9
  function populateComboBox()
10
10
  {
11
11
      if (id == '') {
19
19
  {
20
20
      if (Eventum.getField('project').val() == -1) {
21
21
          Validation.selectField('project');
22
 
          alert('{/literal}{t escape=js}Please choose the project for this FAQ entry.{/t}{literal}');
 
22
          alert('{t escape=js}Please choose the project for this FAQ entry.{/t}');
23
23
          return false;
24
24
      }
25
25
      var field = Eventum.getField('support_levels[]');
26
26
      if (field.length > 0) {
27
27
          if (!Validation.hasOneSelected('support_levels[]')) {
28
28
              Validation.selectField('support_levels[]');
29
 
              alert('{/literal}{t escape=js}Please assign the appropriate support levels for this FAQ entry.{/t}{literal}');
 
29
              alert('{t escape=js}Please assign the appropriate support levels for this FAQ entry.{/t}');
30
30
              return false;
31
31
          }
32
32
      }
33
33
      var rank = Eventum.getField("rank").val();
34
34
      if (Validation.isWhitespace(rank)) {
35
35
          Validation.selectField('rank');
36
 
          alert('{/literal}{t escape=js}Please enter the rank of this FAQ entry.{/t}{literal}');
 
36
          alert('{t escape=js}Please enter the rank of this FAQ entry.{/t}');
37
37
          return false;
38
38
      }
39
39
      if (!Validation.isNumberOnly(rank)) {
40
40
          Validation.selectField('rank');
41
 
          alert('{/literal}{t escape=js}Please enter a number for the rank of this FAQ entry.{/t}{literal}');
 
41
          alert('{t escape=js}Please enter a number for the rank of this FAQ entry.{/t}');
42
42
          return false;
43
43
      }
44
44
      if (Validation.isFieldWhitespace('title')) {
45
45
          Validation.selectField('title');
46
 
          alert('{/literal}{t escape=js}Please enter the title of this FAQ entry.{/t}{literal}');
 
46
          alert('{t escape=js}Please enter the title of this FAQ entry.{/t}');
47
47
          return false;
48
48
      }
49
49
      if (Validation.isFieldWhitespace('message')) {
50
50
          Validation.selectField('message');
51
 
          alert('{/literal}{t escape=js}Please enter the content of this FAQ entry.{/t}{literal}');
 
51
          alert('{t escape=js}Please enter the content of this FAQ entry.{/t}');
52
52
          return false;
53
53
      }
54
54
      return true;
56
56
  function checkDelete(f)
57
57
  {
58
58
      if (!Validation.hasOneChecked('items[]')) {
59
 
          alert('{/literal}{t escape=js}Please select at least one of the FAQ entries.{/t}{literal}');
 
59
          alert('{t escape=js}Please select at least one of the FAQ entries.{/t}');
60
60
          return false;
61
61
      }
62
 
      if (!confirm('{/literal}{t escape=js}This action will permanently remove the selected FAQ entries.{/t}{literal}')) {
 
62
      if (!confirm('{t escape=js}This action will permanently remove the selected FAQ entries.{/t}')) {
63
63
          return false;
64
64
      } else {
65
65
          return true;
75
75
  });
76
76
  //-->
77
77
  </script>
78
 
  {/literal}
 
78
 
79
79
  <form id="faq_form" method="post">
80
80
  {if $smarty.get.cat|default:'' == 'edit'}
81
81
  <input type="hidden" name="cat" value="update">