source: branches/2.4/plugins/LocalFilesEditor/template/admin.tpl @ 20712

Revision 20712, 4.4 KB checked in by plg, 6 years ago (diff)

bug 2844: increase security on LocalFiles Editor, filter on files to edit.

  • Property svn:eol-style set to LF
Line 
1{combine_script id="codemirror" path="plugins/LocalFilesEditor/codemirror/lib/codemirror.js"}
2{combine_script id="codemirror.xml" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/xml/xml.js"}
3{combine_script id="codemirror.javascript" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/javascript/javascript.js"}
4{combine_script id="codemirror.css" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/css/css.js"}
5{combine_script id="codemirror.clike" require="codemirror" path="plugins/LocalFilesEditor/codemirror/mode/clike/clike.js"}
6{combine_script id="codemirror.htmlmixed" require="codemirror.xml,codemirror.javascript,codemirror.css" path="plugins/LocalFilesEditor/codemirror/mode/htmlmixed/htmlmixed.js"}
7{combine_script id="codemirror.php" require="codemirror.xml,codemirror.javascript,codemirror.css,codemirror.clike" path="plugins/LocalFilesEditor/codemirror/mode/php/php.js"}
8
9{combine_css path="plugins/LocalFilesEditor/codemirror/lib/codemirror.css"}
10{combine_css path="plugins/LocalFilesEditor/codemirror/mode/xml/xml.css"}
11{combine_css path="plugins/LocalFilesEditor/codemirror/mode/javascript/javascript.css"}
12{combine_css path="plugins/LocalFilesEditor/codemirror/mode/css/css.css"}
13{combine_css path="plugins/LocalFilesEditor/codemirror/mode/clike/clike.css"}
14{combine_css path="plugins/LocalFilesEditor/template/locfiledit.css"}
15
16{footer_script}
17if (document.getElementById("text") != null)
18  var editor = CodeMirror.fromTextArea(document.getElementById("text"), {ldelim}
19    matchBrackets: true,
20    mode: "{$CODEMIRROR_MODE}",
21    tabMode: "shift"
22  });
23{/footer_script}
24
25<div class="titrePage">
26  <h2>LocalFiles Editor</h2>
27</div>
28
29<form method="post" class="properties" action="{$F_ACTION}" ENCTYPE="multipart/form-data" name="form">
30
31<div id="LocalFilesEditor">
32
33{if isset($theme)}
34<input type="hidden" value="{$theme}" name="theme">
35{/if}
36
37{if isset($language)}
38<input type="hidden" value="{$language}" name="language">
39{/if}
40
41{if isset($template)}
42<input type="hidden" value="{$template}" name="template">
43{/if}
44
45
46{if isset ($create_tpl)}
47  <table>
48    <tr>
49      <td style="text-align: right;">{'locfiledit_new_filename'|@translate}</td>
50      <td style="text-align: left;"><input type="text" size="55" maxlength="50" value="{$create_tpl.NEW_FILE_NAME}" name="tpl_name"/></td>
51    </tr>
52    <tr>
53      <td style="text-align: right;">{'locfiledit_parent_directory'|@translate}</td>
54      <td style="text-align: left;">{html_options name=tpl_parent options=$create_tpl.PARENT_OPTIONS selected=$create_tpl.PARENT_SELECTED}</td>
55    </tr>
56    <tr>
57      <td style="text-align: right;">{'locfiledit_model'|@translate}</td>
58      <td style="text-align: left;">{html_options name=tpl_model options=$create_tpl.MODEL_OPTIONS selected=$create_tpl.MODEL_SELECTED}</td>
59    </tr>
60  </table>
61<br><br>
62<input class="submit" type="submit" value="{'Submit'|@translate}" name="create_tpl" />
63{/if}
64
65{if isset ($css_lang_tpl)}
66<select name="{$css_lang_tpl.SELECT_NAME}">
67{html_options options=$css_lang_tpl.OPTIONS selected=$css_lang_tpl.SELECTED}
68</select>
69
70<input class="submit" type="submit" value="{'locfiledit_edit'|@translate}" name="edit" />
71<br><br>
72{/if}
73
74{if isset ($css_lang_tpl.NEW_FILE_URL)}
75<span class="{$css_lang_tpl.NEW_FILE_CLASS}">
76<a href="{$css_lang_tpl.NEW_FILE_URL}">{'locfiledit_new_tpl'|@translate}</a>
77</span>
78{/if}
79
80{if isset ($zone_edit)}
81<div id="title_bar">
82{/if}
83
84{if !empty($show_default)}
85{foreach from=$show_default item=file name=default_loop}
86<span class="default_file">
87<a href="{$file.URL}" onclick="window.open( this.href, 'local_file', 'location=no,toolbar=no,menubar=no,status=no,resizable=yes,scrollbars=yes,width=800,height=700' ); return false;">{'locfiledit_show_default'|@translate} "{$file.FILE}"</a>
88</span>
89{if !($smarty.foreach.default_loop.last)}<br>{/if}
90{/foreach}
91{/if}
92
93{if isset ($zone_edit)}
94<span class="file_name">{$zone_edit.FILE_NAME}</span>
95</div> {* title_bar *}
96
97<textarea rows="30" cols="90" name="text" id="text">{$zone_edit.CONTENT_FILE}</textarea>
98<br>
99<input class="submit" type="submit" value="{'locfiledit_save_file'|@translate}" name="submit"/>
100
101{if isset ($restore)}
102<input class="submit" type="submit" value="{'locfiledit_restore'|@translate}" name="restore" onclick="return confirm('{'locfiledit_restore_confirm'|@translate|escape:'javascript'}');"/>
103{/if}
104
105{if isset ($restore_infos)}
106<br><br>
107{'locfiledit_save_bak'|@translate}
108{/if}
109
110{/if} {* zone_edit *}
111</div>
112</form>
Note: See TracBrowser for help on using the repository browser.