ScoDoc/dtml/entreprises/entreprise_correspondant_cr...

43 lines
1.7 KiB
Plaintext

<dtml-var "entreprise_header(REQUEST=REQUEST)">
<dtml-call "REQUEST.set( 'UE', do_entreprise_list( args={ 'entreprise_id' : entreprise_id } )[0])">
<h2 class="entreprise_correspondant"><dtml-var title_or_id> dans l'entreprise <dtml-var "UE['nom']"></h2>
<dtml-call "REQUEST.set('tf', TrivialFormulator( URL0, REQUEST.form,
( ('entreprise_id', { 'input_type' : 'hidden', 'default' : entreprise_id }),
('civilite', { 'input_type' : 'menu',
'labels' : [ 'M.', 'Mme' ], 'allowed_values' : [ 'M.', 'Mme' ] }),
('nom', { 'size' : 25, 'title' : 'Nom', 'allow_null' : False }),
('prenom', { 'size' : 25, 'title' : 'Prénom' }),
('fonction', { 'input_type' : 'menu',
'allowed_values' : ('Directeur', 'RH', 'Resp. Administratif', 'Tuteur', 'Autre'),
'default' : 'Tuteur',
'explanation' : 'fonction via à vis de l\'IUT' }),
('phone1', { 'size' : 14, 'title' : 'Téléphone 1', }),
('phone2', { 'size' : 14, 'title' : 'Téléphone 2', }),
('mobile', { 'size' : 14, 'title' : 'Tél. mobile', }),
('fax', { 'size' : 14, 'title' : 'Fax', }),
('mail1', { 'size' : 25, 'title' : 'e-mail', }),
('mail2', { 'size' : 25, 'title' : 'e-mail 2', }),
('note', { 'input_type' : 'textarea', 'rows' : 3, 'cols': 40, 'title' : 'Note' }),
),
cancelbutton='Annuler',
submitlabel = 'Ajouter ce correspondant', readonly = REQUEST['_read_only']
))">
<dtml-if "tf[0] == 0">
<dtml-var "tf[1]">
<dtml-else>
<dtml-var "REQUEST.set( 'matiere_id', do_entreprise_correspondant_create( tf[2] ) )">
<dtml-call "RESPONSE.redirect( URL1 )">
</dtml-if>
<dtml-var "entreprise_footer(REQUEST=REQUEST)">