1 |
|
2 |
[% c.prototype.form_remote_tag( |
3 |
url => base _ 'editor/template', |
4 |
update => 'div_template_status', |
5 |
loading => 'show_working();', |
6 |
loaded => 'reload_rec(); hide_working();', |
7 |
html_options => { |
8 |
name => 'form_editor_css', |
9 |
} |
10 |
) %] |
11 |
<div id="div_template_form"> |
12 |
|
13 |
<script type="text/javascript">edToolbar();</script> |
14 |
|
15 |
<form name="form_editor_template" action="[% base %]" method="post"> |
16 |
|
17 |
<div id="template_content_toolbar"> |
18 |
<span class="notice">...not changed yet...</span> |
19 |
</div> |
20 |
|
21 |
<textarea name="template_content" id="template_content" cols="80" rows="10" |
22 |
onkeydown="return edTab(event);" |
23 |
onfocus="return edFocus('template_content');" |
24 |
onblur="_ts('not saved'); return edBlur();" |
25 |
> |
26 |
[% template_content %] |
27 |
</textarea> |
28 |
|
29 |
<div class="edit_bar"> |
30 |
|
31 |
<input type="submit" name="save_template" value="Save" /> |
32 |
<span id="div_template_status" class="notice">idle</span> |
33 |
|
34 |
<input type="hidden" name="template_filename" value="[% template_filename %]" /> |
35 |
|
36 |
</div> |
37 |
|
38 |
</form> |
39 |
|
40 |
</div> |
41 |
|
42 |
<div id="div_template_list"> |
43 |
|
44 |
Templates: |
45 |
|
46 |
<ul> |
47 |
[% FOREACH t IN template_list %] |
48 |
[% IF t == template_filename %] |
49 |
<li id="template_list_selected">[% t %]</li> |
50 |
[% ELSE %] |
51 |
<li><a href="#" onclick="return switch_template('[% t %]');">[% t %]</a></li> |
52 |
[% END %] |
53 |
[% END %] |
54 |
</ul> |
55 |
|
56 |
</div> |