Commit d0902c2a authored by Fabiano Sluzarski's avatar Fabiano Sluzarski
Browse files

Undone last changes, and not encrypt when there is no password.

parent 2e099df0
......@@ -20,6 +20,6 @@ public class CommitteeController {
@ModelAttribute("registrations")
public java.util.Collection<Registration> populateRegistrations() {
return Registration.findAllActiveRegistrations();
return Registration.findAllRegistrations();
}
}
......@@ -46,8 +46,10 @@ public class ProfessorController {
return "professors/create";
}
ShaPasswordEncoder encoder = new ShaPasswordEncoder(256);
professor.setPassword(encoder.encodePassword(professor.getPassword(), ""));
if (!professor.getPassword().isEmpty()) {
ShaPasswordEncoder encoder = new ShaPasswordEncoder(256);
professor.setPassword(encoder.encodePassword(professor.getPassword(), ""));
}
uiModel.asMap().clear();
professor.persist();
......
......@@ -41,8 +41,10 @@ public class StaffController {
return "staffs/create";
}
ShaPasswordEncoder encoder = new ShaPasswordEncoder(256);
staff.setPassword(encoder.encodePassword(staff.getPassword(), ""));
if (!staff.getPassword().isEmpty()) {
ShaPasswordEncoder encoder = new ShaPasswordEncoder(256);
staff.setPassword(encoder.encodePassword(staff.getPassword(), ""));
}
uiModel.asMap().clear();
staff.persist();
......
......@@ -39,8 +39,10 @@ public class StudentController {
return "students/create";
}
ShaPasswordEncoder encoder = new ShaPasswordEncoder(256);
student.setPassword(encoder.encodePassword(student.getPassword(), ""));
if (!student.getPassword().isEmpty()) {
ShaPasswordEncoder encoder = new ShaPasswordEncoder(256);
student.setPassword(encoder.encodePassword(student.getPassword(), ""));
}
uiModel.asMap().clear();
student.persist();
......
......@@ -31,7 +31,7 @@ public class StudentGrantController {
@ModelAttribute("registrations")
public java.util.Collection<Registration> populateRegistrations() {
return Registration.findAllActiveRegistrations();
return Registration.findAllRegistrations();
}
@RequestMapping(method = RequestMethod.GET)
......
......@@ -34,14 +34,12 @@ public class TranscriptController {
@ModelAttribute("registrations")
public Collection<Registration> populateRegistrations() {
return Registration.findAllActiveRegistrations();
return Registration.findAllRegistrations();
}
@ModelAttribute("sectionposes")
public java.util.Collection<SectionPos> populateSectionPoses() {
Calendar c = Calendar.getInstance();
Integer i = c.get(Calendar.YEAR);
return (Collection<SectionPos>) SectionPos.findSectionPosesByYear(i.toString());
return SectionPos.findAllSectionPoses();
}
@RequestMapping(method = RequestMethod.GET)
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<div xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:field="urn:jsptagdir:/WEB-INF/tags/form/fields"
xmlns:form="urn:jsptagdir:/WEB-INF/tags/form" xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:spring="http://www.springframework.org/tags" version="2.0">
<jsp:output omit-xml-declaration="yes"/>
<b>Atas colegiado:</b> <p/>
<p></p>
<div xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:field="urn:jsptagdir:/WEB-INF/tags/form/fields"
xmlns:form="urn:jsptagdir:/WEB-INF/tags/form"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:spring="http://www.springframework.org/tags" version="2.0">
<jsp:output omit-xml-declaration="yes" />
<!-- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> -->
<!-- <script type="text/javascript" src="searchSapos.js"></script> -->
<!-- <script type="text/javascript" src="Core.js"></script> -->
<!-- <script type="text/javascript" src="AbstractManager.js"></script> -->
<!-- <script type="text/javascript" src="Manager.jquery.js"></script> -->
<!-- <script type="text/javascript" src="Parameter.js"></script> -->
<!-- <script type="text/javascript" src="ParameterStore.js"></script> -->
<!-- <script type="text/javascript" src="searchSapos.theme.js"></script> -->
<!-- <script type="text/javascript" src="AbstractWidget.js"></script> -->
<!-- <script type="text/javascript" src="ResultWidget.js"></script> -->
<!-- <script type="text/javascript" src="AbstractFacetWidget.js"></script> -->
<!-- <script type="text/javascript" src="TextWidget.js"></script> -->
<!-- <b>Atas colegiado:</b> -->
<!-- <p /> -->
<!-- <p></p> -->
<form name="search" action="" method=""> <!-- action="searchminutesaction" method="get"> -->
<p />
<h2>Pesquisa atas</h2>
<!-- <ul id="search"> -->
<input type="text" id="query" name="query" />
<!-- </ul> -->
<div id="result">
<div id="docs"></div>
</div>
<form name="search" action="searchminutesaction" method="get">
<input type="hidden" name="lang" value="pt"/>
<input name="query" size="44"/>
<input type="submit" value="Procura atas colegiado"/>
<!-- <input type="hidden" name="lang" value="pt"/> -->
<!-- <input name="query" size="44"/> -->
<!-- <input type="submit" value="Procura atas colegiado"/> -->
</form>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment