Commentaire pour destruction obligatoire.

Envoir bugreport que si l'option debug est absente

darcs-hash:20040911231455-41617-0cd36d3ec9aa89e3ef996020ea7b8ae60ed8ec21.gz
This commit is contained in:
pauget 2004-09-12 01:14:55 +02:00
parent a28f253a8a
commit 6020d212db

View file

@ -494,10 +494,16 @@ def del_adher(adher) :
dialog(arg)
return
arg = u'--title "Destruction adhérent %s " --colors ' % adher.Nom()
arg+= u'--inputbox "\Zr\Z1ATTENTION\Zn : la destruction est définitive\n\n%s.\n\nCommentaire à insérer ?" 0 0' % quoi
annul, res = dialog(arg)
if annul : return 1
while 1 :
arg = u'--title "Destruction adhérent %s " --colors ' % adher.Nom()
arg+= u'--inputbox "\Zr\Z1ATTENTION\Zn : la destruction est définitive\n\n%s.\n\nCommentaire à insérer ?" 0 0' % quoi
annul, res = dialog(arg)
if annul : return 1
if res[0] : break
arg = u'--title "Destruction adherent" '
arg+= u'--msgbox "Le commentaire est obligatoire\n\n\n" 0 0'
dialog(arg)
adher.delete(res[0])
arg = u'--title "Destruction adhérent" '
@ -799,10 +805,16 @@ def select_club(clas) :
def del_club(club) :
""" Destruction club """
quoi ='Toutes les machines associées à cet adhérent seront détruites'
arg = u'--title "Destruction club " --colors '
arg+= u'--inputbox "\Zr\Z1ATTENTION\Zn : la destruction est définitive\n\nToutes les machines de ce club seront également détruites.\n\nCommentaire à insérer ?" 0 0'
annul, res = dialog(arg)
if annul : return 1
while 1 :
arg = u'--title "Destruction club " --colors '
arg+= u'--inputbox "\Zr\Z1ATTENTION\Zn : la destruction est définitive\n\nToutes les machines de ce club seront également détruites.\n\nCommentaire à insérer ?" 0 0'
annul, res = dialog(arg)
if annul : return 1
if res[0] : break
arg = u'--title "Destruction club" '
arg+= u'--msgbox "Le commentaire est obligatoire\n\n\n" 0 0'
dialog(arg)
club.delete(res[0])
arg = u'--title "Destruction club" '
arg+= u'--msgbox "Club détruit\n\n\n" 0 0'
@ -918,10 +930,16 @@ def del_machine(machine) :
"""
Destruction machine
"""
arg = u'--title "Destruction machine %s" --colors ' % machine.nom()
arg+= u'--inputbox "\Zr\Z1ATTENTION\Zn : la destruction est définitive\nCommentaire à insérer ?" 0 0'
annul, res = dialog(arg)
if annul : return 1
while 1 :
arg = u'--title "Destruction machine %s" --colors ' % machine.nom()
arg+= u'--inputbox "\Zr\Z1ATTENTION\Zn : la destruction est définitive\nCommentaire à insérer ?" 0 0'
annul, res = dialog(arg)
if annul : return 1
if res[0] : break
arg = u'--title "Destruction machine" '
arg+= u'--msgbox "Le commentaire est obligatoire\n\n\n" 0 0'
dialog(arg)
try :
machine.delete(res[0])
except EnvironmentError, c :
@ -1574,7 +1592,7 @@ if __name__ == '__main__' :
sys.stderr = sys.__stderr__
traceback = s.getvalue()
try :
if To :
if not debug and To :
# Paramètres pour le mail
From = script_utilisateur + '@crans.org'