~eventum-developers/eventum/trunk

« back to all changes in this revision

Viewing changes to templates/reports/custom_fields_weekly.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:
3
3
{block "title"}Custom Fields Weekly{/block}
4
4
 
5
5
{block "report_content"}
6
 
{literal}
 
6
 
7
7
<script type="text/javascript">
8
8
    <!--
9
9
    function validateForm(f)
10
10
    {
11
11
        if (getSelectedOption(f, 'custom_field') == -1) {
12
12
            selectField(f, 'custom_field');
13
 
            alert('{/literal}{t escape=js}Please select the custom field that you would like to generate a report against.{/t}{literal}');
 
13
            alert('{t escape=js}Please select the custom field that you would like to generate a report against.{/t}');
14
14
            return false;
15
15
        }
16
16
        return true;
17
17
    }
18
18
    //-->
19
19
</script>
20
 
{/literal}
 
20
 
21
21
 
22
22
<form name="custom_fields_report" method="post" onSubmit="return validateForm(this);">
23
23
    <input type="hidden" name="cat" value="generate">
119
119
    {/foreach}
120
120
        {/foreach}
121
121
 
122
 
            {literal}
 
122
 
123
123
            var options_field = document.forms['custom_fields_report'].elements['custom_options[]'];
124
124
            function setOptions(fld_id, auto_select)
125
125
            {
150
150
                    $('#end_row').hide();
151
151
                }
152
152
            }
153
 
            {/literal}
 
153
 
154
154
                changeType('{$report_type}');
155
155
 
156
156
                setOptions('{$custom_field}', false);
157
157
                {if $custom_options|@count > 0}
158
158
                {foreach from=$custom_options key=option_index item=option}
159
 
                {literal}
 
159
 
160
160
                for (var i = 0; i < options_field.options.length; i++) {
161
 
                    if (options_field.options[i].value == {/literal}{$option|json_encode}{literal}) {
 
161
                    if (options_field.options[i].value == {$option|json_encode}) {
162
162
                    options_field.options[i].selected = true;
163
163
                }
164
164
            }
165
 
            {/literal}
 
165
 
166
166
                {/foreach}
167
167
                    {/if}
168
168
</script>