~eventum-developers/eventum/trunk

« back to all changes in this revision

Viewing changes to templates/reports/custom_fields.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:
4
4
 
5
5
{block "report_content"}
6
6
<br />
7
 
{literal}
 
7
 
8
8
<script type="text/javascript">
9
9
<!--
10
10
function validateForm(f)
11
11
{
12
12
    if (getSelectedOption(f, 'custom_field') == -1) {
13
13
        selectField(f, 'custom_field');
14
 
        alert('{/literal}{t escape=js}Please select the custom field that you would like to generate a report against.{/t}{literal}');
 
14
        alert('{t escape=js}Please select the custom field that you would like to generate a report against.{/t}');
15
15
        return false;
16
16
    }
17
17
    return true;
18
18
}
19
19
//-->
20
20
</script>
21
 
{/literal}
 
21
 
22
22
<form name="custom_fields_report" method="get" onSubmit="return validateForm(this);">
23
23
<input type="hidden" name="cat" value="generate">
24
24
      <table class="bordered filters">
140
140
    {/foreach}
141
141
{/foreach}
142
142
 
143
 
{literal}
 
143
 
144
144
var options_field = document.forms['custom_fields_report'].elements['custom_options[]'];
145
145
function setOptions(fld_id, auto_select)
146
146
{
160
160
        }
161
161
    }
162
162
}
163
 
{/literal}
 
163
 
164
164
 
165
165
setOptions('{$custom_field}', false);
166
166
{if $custom_options|@count > 0}
167
167
    {foreach from=$custom_options key=option_index item=option}
168
 
      {literal}
 
168
 
169
169
      for (var i = 0; i < options_field.options.length; i++) {
170
 
        if (options_field.options[i].value == '{/literal}{$option}{literal}') {
 
170
        if (options_field.options[i].value == '{$option}') {
171
171
          options_field.options[i].selected = true;
172
172
        }
173
173
      }
174
 
      {/literal}
 
174
 
175
175
    {/foreach}
176
176
{/if}
177
177
</script>