[4796] | 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 | |
---|
[4739] | 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 | } |
---|
[4811] | 25 | |
---|
| 26 | #batchLink { |
---|
| 27 | text-align:center; |
---|
| 28 | } |
---|
[4739] | 29 | </style> |
---|
| 30 | {/literal} |
---|
| 31 | |
---|
| 32 | <div class="titrePage"> |
---|
| 33 | <h2>{'Upload Form'|@translate}</h2> |
---|
| 34 | </div> |
---|
| 35 | |
---|
[4789] | 36 | {if count($setup_errors) > 0} |
---|
| 37 | <div class="errors"> |
---|
| 38 | <ul> |
---|
| 39 | {foreach from=$setup_errors item=error} |
---|
| 40 | <li>{$error}</li> |
---|
| 41 | {/foreach} |
---|
| 42 | </ul> |
---|
| 43 | </div> |
---|
| 44 | {else} |
---|
[4807] | 45 | |
---|
| 46 | {if !empty($thumbnails)} |
---|
| 47 | <fieldset> |
---|
| 48 | <legend>{'Uploaded Photos'|@translate}</legend> |
---|
| 49 | <div> |
---|
| 50 | {foreach from=$thumbnails item=thumbnail} |
---|
| 51 | <a href="{$thumbnail.link}" onclick="window.open(this.href); return false;"> |
---|
| 52 | <img src="{$thumbnail.src}" alt="{$thumbnail.file}" title="{$thumbnail.title}" class="thumbnail"> |
---|
| 53 | </a> |
---|
| 54 | {/foreach} |
---|
| 55 | </div> |
---|
[4811] | 56 | <p id="batchLink"><a href="{$batch_link}">{$batch_label}</a></p> |
---|
[4807] | 57 | </fieldset> |
---|
| 58 | {/if} |
---|
| 59 | |
---|
| 60 | |
---|
[4739] | 61 | <form enctype="multipart/form-data" method="post" action="{$F_ACTION}" class="properties"> |
---|
| 62 | <fieldset> |
---|
| 63 | <legend>{'Upload Photos'|@translate}</legend> |
---|
| 64 | |
---|
| 65 | <table> |
---|
| 66 | <tr> |
---|
[4805] | 67 | <th>{'Drop into category'|@translate}</th> |
---|
[4739] | 68 | <td> |
---|
[4796] | 69 | <label><input type="radio" name="category_type" value="existing" checked="checked"> {'existing category'|@translate}</label> |
---|
| 70 | <label><input type="radio" name="category_type" value="new"> {'create a new category'|@translate}</label> |
---|
| 71 | |
---|
| 72 | <div id="category_type_existing"> |
---|
| 73 | <select class="categoryDropDown" name="category"> |
---|
| 74 | {html_options options=$category_options} |
---|
| 75 | </select> |
---|
| 76 | </div> |
---|
| 77 | |
---|
| 78 | <div id="category_type_new" style="display:none"> |
---|
| 79 | <table> |
---|
| 80 | <tr> |
---|
| 81 | <td>{'Parent category'|@translate}</td> |
---|
| 82 | <td> |
---|
| 83 | <select class="categoryDropDown" name="category_parent"> |
---|
| 84 | <option value="0">------------</option> |
---|
| 85 | {html_options options=$category_options} |
---|
| 86 | </select> |
---|
| 87 | </td> |
---|
| 88 | </tr> |
---|
| 89 | <tr> |
---|
| 90 | <td>{'Category name'|@translate}</td> |
---|
| 91 | <td> |
---|
| 92 | <input type="text" name="category_name" value="{$F_CATEGORY_NAME}" |
---|
| 93 | </td> |
---|
| 94 | </tr> |
---|
| 95 | </table> |
---|
| 96 | </div> |
---|
| 97 | |
---|
[4739] | 98 | </td> |
---|
| 99 | </tr> |
---|
| 100 | |
---|
| 101 | <tr> |
---|
[4805] | 102 | <th>{'Minimum privacy level'|@translate}</th> |
---|
| 103 | <td> |
---|
| 104 | <select name="level" size="1"> |
---|
| 105 | {html_options options=$level_options selected=$level_options_selected} |
---|
| 106 | </select> |
---|
| 107 | </td> |
---|
| 108 | </tr> |
---|
| 109 | |
---|
| 110 | <tr> |
---|
[4739] | 111 | <td colspan="2"> |
---|
| 112 | <div id="uploadBoxes"> |
---|
| 113 | <p><input class="file" type="file" size="70" name="image_upload[]" /></p> |
---|
| 114 | </div> |
---|
| 115 | <div id="addUploadBox"> |
---|
[4740] | 116 | <a href="javascript: UpdateUploadSlots()">{'+ Add an upload box'|@translate}</a> |
---|
[4739] | 117 | </div> |
---|
| 118 | </td> |
---|
| 119 | </tr> |
---|
| 120 | |
---|
| 121 | </table> |
---|
| 122 | |
---|
| 123 | <p> |
---|
| 124 | <input class="submit" type="submit" name="submit_upload" value="{'Upload'|@translate}" {$TAG_INPUT_ENABLED}/> |
---|
| 125 | </p> |
---|
| 126 | </fieldset> |
---|
| 127 | </form> |
---|
[4789] | 128 | {/if} |
---|