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
|
# -*- coding: utf-8 -*-
<%inherit file="jm2l:templates/layout.mako"/>
<%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
<%def name="jsAddOn()">
<script src="/static/jquery-ui/jquery-ui.min.js"></script>
<script src="/static/js/jm2l.js"></script>
<script src="/static/third-party/ckeditor/ckeditor.js"></script>
<script src="/static/select2.js"></script>
</%def>
<%def name="cssAddOn()">
<link rel="stylesheet" href="/static/css/jquery.fileupload.css">
<link rel="stylesheet" href="/static/css/jquery.fileupload-ui.css">
<link rel="stylesheet" href="/static/jm2l.css" />
<link rel="stylesheet" href="/static/select2.css" type="text/css" media="screen" />
<!-- CSS adjustments for browsers with JavaScript disabled -->
<noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-noscript.css"></noscript>
<noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-ui-noscript.css"></noscript>
</%def>
% if 'uid' in form._fields.keys():
<h3>Editer une tâche</h3>
% else:
<h3>Ajouter une tâche</h3>
%endif
<%
DicForm = {
'name': {'PlaceHolder':u"Nom de la tâche", "FieldStyle":"width:90%;" },
'area_uid': {'PlaceHolder':u"Pôle", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;" },
'due_date': {'PlaceHolder':u"27/11/2015", "FieldStyle":"width:8em;", 'ContainerStyle':"float:left;"},
'closed_by': {'PlaceHolder':u"Assigné à", "FieldStyle":"width:16em;" },
'description': {'PlaceHolder':u"Description", "FieldStyle":"width:95%;min-height:150px;" },
}
%>
% if 'uid' in form._fields.keys():
<form action="/Staff/tasks/${form.uid.data}" method="post">
${form.uid()}
%else:
<form action="/Staff/tasks" method="post">
%endif
${helpers.DisplayForm(form, DicForm)}
<input type="submit" />
</form>
% if 'uid' in form._fields.keys():
${helpers.uploader("tasks", form.uid.data, u"Attachement" )}
%endif
<script>
var editor = CKEDITOR.replace( 'description', { autoGrow_onStartup: true, language: 'fr' } );
</script>
|