inc-upload_document.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. #SET{domid,_#ENV{mode}|concat{'_',#ENV{id,new}}}
  2. #SET{methode,upload}
  3. [(#ENV{joindre_mediatheque}|oui)#SET{methode,mediatheque}]
  4. [(#ENV{joindre_distant}|oui)#SET{methode,distant}]
  5. [(#ENV{joindre_ftp}|oui)#SET{methode,ftp}]
  6. <div id="defaultsubmit#GET{domid}" class="none"></div>
  7. [
  8. (#REM) Formulaire d'upload de fichier
  9. ]<div class='joindre_mode#GET{domid}[(#GET{methode}|=={upload}|non)none-js]' id='joindre_upload#GET{domid}'>
  10. <ul>
  11. <li class='editer editer_fichier_upload[ (#ENV**{erreurs}|table_valeur{fichier_upload}|oui)erreur]'>
  12. <label for='fichier_upload#GET{domid}'><:bouton_upload:></label>[
  13. <span class='erreur_message'>(#ENV**{erreurs}|table_valeur{fichier_upload})</span>
  14. ]<input class='file multi' type="file" name="fichier_upload[]" value='#ENV{fichier_upload}' id="fichier_upload#GET{domid}" size='11' />
  15. <!--editer_fichier_upload-->
  16. </li>
  17. </ul>
  18. <div class='sourceup'>
  19. <:medias:bouton_download_depuis:>
  20. <:medias:bouton_download_local:>
  21. [(#ENV{mediatheque,''}|oui)
  22. | <a href='#' onclick="change_methode('#GET{domid}','mediatheque');return false;"><:medias:bouton_download_par_mediatheque:></a>]
  23. [(#ENV{proposer_ftp,''}|oui)
  24. | <a href='#' onclick="change_methode('#GET{domid}','ftp');return false;"><:medias:bouton_download_par_ftp:></a>]
  25. | <a href='#' onclick="change_methode('#GET{domid}','distant');return false;"><:medias:bouton_download_sur_le_web:></a>
  26. </div>
  27. <p class='boutons'><input class='submit' type="submit" name="joindre_upload" value="<:bouton_upload:>"/></p>
  28. </div>[
  29. (#REM) Formulaire pour document dans mediatheque
  30. ][(#ENV{mediatheque,''}|oui)
  31. <div class='joindre_mode#GET{domid}[(#GET{methode}|=={mediatheque}|non)none-js]' id='joindre_mediatheque#GET{domid}'>
  32. <ul>
  33. <li class='editer editer_refdoc_joindre[ (#ENV**{erreurs}|table_valeur{refdoc_joindre}|oui)erreur]'>
  34. <label for='refdoc_joindre#GET{domid}'><:medias:label_refdoc_joindre:></label>[
  35. <span class='erreur_message'>(#ENV**{erreurs}|table_valeur{refdoc_joindre})</span>
  36. ]<input class='text' type="text" name="refdoc_joindre" value='#ENV{refdoc_joindre}' id="refdoc_joindre#GET{domid}"/>
  37. <input class='submit' type="button" name="parcourir" value="<:medias:bouton_parcourir:>"
  38. onclick="jQuery.modalboxload('#URL_ECRIRE{popin-choisir_document,var_zajax=contenu&selectfunc=mediaselect#GET{domid}}',{autoResize: true});"
  39. />
  40. <!--editer_refdoc_joindre-->
  41. </li>
  42. </ul>
  43. <script type="text/javascript">/*<!\[CDATA\[*/
  44. function mediaselect#GET{domid}(id){jQuery.modalboxclose();jQuery("#refdoc_joindre#GET{domid}").attr('value','doc'+id).focus();jQuery('#joindre_mediatheque#GET{domid}>.boutons input').get(0).click();}
  45. /*\]\]>*/</script>
  46. <div class='sourceup'>
  47. <:medias:bouton_download_depuis:>
  48. <a href='#' onclick="change_methode('#GET{domid}','upload');return false;"><:medias:bouton_download_local:></a>
  49. | <:medias:bouton_download_par_mediatheque:>
  50. [(#ENV{proposer_ftp,''}|oui)
  51. | <a href='#' onclick="change_methode('#GET{domid}','ftp');return false;"><:medias:bouton_download_par_ftp:></a>]
  52. | <a href='#' onclick="change_methode('#GET{domid}','distant');return false;"><:medias:bouton_download_sur_le_web:></a>
  53. </div>
  54. <p class='boutons'><input class='submit' type="submit" name="joindre_mediatheque" value="<:medias:bouton_attacher_document:>"/></p>
  55. </div>
  56. ][
  57. (#REM) Formulaire pour upload ftp
  58. ][(#ENV{proposer_ftp,''}|oui)
  59. <div class='joindre_mode#GET{domid}[(#GET{methode}|=={ftp}|non)none-js]' id='joindre_ftp#GET{domid}'>
  60. [
  61. <ul>
  62. <li class='editer editer_cheminftp[ (#ENV**{erreurs}|table_valeur{cheminftp}|oui)erreur]'>
  63. <label for='cheminftp#GET{domid}'>[(#VAL{info_selectionner_fichier}|_T{#ARRAY{upload,#ENV*{_dir_upload_ftp}}})]</label>[
  64. <span class='erreur_message'>(#ENV**{erreurs}|table_valeur{cheminftp})</span>
  65. ]<select name='cheminftp' id='cheminftp#GET{domid}' size='1'>
  66. <option value=''>&gt;&gt;</option>
  67. (#ENV*{_options_upload_ftp})
  68. </select>
  69. <!--editer_cheminftp-->
  70. </li>
  71. </ul>][(#ENV{_dir_upload_ftp}|et{#ENV{_options_upload_ftp}|non}|oui)
  72. <p class="infos">
  73. [(#VAL{info_installer_ftp}|_T{#ARRAY{upload,#ENV*{_dir_upload_ftp}}})] #AIDER{ins_upload}
  74. </p>
  75. ]
  76. <div class='sourceup'>
  77. <:medias:bouton_download_depuis:>
  78. <a href='#' onclick="change_methode('#GET{domid}','upload');return false;"><:medias:bouton_download_local:></a>
  79. [(#ENV{mediatheque,''}|oui)
  80. | <a href='#' onclick="change_methode('#GET{domid}','mediatheque');return false;"><:medias:bouton_download_par_mediatheque:></a>]
  81. | <:medias:bouton_download_par_ftp:>
  82. | <a href='#' onclick="change_methode('#GET{domid}','distant');return false;"><:medias:bouton_download_sur_le_web:></a>
  83. </div>
  84. <p class='boutons'>
  85. [(#ENV*{_options_upload_ftp}|oui)
  86. <input class='submit' type="submit" name="joindre_ftp" value="<:bouton_choisir:>"/>
  87. ]
  88. </p>
  89. </div>
  90. ][
  91. (#REM) Formulaire pour document distant
  92. ]<div class='joindre_mode#GET{domid}[(#GET{methode}|=={distant}|non)none-js]' id='joindre_distant#GET{domid}'>
  93. <ul>
  94. <li class='editer editer_url[ (#ENV**{erreurs}|table_valeur{url}|oui)erreur]'>
  95. <label for='url#GET{domid}'><:medias:info_referencer_doc_distant:></label>[
  96. <span class='erreur_message'>(#ENV**{erreurs}|table_valeur{url})</span>
  97. ]<input class='text' type="text" name="url" value='#ENV{url}' id="url#GET{domid}"/>
  98. <!--editer_url-->
  99. </li>
  100. </ul>
  101. <div class='sourceup'>
  102. <:medias:bouton_download_depuis:>
  103. <a href='#' onclick="change_methode('#GET{domid}','upload');return false;"><:medias:bouton_download_local:></a>
  104. [(#ENV{mediatheque,''}|oui)
  105. | <a href='#' onclick="change_methode('#GET{domid}','mediatheque');return false;"><:medias:bouton_download_par_mediatheque:></a>]
  106. [(#ENV{proposer_ftp,''}|oui)
  107. | <a href='#' onclick="change_methode('#GET{domid}','ftp');return false;"><:medias:bouton_download_par_ftp:></a>]
  108. | <:medias:bouton_download_sur_le_web:>
  109. </div>
  110. <p class='boutons'><input class='submit' type="submit" name="joindre_distant" value="<:bouton_choisir:>"/></p>
  111. </div>[
  112. (#REM) Formulaire pour deballer un zip
  113. ][<ul><li class='fieldset deballer_zip'>(#ENV**{erreurs}|table_valeur{lister_contenu_archive})</li></ul>]
  114. <script type='text/javascript'>/*<!#EVAL{chr(91)}CDATA#EVAL{chr(91)}*/
  115. if (window.jQuery){
  116. function change_methode(domid,methode){
  117. var id = "#joindre_"+methode+domid;
  118. if (jQuery(id).is(':hidden')) {
  119. jQuery('div.joindre_mode'+domid+':visible').slideUp('fast');
  120. jQuery(id).slideDown('fast');
  121. }
  122. // placer en haut du formulaire les boutons submit par defaut correspondant a la methode active
  123. jQuery("#defaultsubmit"+domid).html('').append(jQuery(id).find('.boutons').eq(-1).find('input').clone(true));
  124. }
  125. jQuery(function(){change_methode('#GET{domid}','#GET{methode}');});
  126. }
  127. /*#EVAL{chr(93)}[(#EVAL{chr(93)})]>*/</script>