~eventum-developers/eventum/trunk

« back to all changes in this revision

Viewing changes to templates/manage/products.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:
2
2
 
3
3
{block "manage_content"}
4
4
 
5
 
{literal}
 
5
 
6
6
<script type="text/javascript">
7
7
    function validateForm()
8
8
    {
9
9
        if (Validation.isFieldWhitespace('title')) {
10
10
            Validation.selectField('title');
11
 
            alert('{/literal}{t escape=js}Please enter the name of this product.{/t}{literal}');
 
11
            alert('{t escape=js}Please enter the name of this product.{/t}');
12
12
            return false;
13
13
        }
14
14
        if (Validation.isFieldWhitespace('rank')) {
15
15
            Validation.selectField('rank');
16
 
            alert('{/literal}{t escape=js}Please enter the rank of this product.{/t}{literal}');
 
16
            alert('{t escape=js}Please enter the rank of this product.{/t}');
17
17
            return false;
18
18
        }
19
19
        return true;
22
22
    function checkDelete()
23
23
    {
24
24
        if (!Validation.hasOneChecked('items[]')) {
25
 
            alert('{/literal}{t escape=js}Please select at least one of the products.{/t}{literal}');
 
25
            alert('{t escape=js}Please select at least one of the products.{/t}');
26
26
            return false;
27
27
        }
28
 
        if (!confirm('{/literal}{t escape=js}WARNING: This action will remove the selected products permanently.{/t}{literal}\n{/literal}{t escape=js}Please click OK to confirm.{/t}{literal}')) {
 
28
        if (!confirm('{t escape=js}WARNING: This action will remove the selected products permanently.{/t}\n{t escape=js}Please click OK to confirm.{/t}')) {
29
29
            return false;
30
30
        } else {
31
31
            return true;
38
38
        $('#product_form').submit(validateForm);
39
39
    });
40
40
</script>
41
 
{/literal}
 
41
 
42
42
<form id="product_form" method="post">
43
43
    {if $smarty.get.cat|default:'' == 'edit'}
44
44
    <input type="hidden" name="cat" value="update">