1 | {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} |
---|
2 | |
---|
3 | {literal} |
---|
4 | <script> |
---|
5 | $(document).ready(function(){ |
---|
6 | |
---|
7 | $("input[name=category_type]").click(function () { |
---|
8 | $("[id^=category_type_]").hide(); |
---|
9 | $("#category_type_"+$(this).attr("value")).show(); |
---|
10 | }); |
---|
11 | |
---|
12 | }); |
---|
13 | </script> |
---|
14 | {/literal} |
---|
15 | |
---|
16 | <script type="text/javascript" src="{$plugin_path}/include/upload.js"></script> |
---|
17 | |
---|
18 | {literal} |
---|
19 | <style> |
---|
20 | #uploadBoxes P { |
---|
21 | margin:0; |
---|
22 | margin-bottom:2px; |
---|
23 | padding:0; |
---|
24 | } |
---|
25 | </style> |
---|
26 | {/literal} |
---|
27 | |
---|
28 | <div class="titrePage"> |
---|
29 | <h2>{'Upload Form'|@translate}</h2> |
---|
30 | </div> |
---|
31 | |
---|
32 | {if count($setup_errors) > 0} |
---|
33 | <div class="errors"> |
---|
34 | <ul> |
---|
35 | {foreach from=$setup_errors item=error} |
---|
36 | <li>{$error}</li> |
---|
37 | {/foreach} |
---|
38 | </ul> |
---|
39 | </div> |
---|
40 | {else} |
---|
41 | <form enctype="multipart/form-data" method="post" action="{$F_ACTION}" class="properties"> |
---|
42 | <fieldset> |
---|
43 | <legend>{'Upload Photos'|@translate}</legend> |
---|
44 | |
---|
45 | <table> |
---|
46 | <tr> |
---|
47 | <th>{'Drop into category'|@translate}</th> |
---|
48 | <td> |
---|
49 | <label><input type="radio" name="category_type" value="existing" checked="checked"> {'existing category'|@translate}</label> |
---|
50 | <label><input type="radio" name="category_type" value="new"> {'create a new category'|@translate}</label> |
---|
51 | |
---|
52 | <div id="category_type_existing"> |
---|
53 | <select class="categoryDropDown" name="category"> |
---|
54 | {html_options options=$category_options} |
---|
55 | </select> |
---|
56 | </div> |
---|
57 | |
---|
58 | <div id="category_type_new" style="display:none"> |
---|
59 | <table> |
---|
60 | <tr> |
---|
61 | <td>{'Parent category'|@translate}</td> |
---|
62 | <td> |
---|
63 | <select class="categoryDropDown" name="category_parent"> |
---|
64 | <option value="0">------------</option> |
---|
65 | {html_options options=$category_options} |
---|
66 | </select> |
---|
67 | </td> |
---|
68 | </tr> |
---|
69 | <tr> |
---|
70 | <td>{'Category name'|@translate}</td> |
---|
71 | <td> |
---|
72 | <input type="text" name="category_name" value="{$F_CATEGORY_NAME}" |
---|
73 | </td> |
---|
74 | </tr> |
---|
75 | </table> |
---|
76 | </div> |
---|
77 | |
---|
78 | </td> |
---|
79 | </tr> |
---|
80 | |
---|
81 | <tr> |
---|
82 | <th>{'Minimum privacy level'|@translate}</th> |
---|
83 | <td> |
---|
84 | <select name="level" size="1"> |
---|
85 | {html_options options=$level_options selected=$level_options_selected} |
---|
86 | </select> |
---|
87 | </td> |
---|
88 | </tr> |
---|
89 | |
---|
90 | <tr> |
---|
91 | <td colspan="2"> |
---|
92 | <div id="uploadBoxes"> |
---|
93 | <p><input class="file" type="file" size="70" name="image_upload[]" /></p> |
---|
94 | </div> |
---|
95 | <div id="addUploadBox"> |
---|
96 | <a href="javascript: UpdateUploadSlots()">{'+ Add an upload box'|@translate}</a> |
---|
97 | </div> |
---|
98 | </td> |
---|
99 | </tr> |
---|
100 | |
---|
101 | </table> |
---|
102 | |
---|
103 | <p> |
---|
104 | <input class="submit" type="submit" name="submit_upload" value="{'Upload'|@translate}" {$TAG_INPUT_ENABLED}/> |
---|
105 | </p> |
---|
106 | </fieldset> |
---|
107 | </form> |
---|
108 | {/if} |
---|