Rev 1425 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1425 | jmachado | 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
2 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
3 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
4 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
5 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
6 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
||
7 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
8 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSession" scope="request"/> |
||
9 | |||
10 | <% |
||
1426 | jmachado | 11 | /* IServiceManager sm = ServiceManager.getInstance(); |
1425 | jmachado | 12 | String[] names = new String[]{}; |
13 | Object[] args = new Object[]{}; |
||
14 | List<String> importYears = (List<String>) sm.execute(RequestUtils.getRequester(request, response), "LoadCoursesImportYears", args, names); |
||
1426 | jmachado | 15 | request.setAttribute("importYears", importYears);*/ |
16 | |||
17 | |||
18 | |||
1425 | jmachado | 19 | %> |
20 | |||
1426 | jmachado | 21 | <logic:present name="QuestionarioMessage"> |
22 | <logic:notEmpty name="QuestionarioMessage" property="message"> |
||
1425 | jmachado | 23 | <script> |
24 | $(document).ready( |
||
25 | function(){ |
||
26 | setText(); |
||
27 | } |
||
28 | ); |
||
29 | |||
30 | function setText() |
||
31 | { |
||
1426 | jmachado | 32 | $("#editor").html('<bean:write name="QuestionarioMessage" property="message" filter="false"/>'); |
1425 | jmachado | 33 | } |
34 | |||
35 | </script> |
||
36 | </logic:notEmpty> |
||
37 | </logic:present> |
||
38 | |||
1426 | jmachado | 39 | <html:form styleId="formSubmitMessage" styleClass="form-horizontal" action="/user/questionariosPaeMessagePedagogico" enctype="multipart/form-data" onsubmit="this.form.message.value=$('#editor').html();"> |
40 | <jsp:useBean id="QuestionarioMessage" type="pt.estgp.estgweb.web.form.questionarios.QuestionarioMessage" scope="request"/> |
||
41 | <% |
||
42 | String targetDispatch = request.getParameter("targetDispatch"); |
||
43 | String formDescription = request.getParameter("formDescription"); |
||
44 | String cursoAfetoOrUnidadeAfetaOrQuestionarioAfetoId = request.getParameter("cursoAfetoOrUnidadeAfetaOrQuestionarioAfetoId"); |
||
45 | String questionarioId = request.getParameter("questionarioId"); |
||
46 | if(formDescription!=null) |
||
47 | QuestionarioMessage.setFormDescription(formDescription); |
||
48 | if(targetDispatch!=null) |
||
49 | QuestionarioMessage.setDispatch(targetDispatch); |
||
50 | if(cursoAfetoOrUnidadeAfetaOrQuestionarioAfetoId != null) |
||
51 | QuestionarioMessage.setCursoAfetoOrUnidadeAfetaOrQuestionarioAfetoId(Long.parseLong(cursoAfetoOrUnidadeAfetaOrQuestionarioAfetoId)); |
||
52 | if(questionarioId != null) |
||
53 | QuestionarioMessage.setQuestionarioId(Long.parseLong(questionarioId)); |
||
54 | %> |
||
55 | <html:hidden property="formDescription"/> |
||
1425 | jmachado | 56 | |
57 | |||
1426 | jmachado | 58 | <div class="alert alert-info">Esta funcionalidade apenas está disponivel a membros do Pedagógico e à Administração</div> |
59 | <div class="panel panel-default"> |
||
60 | <div class="panel-heading">${QuestionarioMessage.formDescription}</div> |
||
61 | <div class="panel-body"> |
||
62 | <jomm:messages/> |
||
63 | <html:errors/> |
||
64 | <input type="hidden" name="dispatch" value="${QuestionarioMessage.dispatch}"/> |
||
65 | <html:hidden property="cursoAfetoOrUnidadeAfetaOrQuestionarioAfetoId"/> |
||
66 | <html:hidden property="formDescription"/> |
||
67 | <html:hidden property="message"/> |
||
68 | <html:hidden property="questionarioId"/> |
||
69 | |||
1425 | jmachado | 70 | <div class="form-group row"> |
1426 | jmachado | 71 | <div class="control-label col-sm-2">Nome ou Entidade que representa</div> |
1425 | jmachado | 72 | <div class="col-sm-10"> |
1426 | jmachado | 73 | <html:text styleId="sendAnnouncementEmail" styleClass="form-control" property="fromPerson"/> |
1425 | jmachado | 74 | </div> |
75 | </div> |
||
76 | |||
77 | <div class="form-group row"> |
||
1426 | jmachado | 78 | <div class="control-label col-sm-2">Email que aparece como Remetente</div> |
1425 | jmachado | 79 | <div class="col-sm-10"> |
1426 | jmachado | 80 | <html:text styleId="sendAnnouncementEmail" styleClass="form-control" property="fromEmail"/> |
1425 | jmachado | 81 | </div> |
82 | </div> |
||
83 | |||
84 | <div class="form-group row"> |
||
1426 | jmachado | 85 | <div class="control-label col-sm-2"><bean:message key="submit.todo.message.subject"/></div> |
1425 | jmachado | 86 | <div class="col-sm-10"> |
1426 | jmachado | 87 | <html:text styleId="subject" styleClass="form-control" property="subject"/> |
1425 | jmachado | 88 | </div> |
89 | </div> |
||
90 | |||
91 | <div class="form-group row"> |
||
92 | <div class="control-label col-sm-2" for="person"><bean:message key="submit.todo.message.target.person"/></div> |
||
93 | <div class="col-sm-10"> |
||
1426 | jmachado | 94 | <html:select styleId="person" styleClass="form-control" property="onlyNotAnswered"> |
95 | <html:option value="true">Enviar apenas a quem têm questionários por responder</html:option> |
||
96 | <html:option value="false">Enviar a Todos os Inquiridos</html:option> |
||
1425 | jmachado | 97 | </html:select> |
98 | </div> |
||
99 | </div> |
||
100 | |||
101 | <div class="form-group row"> |
||
102 | <div class="col-sm-12"> |
||
103 | <div class="btn-toolbar" data-role="editor-toolbar" data-target="#editor"> |
||
104 | <!-- <div class="btn-group"> |
||
105 | <a class="btn dropdown-toggle" data-toggle="dropdown" title="Font"><i class="aweicon-font"></i><b class="caret"></b></a> |
||
106 | <ul class="dropdown-menu"> |
||
107 | </ul> |
||
108 | </div> |
||
109 | <div class="btn-group"> |
||
110 | <a class="btn dropdown-toggle" data-toggle="dropdown" title="Font Size"><i class="aweicon-text-height"></i> <b class="caret"></b></a> |
||
111 | <ul class="dropdown-menu"> |
||
112 | <li><a data-edit="fontSize 5"><font size="5">Huge</font></a></li> |
||
113 | <li><a data-edit="fontSize 3"><font size="3">Normal</font></a></li> |
||
114 | <li><a data-edit="fontSize 1"><font size="1">Small</font></a></li> |
||
115 | </ul> |
||
116 | </div>--> |
||
117 | <div class="btn-group"> |
||
118 | <a class="btn btn-default" data-edit="bold" title="Bold (Ctrl/Cmd+B)"><i class="aweicon-bold"></i></a> |
||
119 | <a class="btn btn-default" data-edit="italic" title="Italic (Ctrl/Cmd+I)"><i class="aweicon-italic"></i></a> |
||
120 | <a class="btn btn-default" data-edit="strikethrough" title="Strikethrough"><i class="aweicon-strikethrough"></i></a> |
||
121 | <a class="btn btn-default" data-edit="underline" title="Underline (Ctrl/Cmd+U)"><i class="aweicon-underline"></i></a> |
||
122 | </div> |
||
123 | <div class="btn-group"> |
||
124 | <a class="btn btn-default" data-edit="insertunorderedlist" title="Bullet list"><i class="aweicon-list-ul"></i></a> |
||
125 | <a class="btn btn-default" data-edit="insertorderedlist" title="Number list"><i class="aweicon-list-ol"></i></a> |
||
126 | <a class="btn btn-default" data-edit="outdent" title="Reduce indent (Shift+Tab)"><i class="aweicon-indent-left"></i></a> |
||
127 | <a class="btn btn-default" data-edit="indent" title="Indent (Tab)"><i class="aweicon-indent-right"></i></a> |
||
128 | </div> |
||
129 | <div class="btn-group"> |
||
130 | <a class="btn btn-default" data-edit="justifyleft" title="Align Left (Ctrl/Cmd+L)"><i class="aweicon-align-left"></i></a> |
||
131 | <a class="btn btn-default" data-edit="justifycenter" title="Center (Ctrl/Cmd+E)"><i class="aweicon-align-center"></i></a> |
||
132 | <a class="btn btn-default" data-edit="justifyright" title="Align Right (Ctrl/Cmd+R)"><i class="aweicon-align-right"></i></a> |
||
133 | <a class="btn btn-default" data-edit="justifyfull" title="Justify (Ctrl/Cmd+J)"><i class="aweicon-align-justify"></i></a> |
||
134 | </div> |
||
135 | <div class="btn-group"> |
||
136 | <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" title="Hyperlink"><i class="aweicon-link"></i></a> |
||
137 | <div class="dropdown-menu input-append"> |
||
138 | <input class="span2" placeholder="URL" type="text" data-edit="createLink"/> |
||
139 | <button class="btn" type="button">Add</button> |
||
140 | </div> |
||
141 | <a class="btn btn-default" data-edit="unlink" title="Remove Hyperlink"><i class="aweicon-cut"></i></a> |
||
142 | |||
143 | </div> |
||
144 | |||
145 | <div class="btn-group"> |
||
146 | <a class="btn btn-default" title="Insert picture (or just drag & drop)" id="pictureBtn"><i class="aweicon-picture"></i></a> |
||
147 | <input type="file" data-role="magic-overlay" data-target="#pictureBtn" data-edit="insertImage" /> |
||
148 | </div> |
||
149 | <div class="btn-group"> |
||
150 | <a class="btn btn-default" data-edit="undo" title="Undo (Ctrl/Cmd+Z)"><i class="aweicon-undo"></i></a> |
||
151 | <a class="btn btn-default" data-edit="redo" title="Redo (Ctrl/Cmd+Y)"><i class="aweicon-repeat"></i></a> |
||
152 | </div> |
||
153 | |||
154 | </div> |
||
155 | |||
156 | <div id="editor"> |
||
157 | <bean:message key="submit.todo.email.content"/>… |
||
158 | </div> |
||
159 | </div> |
||
160 | </div> |
||
161 | |||
1426 | jmachado | 162 | <button class="btn btn-success" onclick="this.form.message.value=$('#editor').html(); this.form.submit()"><bean:message key="submit.todo.message"/></button> |
163 | </div> |
||
1425 | jmachado | 164 | </div> |
1426 | jmachado | 165 | </html:form> |