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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
<%namespace name="Modals" file="jm2l:templates/modals.mako"/>
<%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
<%def name="profil_wrapper(uprofil, profil_form)">
<div id="Photos">
${helpers.show_my_pictures(uprofil)}
</div>
<a href="/sign/jm2l/${uprofil.my_hash}">Mon lien</a>
<h3>${profil_form.prenom.data} ${profil_form.nom.data}</h3>
##<form id="ProfilForm" action="javascript:DoPost('/2015/modal/Place/${form.place_id.data}');">
% if uprofil!=request.user and request.user.uid==1:
<form id="ProfilForm" action="/MesJM2L?user=${uprofil.uid}" method="POST">
% else:
<form id="ProfilForm" action="/MesJM2L" method="POST">
% endif
<%
DicForm = {
'nom': {'PlaceHolder':u"Mon Nom", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;"},
'prenom': {'PlaceHolder':u"Mon Prénom", "FieldStyle":"width:16em;"},
'pseudo': {'PlaceHolder':u"Mon Pseudo", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;"},
'mail': {'PlaceHolder':u"mon.mail@fqdn.tld", "FieldStyle":"width:16em;"},
'phone': {'PlaceHolder':u"0612345678", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;"},
'website': {'PlaceHolder':u"http://ma-page-web.moi","FieldStyle":"width:16em;"},
'gpg_key': {'PlaceHolder':u"Ma clé gpg", "FieldStyle":"width:90%;"},
'soc_link':{'PlaceHolder':u"#jm2l sur irc.freenode.org","FieldStyle":"width:90%;"},
'bio': {'PlaceHolder':u"Ma Bilibiographie", "FieldStyle":"width:95%;min-height:150px;", "fieldset":True, "ckeditor":1 },
'tiersship': {'Ignore':True}
}
%>
${helpers.DisplayForm(profil_form, DicForm)}
<fieldset>
<legend>Activité</legend>
Si vous ne trouvez pas l'entité que vous souhaitez promouvoir (Association, GULL, Entreprise, Logiciel, ...).
Vous pouvez <a href="/entity"> en ajouter une. </a>
<div class="repeat">
<table class="wrapper table table-striped table-bordered" width="100%">
<thead>
<tr class="row">
<th style="width:4em;text-align:center;">Année</th>
<th style="width:19em;">Entité</th>
<th>Rôle</th>
<th style="width:6em;">Action</th>
</tr>
</thead>
<tbody class="container">
<tr class="row template" style="line-height:2.2em;">
<td style="text-align:center;">
<input type="hidden" style="width:20em;" class="form-control" name="tiersship-{{row-count-placeholder}}-year_uid"
value="2015" /> 2015
</td>
<td style="text-align: center;">
<input type="hidden" class="form-control" name="tiersship-{{row-count-placeholder}}-user_uid"
value="${uprofil.uid}" style="width:4em;" />
<input type="hidden" class="form-control" style="width:20em;" name="tiersship-{{row-count-placeholder}}-tiers_uid"
id="tiersship-{{row-count-placeholder}}-tiers_uid" />
</td>
<td style="text-align:center;">
<input style="width:100%;margin:-7px;" type="text" class="form-control" name="tiersship-{{row-count-placeholder}}-role"
value="" />
</td>
<td>
<span class="remove btn btn-mini btn-danger">
<i class="icon-remove-sign icon-white"></i> Suppr.
</span>
</td>
</tr>
% for num, dicdata in enumerate(profil_form._fields.get("tiersship").data):
<tr class="row" style="padding:5px;line-height:2.2em;">
<td style="text-align:center;">
<input type="hidden" class="form-control" name="tiersship-${num}-year_uid"
value="${dicdata.get('year_uid')}" style="width:4em;" />
${dicdata.get('year_uid')}
</td>
<td style="text-align:center;">
<input type="hidden" class="form-control" name="tiersship-${num}-user_uid"
value="${dicdata.get('user_uid')}" style="width:4em;" />
<input type="hidden" class="form-control" name="tiersship-${num}-tiers_uid"
value="${dicdata.get('tiers_uid')}" style="width:4em;" />
<%
entity = DBTiers.by_id(dicdata.get('tiers_uid'))
%>
% if entity:
<small>${entity.get_entity_type.entity_subtype}</small>
<a href="/entity/${entity.get_entity_type.entity_type}/${entity.slug}">${entity.name}</a>
% endif
</td>
<td style="text-align:center;">
<input style="width:100%;margin:-7px;" type="text" class="form-control" name="tiersship-${num}-role"
value="${dicdata.get('role')}" />
</td>
<td>
<span class="remove btn btn-mini btn-danger">
<i class="icon-remove-sign icon-white"></i> Suppr.
</span>
</td>
</tr>
% endfor
</tbody>
<tfoot>
<tr>
<td colspan="5" style="text-align:center;line-height: 3em;">
<span class="add btn btn-mini btn-primary"><i class="icon-plus-sign icon-white"></i> Ajouter</span>
</td>
</tr>
</tfoot>
</table>
</div>
</fieldset>
<input class="btn" type="submit" value="Enregistrer !" />
</form>
</%def>
|