Ajout du champ charte des MA signne

darcs-hash:20071031132847-c992d-44ff759af0e73c00ee64425359136d58446a86e9.gz
This commit is contained in:
bos 2007-10-31 14:28:47 +01:00
parent dde27b3137
commit 53644f8102

View file

@ -946,6 +946,7 @@ def set_admin(proprio):
caution = on_off('k' in proprio.controle()) caution = on_off('k' in proprio.controle())
paiement_ok = on_off('p' in proprio.controle()) paiement_ok = on_off('p' in proprio.controle())
carte_ok = on_off('c' in proprio.controle()) carte_ok = on_off('c' in proprio.controle())
charte_MA = on_off(proprio.charteMA())
# Construction de la boîte de dialogue # Construction de la boîte de dialogue
texte = [] texte = []
@ -973,12 +974,16 @@ def set_admin(proprio):
if has_card: if has_card:
checklist.append(u'"4" "Carte d\'étudiant vérifiée" "%s"' % carte_ok) checklist.append(u'"4" "Carte d\'étudiant vérifiée" "%s"' % carte_ok)
checklist.append(u'"5" "Cotisation/charte/caution vérifées" "%s"' % paiement_ok) checklist.append(u'"5" "Cotisation/charte/caution vérifées" "%s"' % paiement_ok)
if isbureau or isadm:
checklist.append(u'"6" "Charte des MA signee" "%s"' % charte_MA)
if not checklist: if not checklist:
# Il n'y a rien de modifiable # Il n'y a rien de modifiable
dialog(u'--title "État administratif de %s non modifiable" --msgbox "%s\n" 0 0 ' % dialog(u'--title "État administratif de %s non modifiable" --msgbox "%s\n" 0 0 ' %
(proprio.Nom(), '\n'.join(texte))) (proprio.Nom(), '\n'.join(texte)))
return return
# Il y a qqch de modifiable, on construit la checklist # Il y a qqch de modifiable, on construit la checklist
arg = u'--title "Etat administratif de %s" ' % proprio.Nom() arg = u'--title "Etat administratif de %s" ' % proprio.Nom()
@ -1033,6 +1038,11 @@ def set_admin(proprio):
elif iscontroleur: elif iscontroleur:
proprio.controle('-p') proprio.controle('-p')
if '6\n' in result:
proprio.charteMA(True)
elif isadm or isbureau:
proprio.charteMA(False)
if 'C\n' in result: if 'C\n' in result:
proprio.controle('+k') proprio.controle('+k')
if not iscontroleur: if not iscontroleur:
@ -1462,7 +1472,7 @@ def modif_adher(adher):
arg += u'"Blackliste" "Modifier la blackliste de cet adhérent" ' arg += u'"Blackliste" "Modifier la blackliste de cet adhérent" '
if isimprimeur: if isimprimeur:
arg += u'"Solde" "Effectuer un débit/crédit pour cet adhérent" ' arg += u'"Solde" "Effectuer un débit/crédit pour cet adhérent" '
annul, res = dialog(arg) annul, res = dialog(arg)
if annul: return 1 if annul: return 1
@ -1482,6 +1492,8 @@ def modif_adher(adher):
set_droits(adher) set_droits(adher)
elif res[0] == 'Blackliste': elif res[0] == 'Blackliste':
set_blackliste(adher) set_blackliste(adher)
elif res[0] == 'Charte des MA' :
set_charte_MA(adher)
elif res[0] == 'Adresse' or res[0] == 'Chambre': elif res[0] == 'Adresse' or res[0] == 'Chambre':
arg = u'--title "Déménagement de %s" ' % adher.Nom() arg = u'--title "Déménagement de %s" ' % adher.Nom()
arg += u'--menu "Question :" 0 0 0 ' arg += u'--menu "Question :" 0 0 0 '