/[openfoncier]/trunk/obj/om_formulaire.class.php
ViewVC logotype

Annotation of /trunk/obj/om_formulaire.class.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 677 - (hide annotations)
Tue Nov 13 14:38:28 2012 UTC (12 years, 2 months ago) by nhaye
File size: 2805 byte(s)
Le script d'affichage de fichiers est maintenant appelé dans une nouvelle fenêtre ouverte en javascript.
Si le fichier n'existe pas, une erreur est affichée dans cette fenêtre.

1 atreal 305 <?php
2     /**
3     * Ce fichier est destine a permettre la surcharge de certaines methodes de
4     * la classe om_formulaire pour des besoins specifiques de l'application
5     *
6     * @package openmairie_exemple
7     * @version SVN : $Id$
8     */
9    
10     /**
11     *
12     */
13     require_once PATH_OPENMAIRIE."om_formulaire.class.php";
14    
15     /**
16     *
17     */
18     class om_formulaire extends formulaire {
19 vpihour 507
20 nhaye 636 /**
21     * Pour upload dans /tmp
22     *
23     * @param string $champ Nom du champ
24     * @param integer $validation
25     * @param boolean $DEBUG Parametre inutilise
26     */
27     function tmpUpload($champ, $validation, $DEBUG = false) {
28    
29     //
30     echo "<input";
31     echo " type=\"text\"";
32     echo " name=\"".$champ."\"";
33     echo " id=\"".$champ."\" ";
34     echo " value=\"".$this->val[$champ]."\"";
35     echo " size=\"".$this->taille[$champ]."\"";
36     echo " maxlength=\"".$this->max[$champ]."\"";
37     echo " class=\"champFormulaire upload\"";
38     if (!$this->correct) {
39     if (isset($this->onchange) and $this->onchange[$champ] != "") {
40     echo " onchange=\"".$this->onchange[$champ]."\"";
41     }
42     if (isset($this->onkeyup) and $this->onkeyup[$champ] != "") {
43     echo " onkeyup=\"".$this->onkeyup[$champ]."\"";
44     }
45     if (isset($this->onclick) and $this->onclick[$champ] != "") {
46     echo " onclick=\"".$this->onclick[$champ]."\"";
47     }
48     } else {
49     echo " disabled=\"disabled\"";
50     }
51     echo " />\n";
52    
53     //
54     if (!$this->correct) {
55     //
56     echo "<a class=\"upload ui-state-default ui-corner-all\" href=\"javascript:tmpUpload('".$champ."');\">";
57     echo "<span class=\"ui-icon ui-icon-arrowthickstop-1-s\" ";
58     echo "title=\""._("Cliquer ici pour telecharger un fichier depuis votre poste de travail")."\">";
59     echo _("Telecharger");
60     echo "</span>";
61     echo "</a>\n";
62     //
63     echo "<a class=\"voir ui-state-default ui-corner-all\" href=\"javascript:voir2('".$champ."');\">\n";
64     echo "<span class=\"ui-icon ui-icon-newwin\" ";
65     echo "title=\""._("Cliquer ici pour voir le fichier")."\">";
66     echo _("Voir");
67     echo "</span>";
68     echo "</a>\n";
69     }
70     }
71 nhaye 674
72     function tmpUploadStatic($champ, $validation, $DEBUG = false) {
73     if(!empty($this->val[$champ])) {
74 nhaye 677 echo "<a class=\"voir ui-state-default ui-corner-all\" href=\"javascript:file('".$this->val[$champ]."');\">\n";
75 nhaye 674 echo "<span class=\"ui-icon ui-icon-newwin\" ";
76     echo "title=\""._("Cliquer ici pour voir le fichier")."\">";
77     echo _("Voir");
78     echo "</span>";
79     echo "</a>\n";
80     }
81 nhaye 636
82 nhaye 674
83     }
84    
85 atreal 305 }
86    
87     ?>

Properties

Name Value
svn:keywords Id

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26