source: spip-zone/_plugins_/uploadhtml5/trunk/formulaires/uploadhtml5.html @ 90048

Last change on this file since 90048 was 90048, checked in by marcimat@…, 6 years ago

Grammaire de commentaire

File size: 1.5 KB
Line 
1<div class="formulaire_spip formulaire_#FORM">
2
3  [<p class="reponse_formulaire reponse_formulaire_erreur">
4    (#ENV*{message_erreur})
5  </p>]
6  [<p class="reponse_formulaire reponse_formulaire_ok">
7    (#ENV*{message_ok})
8  </p>]
9
10  [(#EDITABLE|oui)
11  <form action="#ENV{action}" method="post" class="dropzone" id="dropzonespip">
12    #ACTION_FORMULAIRE{#ENV{action}}
13    <div class="fallback">
14      <input name="file" type="file" multiple />
15    </div>
16  </form>
17
18  <script type="text/javascript">
19     var options = {
20       paramName: 'file',
21       maxFilesize: #CONFIG{uploadhtml5/max_file_size},
22       maxFiles: [(#CONFIG{uploadhtml5/max_file}|>{0}|?{
23         #CONFIG{uploadhtml5/max_file},
24         null})],
25
26       [(#REM|test_espace_prive|oui)
27           success: function(file, response) {
28             ajaxReload("documents");
29           },
30       ]
31
32       // Traduire dropzone
33       dictDefaultMessage: "<:uploadhtml5:drop_ici:>",
34       dictFallbackMessage: "<:uploadhtml5:drop_no_support:>",
35       dictFallbackText: "<:uploadhtml5:drop_fallbacktext:>",
36       dictInvalidFileType: "<:uploadhtml5:drop_fichier_invalide:>",
37       dictFileTooBig: "<:uploadhtml5:drop_fichier_trop_gros:>",
38       dictCancelUpload: "<:uploadhtml5:drop_annuler:>",
39       dictCancelUploadConfirmation: "<:uploadhtml5:drop_annuler_confirm:>",
40       dictMaxFilesExceeded: "<:uploadhtml5:drop_max_file:>"
41     };
42
43   // Désactiver la découverte automatique de dropzone
44   Dropzone.autoDiscover = false;
45
46   $("#dropzonespip").dropzone(options);
47
48  </script>
49  ]
50</div>
Note: See TracBrowser for help on using the repository browser.