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

Last change on this file since 88805 was 88805, checked in by p@…, 5 years ago

Recharger le bloc des "documents" si un upload est success

File size: 1.3 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   Dropzone.options.dropzonespip = {
20
21     maxFilesize: #CONFIG{uploadhtml5/max_file_size},
22     maxFiles: [(#CONFIG{uploadhtml5/max_file}|>{0}|?{
23     #CONFIG{uploadhtml5/max_file},
24     null})],
25
26     success: function(file, response) {
27       ajaxReload("documents");
28     },
29
30     // Traduire dropzone
31     dictDefaultMessage: "<:uploadhtml5:drop_ici:>",
32     dictFallbackMessage: "<:uploadhtml5:drop_no_support:>",
33     dictFallbackText: "<:uploadhtml5:drop_fallbacktext:>",
34     dictInvalidFileType: "<:uploadhtml5:drop_fichier_invalide:>",
35     dictFileTooBig: "<:uploadhtml5:drop_fichier_trop_gros:>",
36     dictCancelUpload: "<:uploadhtml5:drop_annuler:>",
37     dictCancelUploadConfirmation: "<:uploadhtml5:drop_annuler_confirm:>",
38     dictMaxFilesExceeded: "<:uploadhtml5:drop_max_file:>"
39   }
40  </script>
41  ]
42</div>
Note: See TracBrowser for help on using the repository browser.