aboutsummaryrefslogtreecommitdiff
path: root/form-ajout.py
blob: af4eb0e1025a5cdbcb9788f3af3a50d5cc272ca1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/python
# -*- coding: utf-8 -*-

from mod_python import Session
import fonctions

def index(req):
    req.content_type="text/html"

    sess = Session.Session(req)
    fonctions.redirectionSiNonConnecte(req,sess)

    req.write(fonctions.codeHTML("Ajout d'un contact","""
<p><b>Ajout d'un contact</b></p>
<form method="POST" action="ajout.py" onsubmit="return isItGood()">
    <table>
        <tr>
            <td>Nom</td>
            <td><input type="text" name="nom" id="nom"/></td>
            <td></td>
        </tr>
        <tr>
            <td>Adresse</td>
            <td><input type="text" name="adresse"/></td>
            <td></td>
        </tr>
        <tr>
            <td>Email</td>
            <td><input type="text" name="email" id="email"/></td>
            <td></td>
        </tr>
        <tr>
            <td>Téléphone</td>
            <td><input type="text" name="telephone" id="telephone"/></td>
            <td><input type="submit" value="Valider" id="submit"></td>
        </tr>
    </table>
</form>
""" + fonctions.lien("menu.py","Retour au menu principal") + """
<script src="form-ajout.js"></script>
"""))