-
Notifications
You must be signed in to change notification settings - Fork 114
/
prepareRejectAcademicServiceRequest.jsp
95 lines (76 loc) · 4.41 KB
/
prepareRejectAcademicServiceRequest.jsp
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
<%--
Copyright © 2002 Instituto Superior Técnico
This file is part of FenixEdu Academic.
FenixEdu Academic is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
FenixEdu Academic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with FenixEdu Academic. If not, see <http://www.gnu.org/licenses/>.
--%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<html:xhtml/>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://fenix-ashes.ist.utl.pt/fenix-renderers" prefix="fr"%>
<h2 class="mbottom1"><bean:message bundle="ACADEMIC_OFFICE_RESOURCES" key="reject.request" /></h2>
<html:messages id="message" message="true" bundle="ACADEMIC_OFFICE_RESOURCES">
<p>
<span class="error0"><!-- Error messages go here -->
<bean:write name="message" />
</span>
</p>
</html:messages>
<bean:define id="academicServiceRequest" name="academicServiceRequest" scope="request" type="org.fenixedu.academic.domain.serviceRequests.RegistrationAcademicServiceRequest"/>
<bean:define id="simpleClassName" name="academicServiceRequest" property="class.simpleName" />
<p class="mbottom025"><strong><bean:message bundle="ACADEMIC_OFFICE_RESOURCES" key="request.information"/></strong></p>
<fr:view name="academicServiceRequest" schema="<%= simpleClassName + ".view"%>">
<fr:layout name="tabular">
<fr:property name="classes" value="tstyle4 thright thlight mtop025 mbottom05"/>
</fr:layout>
</fr:view>
<logic:present name="academicServiceRequest" property="activeSituation">
<p class="mbottom025"><strong><bean:message bundle="ACADEMIC_OFFICE_RESOURCES" key="request.situation"/></strong></p>
<bean:define id="schema" name="academicServiceRequest" property="activeSituation.class.simpleName" />
<fr:view name="academicServiceRequest" property="activeSituation" schema="<%= schema.toString() + ".view" %>">
<fr:layout name="tabular">
<fr:property name="classes" value="tstyle4 thright thlight mtop025 mbottom05"/>
<fr:property name="rowClasses" value="tdhl1,,,"/>
</fr:layout>
</fr:view>
</logic:present>
<p class="mtop2"><strong><bean:message bundle="ACADEMIC_OFFICE_RESOURCES" key="confirm.reject"/></strong></p>
<p class="mbottom025"><bean:message bundle="ACADEMIC_OFFICE_RESOURCES" key="justification"/>:</p>
<html:form action="<%="/academicServiceRequestsManagement.do?method=rejectAcademicServiceRequest&academicServiceRequestId=" + academicServiceRequest.getExternalId().toString()%>" style="display: inline;" onsubmit="return checkJustification()">
<p class="mtop025">
<logic:present name="failingCondition" scope="request">
<bean:define id="failingCondition" name="failingCondition" scope="request"/>
<html:textarea bundle="HTMLALT_RESOURCES" altKey="textarea.justification" property="justification" value="<%=failingCondition.toString()%>" cols="65" rows="5"/>
</logic:present>
<logic:notPresent name="failingCondition" scope="request">
<html:textarea bundle="HTMLALT_RESOURCES" altKey="textarea.justification" property="justification" cols="65" rows="5"/>
</logic:notPresent>
</p>
<div class="alert-danger" id="justification-error" hidden><bean:message key="error.empty.justification" bundle="ACADEMIC_OFFICE_RESOURCES"/></div>
<span>
<html:submit><bean:message key="reject" bundle="APPLICATION_RESOURCES"/></html:submit>
</span>
</html:form>
<html:form action="<%="/student.do?method=visualizeRegistration&registrationID=" + academicServiceRequest.getRegistration().getExternalId().toString()%>" style="display: inline;">
<span>
<html:submit><bean:message key="label.back" bundle="APPLICATION_RESOURCES"/></html:submit>
</span>
</html:form>
<script type="text/javascript">
function checkJustification(){
var justification = $('textarea[name="justification"').val();
if(justification == null || justification.length == 0) {
$('#justification-error').show()
return false;
}
}
</script>