source: extensions/File_Uploader/admin/admin_configuration.tpl @ 22116

Last change on this file since 22116 was 19835, checked in by julien1311, 12 years ago

[file_uploader] add Javascript to config tab / change in language string

  • Property svn:eol-style set to LF
File size: 2.9 KB
Line 
1{include file='include/colorbox.inc.tpl'}
2
3{combine_script id='jquery.tokeninput' load='async' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'}
4{footer_script require='jquery.tokeninput'}
5jQuery(document).ready(function() {ldelim}
6        jQuery('select[name="file_uploader_pdf2tab_extensions"]').tokenInput(
7                [{foreach from=$extensions item=extension name=extensions}{ldelim}"{$extension|@escape:'javascript'}"{rdelim}{if !$smarty.foreach.extensions.last},{/if}{/foreach}],
8    {ldelim}
9      hintText: '{'file_uploader_pdf2tab_hint_text'|@translate}',
10      noResultsText: '',
11      searchingText: '',
12      newText: '',
13      animateDropdown: false,
14      preventDuplicates: true,
15      allowCreation: true
16    }
17  );
18
19  jQuery("a.preview-box").colorbox();
20});
21{literal}
22$(document).ready(function(){
23        if ($("#file_uploader_pdf2tab_checkbox").is(":checked")) {
24                        $("#file_uploader_pdf2tab_supported_extensions").css("display","block");
25                        $("#file_uploader_pdf2tab_supported_extensions_description").css("display","block");
26                } else {
27                        $("#file_uploader_pdf2tab_supported_extensions").css("display","none");
28                        $("#file_uploader_pdf2tab_supported_extensions_description").css("display","none");
29                }
30
31        $("#file_uploader_pdf2tab_checkbox").click(function(){
32                if ($("#file_uploader_pdf2tab_checkbox").is(":checked")) {
33                        $("#file_uploader_pdf2tab_supported_extensions").show("fast");
34                        $("#file_uploader_pdf2tab_supported_extensions_description").show("fast");
35                } else {
36                        $("#file_uploader_pdf2tab_supported_extensions").hide("fast");
37                        $("#file_uploader_pdf2tab_supported_extensions_description").hide("fast");
38                }
39        });
40});
41{/literal}
42{/footer_script}
43
44<div class="titrePage">
45  <h2>{'File Uploader Plugin'|@translate}</h2>
46</div>
47
48<form method="post" action="" ENCTYPE="multipart/form-data"> 
49        <fieldset>
50                <legend>{'Configuration'|@translate}</legend>
51                <p>
52                        <label><input type="checkbox" id="file_uploader_pdf2tab_checkbox" name="file_uploader_checkbox[new_tab]" value="1" {$file_uploader_checked.new_tab}> {'Open files in a new tab'|@translate}</label>
53                </p>
54                <p id="file_uploader_pdf2tab_supported_extensions_description">
55                        {'file_uploader_pdf2tab_supported_extensions_description'|@translate}
56                </p>
57                <p id="file_uploader_pdf2tab_supported_extensions">     
58                        <select name="file_uploader_pdf2tab_extensions">
59                                {foreach from=$file_uploader_pdf2tab_extensions item=file_uploader_pdf2tab_extension}
60                                        <option value="{$file_uploader_pdf2tab_extension}" class="selected">{$file_uploader_pdf2tab_extension}</option>
61                                {/foreach}
62                        </select>
63                </p>
64                <p>
65                        <label><input type="checkbox" name="file_uploader_checkbox[overwrite]" value="1" {$file_uploader_checked.overwrite}> {'Overwrite files without notice'|@translate}</label>
66                </p>
67        </fieldset>
68        <p class="file_uploader_center">
69                <input class="submit" type="submit" value="{'Submit'|@translate}" name="submit"/>
70        </p>
71</form>
Note: See TracBrowser for help on using the repository browser.