Add progression view.
This commit is contained in:
parent
b4279c4a3a
commit
e9a107cc3f
|
|
@ -1,6 +1,5 @@
|
||||||
package fr.geoffrey.medical_training_tracker;
|
package fr.geoffrey.medical_training_tracker;
|
||||||
|
|
||||||
import fr.geoffrey.medical_training_tracker.config.encoder.Encoder;
|
|
||||||
import fr.geoffrey.medical_training_tracker.dao.IAnimalDao;
|
import fr.geoffrey.medical_training_tracker.dao.IAnimalDao;
|
||||||
import fr.geoffrey.medical_training_tracker.dao.ICareDao;
|
import fr.geoffrey.medical_training_tracker.dao.ICareDao;
|
||||||
import fr.geoffrey.medical_training_tracker.dao.IConsentBehaviorDao;
|
import fr.geoffrey.medical_training_tracker.dao.IConsentBehaviorDao;
|
||||||
|
|
@ -35,8 +34,6 @@ public class Servlet implements ServletContextListener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void contextInitialized(ServletContextEvent sce) {
|
public void contextInitialized(ServletContextEvent sce) {
|
||||||
Encoder.setEncoder(Encoder.ENCODER_CLEAR);
|
|
||||||
|
|
||||||
AutowireCapableBeanFactory autowireCapableBeanFactory = WebApplicationContextUtils.getRequiredWebApplicationContext(sce.getServletContext()).getAutowireCapableBeanFactory();
|
AutowireCapableBeanFactory autowireCapableBeanFactory = WebApplicationContextUtils.getRequiredWebApplicationContext(sce.getServletContext()).getAutowireCapableBeanFactory();
|
||||||
autowireCapableBeanFactory.autowireBean(this);
|
autowireCapableBeanFactory.autowireBean(this);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,13 +28,16 @@ public class AnimalController {
|
||||||
public static final String MODEL_MAP_PROGRESSION = "MODEL_MAP_PROGRESSION";
|
public static final String MODEL_MAP_PROGRESSION = "MODEL_MAP_PROGRESSION";
|
||||||
public static final String MODEL_MAP_LIST_REMAINING_CONSENT_BEHAVIORS = "MODEL_MAP_LIST_REMAINING_CONSENT_BEHAVIORS";
|
public static final String MODEL_MAP_LIST_REMAINING_CONSENT_BEHAVIORS = "MODEL_MAP_LIST_REMAINING_CONSENT_BEHAVIORS";
|
||||||
public static final String MODEL_MAP_LIST_REMAINING_CARES = "MODEL_MAP_LIST_REMAINING_CARES";
|
public static final String MODEL_MAP_LIST_REMAINING_CARES = "MODEL_MAP_LIST_REMAINING_CARES";
|
||||||
|
public static final String MODEL_MAP_PROGRESSION_TYPE = "MODEL_MAP_PROGRESSION_TYPE";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
IServiceAnimal serviceAnimal;
|
IServiceAnimal serviceAnimal;
|
||||||
|
|
||||||
//<editor-fold defaultstate="collapsed" desc="Animal">
|
//<editor-fold defaultstate="collapsed" desc="Animal">
|
||||||
@RequestMapping(value = IndexController.URL_ANIMAL_LIST, method = RequestMethod.GET)
|
@RequestMapping(value = IndexController.URL_ANIMAL_LIST, method = RequestMethod.GET)
|
||||||
public String doGetAnimal(final ModelMap pModel, HttpSession httpSession) {
|
public String doGetAnimal(final ModelMap pModel, HttpSession httpSession,
|
||||||
|
@RequestParam(value = LoginController.MODEL_MAP_CHANGE_PASSWORD_SUCCESS_MESSAGE, required = false, defaultValue = "false") final boolean changePasswordSuccessMessage,
|
||||||
|
@RequestParam(value = LoginController.MODEL_MAP_CHANGE_PASSWORD_ERROR_MESSAGE, required = false, defaultValue = "false") final String changePasswordErrorMessage) {
|
||||||
String ret;
|
String ret;
|
||||||
|
|
||||||
if (LoginController.isUserAlreadyAuth(httpSession)) {
|
if (LoginController.isUserAlreadyAuth(httpSession)) {
|
||||||
|
|
@ -47,6 +50,8 @@ public class AnimalController {
|
||||||
|
|
||||||
pModel.addAttribute(MODEL_MAP_NAVBAR_PAGE, IndexController.MODEL_MAP_NAVBAR_PAGE_VALUE_MY_ANIMALS);
|
pModel.addAttribute(MODEL_MAP_NAVBAR_PAGE, IndexController.MODEL_MAP_NAVBAR_PAGE_VALUE_MY_ANIMALS);
|
||||||
}
|
}
|
||||||
|
pModel.addAttribute(LoginController.MODEL_MAP_CHANGE_PASSWORD_SUCCESS_MESSAGE, changePasswordSuccessMessage);
|
||||||
|
pModel.addAttribute(LoginController.MODEL_MAP_CHANGE_PASSWORD_ERROR_MESSAGE, changePasswordErrorMessage);
|
||||||
|
|
||||||
ret = IndexController.PAGE_ANIMAL_LIST;
|
ret = IndexController.PAGE_ANIMAL_LIST;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -377,6 +382,67 @@ public class AnimalController {
|
||||||
pModel.addAttribute(MODEL_MAP_ANIMAL_LIST, animals);
|
pModel.addAttribute(MODEL_MAP_ANIMAL_LIST, animals);
|
||||||
|
|
||||||
pModel.addAttribute(MODEL_MAP_PROGRESSION, progressionByMeValue);
|
pModel.addAttribute(MODEL_MAP_PROGRESSION, progressionByMeValue);
|
||||||
|
pModel.addAttribute(MODEL_MAP_PROGRESSION_TYPE, "by_me");
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = IndexController.PAGE_ANIMAL_PROGRESSION;
|
||||||
|
} else {
|
||||||
|
ret = IndexController.URL_REDIRECT + IndexController.URL_LOGIN;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = IndexController.URL_ANIMAL_PROGRESSION_BY_SOMEONE_ELSE, method = RequestMethod.GET)
|
||||||
|
public String doGetAnimalProgressionBySomeoneElse(final ModelMap pModel, HttpSession httpSession,
|
||||||
|
@PathVariable(value = "animal_id") final int animalId,
|
||||||
|
@PathVariable(value = "progression_value") final String progressionByMeValue) {
|
||||||
|
String ret;
|
||||||
|
|
||||||
|
if (LoginController.isUserAlreadyAuth(httpSession)) {
|
||||||
|
Authentication authentication = (Authentication) httpSession.getAttribute(IndexController.SESSION_ATTRIBUTE_AUTHENTICATION);
|
||||||
|
Object oUserDetails = authentication.getPrincipal();
|
||||||
|
if (oUserDetails instanceof UserDetails) {
|
||||||
|
UserDetails userDetails = (UserDetails) oUserDetails;
|
||||||
|
|
||||||
|
Animal animal = serviceAnimal.getAnimalProgressionBySomeoneElse(userDetails.getUsername(), animalId, progressionByMeValue);
|
||||||
|
pModel.addAttribute(MODEL_MAP_ANIMAL, animal);
|
||||||
|
|
||||||
|
List<Animal> animals = serviceAnimal.getAnimals(userDetails.getUsername());
|
||||||
|
pModel.addAttribute(MODEL_MAP_ANIMAL_LIST, animals);
|
||||||
|
|
||||||
|
pModel.addAttribute(MODEL_MAP_PROGRESSION, progressionByMeValue);
|
||||||
|
pModel.addAttribute(MODEL_MAP_PROGRESSION_TYPE, "by_someone_else");
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = IndexController.PAGE_ANIMAL_PROGRESSION;
|
||||||
|
} else {
|
||||||
|
ret = IndexController.URL_REDIRECT + IndexController.URL_LOGIN;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = IndexController.URL_ANIMAL_PROGRESSION_BY_VETERINARY, method = RequestMethod.GET)
|
||||||
|
public String doGetAnimalProgressionByVeterinary(final ModelMap pModel, HttpSession httpSession,
|
||||||
|
@PathVariable(value = "animal_id") final int animalId,
|
||||||
|
@PathVariable(value = "progression_value") final String progressionByMeValue) {
|
||||||
|
String ret;
|
||||||
|
|
||||||
|
if (LoginController.isUserAlreadyAuth(httpSession)) {
|
||||||
|
Authentication authentication = (Authentication) httpSession.getAttribute(IndexController.SESSION_ATTRIBUTE_AUTHENTICATION);
|
||||||
|
Object oUserDetails = authentication.getPrincipal();
|
||||||
|
if (oUserDetails instanceof UserDetails) {
|
||||||
|
UserDetails userDetails = (UserDetails) oUserDetails;
|
||||||
|
|
||||||
|
Animal animal = serviceAnimal.getAnimalProgressionByVeterinary(userDetails.getUsername(), animalId, progressionByMeValue);
|
||||||
|
pModel.addAttribute(MODEL_MAP_ANIMAL, animal);
|
||||||
|
|
||||||
|
List<Animal> animals = serviceAnimal.getAnimals(userDetails.getUsername());
|
||||||
|
pModel.addAttribute(MODEL_MAP_ANIMAL_LIST, animals);
|
||||||
|
|
||||||
|
pModel.addAttribute(MODEL_MAP_PROGRESSION, progressionByMeValue);
|
||||||
|
pModel.addAttribute(MODEL_MAP_PROGRESSION_TYPE, "by_veterinary");
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = IndexController.PAGE_ANIMAL_PROGRESSION;
|
ret = IndexController.PAGE_ANIMAL_PROGRESSION;
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ public class IndexController {
|
||||||
public static final String URL_LOGIN = "/login";
|
public static final String URL_LOGIN = "/login";
|
||||||
public static final String URL_LOGOUT = "/logout";
|
public static final String URL_LOGOUT = "/logout";
|
||||||
public static final String URL_REGISTER = "/register";
|
public static final String URL_REGISTER = "/register";
|
||||||
|
public static final String URL_CHANGE_PASSWORD = "/change_password";
|
||||||
public static final String URL_INDEX = "/";
|
public static final String URL_INDEX = "/";
|
||||||
|
|
||||||
public static final String URL_ANIMAL_LIST = "/animal";
|
public static final String URL_ANIMAL_LIST = "/animal";
|
||||||
|
|
@ -45,6 +46,8 @@ public class IndexController {
|
||||||
public static final String URL_ANIMAL_CARE = "/animal/{animal_id}/care/{care_id}";
|
public static final String URL_ANIMAL_CARE = "/animal/{animal_id}/care/{care_id}";
|
||||||
public static final String URL_ANIMAL_BEHAVIOR = "/animal/{animal_id}/consent_behavior/{consent_behavior_id}";
|
public static final String URL_ANIMAL_BEHAVIOR = "/animal/{animal_id}/consent_behavior/{consent_behavior_id}";
|
||||||
public static final String URL_ANIMAL_PROGRESSION_BY_ME = "/animal/{animal_id}/progression_by_me/{progression_value}";
|
public static final String URL_ANIMAL_PROGRESSION_BY_ME = "/animal/{animal_id}/progression_by_me/{progression_value}";
|
||||||
|
public static final String URL_ANIMAL_PROGRESSION_BY_SOMEONE_ELSE = "/animal/{animal_id}/progression_by_someone_else/{progression_value}";
|
||||||
|
public static final String URL_ANIMAL_PROGRESSION_BY_VETERINARY = "/animal/{animal_id}/progression_by_veterinary/{progression_value}";
|
||||||
public static final String URL_ANIMAL_PROGRESSIONS_LIST = "/animal/{animal_id}/progressions";
|
public static final String URL_ANIMAL_PROGRESSIONS_LIST = "/animal/{animal_id}/progressions";
|
||||||
|
|
||||||
// Add URL
|
// Add URL
|
||||||
|
|
|
||||||
|
|
@ -341,10 +341,170 @@ public class ProgressionDao extends PostgresSqlDao implements IProgressionDao {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillAnimalProgressionBySomeoneElse(Animal animal, String progressionBySomeoneElse) {
|
public void fillAnimalProgressionBySomeoneElse(Animal animal, String progressionBySomeoneElse) {
|
||||||
|
Connection conn = null;
|
||||||
|
PreparedStatement statement = null;
|
||||||
|
ResultSet resultSet = null;
|
||||||
|
try {
|
||||||
|
conn = mDataSource.getConnection();
|
||||||
|
statement = conn.prepareStatement("select "
|
||||||
|
+ AnimalDao.TABLE_NAME+".id as animal_id, "+AnimalDao.TABLE_NAME+".name as animal_name, "+AnimalDao.TABLE_NAME+".owner as animal_owner, "
|
||||||
|
+ TABLE_NAME+".id as progression_id, "+TABLE_NAME+".progression_by_me as prog_by_me, "+TABLE_NAME+".progression_by_someone_else as prog_by_someone_else, "+TABLE_NAME+".progression_by_veterinary as prog_by_vet, "
|
||||||
|
+ TABLE_NAME+".care as care_id, "+TABLE_NAME+".consent_behavior as consent_behavior_id, "
|
||||||
|
+ CareDao.TABLE_NAME+".name as care_name, "+CareDao.TABLE_NAME+".description as care_desc, "
|
||||||
|
+ ConsentBehaviorDao.TABLE_NAME+".name as consent_behavior_name, "+ConsentBehaviorDao.TABLE_NAME+".description as consent_behavior_desc "
|
||||||
|
+ "from "+TABLE_NAME+" "
|
||||||
|
+ "left join "+AnimalDao.TABLE_NAME+" on "+TABLE_NAME+".animal = "+AnimalDao.TABLE_NAME+".id "
|
||||||
|
+ "left join "+CareDao.TABLE_NAME+" on "+TABLE_NAME+".care = "+CareDao.TABLE_NAME+".id "
|
||||||
|
+ "left join "+ConsentBehaviorDao.TABLE_NAME+" on "+TABLE_NAME+".consent_behavior = "+ConsentBehaviorDao.TABLE_NAME+".id "
|
||||||
|
+ "where "+AnimalDao.TABLE_NAME+".owner = ? and "+AnimalDao.TABLE_NAME+".id = ? and "+TABLE_NAME+".progression_by_someone_else = ?;");
|
||||||
|
statement.setString(1, animal.getOwner());
|
||||||
|
statement.setInt(2, animal.getId());
|
||||||
|
statement.setString(3, progressionBySomeoneElse);
|
||||||
|
System.out.println(IndexController.LOG_TAG + " SQL -> " + statement.toString());
|
||||||
|
resultSet = statement.executeQuery();
|
||||||
|
|
||||||
|
if (resultSet != null) {
|
||||||
|
while (resultSet.next()) {
|
||||||
|
Progression progression = new Progression();
|
||||||
|
progression.setId(resultSet.getInt("progression_id"));
|
||||||
|
progression.setProgressionByMe(resultSet.getString("prog_by_me"));
|
||||||
|
progression.setProgressionBySomeoneElse(resultSet.getString("prog_by_someone_else"));
|
||||||
|
progression.setProgressionByVeterinary(resultSet.getString("prog_by_vet"));
|
||||||
|
|
||||||
|
int careId = resultSet.getInt("care_id");
|
||||||
|
if (!animal.containsCareKey(careId)) {
|
||||||
|
Care care = new Care();
|
||||||
|
care.setId(careId);
|
||||||
|
care.setName(resultSet.getString("care_name"));
|
||||||
|
care.setDescription(resultSet.getString("care_desc"));
|
||||||
|
animal.addCare(care);
|
||||||
|
}
|
||||||
|
progression.setCare(animal.getCareById(careId));
|
||||||
|
|
||||||
|
int consentBehaviorId = resultSet.getInt("consent_behavior_id");
|
||||||
|
if (!animal.containsConsentBehaviorKey(consentBehaviorId)) {
|
||||||
|
ConsentBehavior consentBehavior = new ConsentBehavior();
|
||||||
|
consentBehavior.setId(consentBehaviorId);
|
||||||
|
consentBehavior.setName(resultSet.getString("consent_behavior_name"));
|
||||||
|
consentBehavior.setDescription(resultSet.getString("consent_behavior_desc"));
|
||||||
|
animal.addConsentBehavior(consentBehavior);
|
||||||
|
}
|
||||||
|
progression.setConsentBehavior(animal.getConsentBehaviorById(consentBehaviorId));
|
||||||
|
|
||||||
|
animal.addProgression(progression);
|
||||||
|
}
|
||||||
|
resultSet.close();
|
||||||
|
}
|
||||||
|
} catch (SQLException ex) {
|
||||||
|
System.err.println(IndexController.LOG_TAG + " SQLException -> fillAnimalProgressionBySomeoneElse() - " + ex.getMessage());
|
||||||
|
ex.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
if (resultSet != null) {
|
||||||
|
try {
|
||||||
|
resultSet.close();
|
||||||
|
} catch (SQLException ex) {
|
||||||
|
System.err.println(IndexController.LOG_TAG + " Failed close ResultSet -> fillAnimalProgressionBySomeoneElse()");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (statement != null) {
|
||||||
|
try {
|
||||||
|
statement.close();
|
||||||
|
} catch (SQLException ex) {
|
||||||
|
System.err.println(IndexController.LOG_TAG + " Failed close statement -> fillAnimalProgressionBySomeoneElse()");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (conn != null) {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (SQLException ex) {
|
||||||
|
System.err.println(IndexController.LOG_TAG + " Failed close connection -> fillAnimalProgressionBySomeoneElse()");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fillAnimalProgressionByVeterinary(Animal animal, String progressionByVeterinary) {
|
public void fillAnimalProgressionByVeterinary(Animal animal, String progressionByVeterinary) {
|
||||||
|
Connection conn = null;
|
||||||
|
PreparedStatement statement = null;
|
||||||
|
ResultSet resultSet = null;
|
||||||
|
try {
|
||||||
|
conn = mDataSource.getConnection();
|
||||||
|
statement = conn.prepareStatement("select "
|
||||||
|
+ AnimalDao.TABLE_NAME+".id as animal_id, "+AnimalDao.TABLE_NAME+".name as animal_name, "+AnimalDao.TABLE_NAME+".owner as animal_owner, "
|
||||||
|
+ TABLE_NAME+".id as progression_id, "+TABLE_NAME+".progression_by_me as prog_by_me, "+TABLE_NAME+".progression_by_someone_else as prog_by_someone_else, "+TABLE_NAME+".progression_by_veterinary as prog_by_vet, "
|
||||||
|
+ TABLE_NAME+".care as care_id, "+TABLE_NAME+".consent_behavior as consent_behavior_id, "
|
||||||
|
+ CareDao.TABLE_NAME+".name as care_name, "+CareDao.TABLE_NAME+".description as care_desc, "
|
||||||
|
+ ConsentBehaviorDao.TABLE_NAME+".name as consent_behavior_name, "+ConsentBehaviorDao.TABLE_NAME+".description as consent_behavior_desc "
|
||||||
|
+ "from "+TABLE_NAME+" "
|
||||||
|
+ "left join "+AnimalDao.TABLE_NAME+" on "+TABLE_NAME+".animal = "+AnimalDao.TABLE_NAME+".id "
|
||||||
|
+ "left join "+CareDao.TABLE_NAME+" on "+TABLE_NAME+".care = "+CareDao.TABLE_NAME+".id "
|
||||||
|
+ "left join "+ConsentBehaviorDao.TABLE_NAME+" on "+TABLE_NAME+".consent_behavior = "+ConsentBehaviorDao.TABLE_NAME+".id "
|
||||||
|
+ "where "+AnimalDao.TABLE_NAME+".owner = ? and "+AnimalDao.TABLE_NAME+".id = ? and "+TABLE_NAME+".progression_by_veterinary = ?;");
|
||||||
|
statement.setString(1, animal.getOwner());
|
||||||
|
statement.setInt(2, animal.getId());
|
||||||
|
statement.setString(3, progressionByVeterinary);
|
||||||
|
System.out.println(IndexController.LOG_TAG + " SQL -> " + statement.toString());
|
||||||
|
resultSet = statement.executeQuery();
|
||||||
|
|
||||||
|
if (resultSet != null) {
|
||||||
|
while (resultSet.next()) {
|
||||||
|
Progression progression = new Progression();
|
||||||
|
progression.setId(resultSet.getInt("progression_id"));
|
||||||
|
progression.setProgressionByMe(resultSet.getString("prog_by_me"));
|
||||||
|
progression.setProgressionBySomeoneElse(resultSet.getString("prog_by_someone_else"));
|
||||||
|
progression.setProgressionByVeterinary(resultSet.getString("prog_by_vet"));
|
||||||
|
|
||||||
|
int careId = resultSet.getInt("care_id");
|
||||||
|
if (!animal.containsCareKey(careId)) {
|
||||||
|
Care care = new Care();
|
||||||
|
care.setId(careId);
|
||||||
|
care.setName(resultSet.getString("care_name"));
|
||||||
|
care.setDescription(resultSet.getString("care_desc"));
|
||||||
|
animal.addCare(care);
|
||||||
|
}
|
||||||
|
progression.setCare(animal.getCareById(careId));
|
||||||
|
|
||||||
|
int consentBehaviorId = resultSet.getInt("consent_behavior_id");
|
||||||
|
if (!animal.containsConsentBehaviorKey(consentBehaviorId)) {
|
||||||
|
ConsentBehavior consentBehavior = new ConsentBehavior();
|
||||||
|
consentBehavior.setId(consentBehaviorId);
|
||||||
|
consentBehavior.setName(resultSet.getString("consent_behavior_name"));
|
||||||
|
consentBehavior.setDescription(resultSet.getString("consent_behavior_desc"));
|
||||||
|
animal.addConsentBehavior(consentBehavior);
|
||||||
|
}
|
||||||
|
progression.setConsentBehavior(animal.getConsentBehaviorById(consentBehaviorId));
|
||||||
|
|
||||||
|
animal.addProgression(progression);
|
||||||
|
}
|
||||||
|
resultSet.close();
|
||||||
|
}
|
||||||
|
} catch (SQLException ex) {
|
||||||
|
System.err.println(IndexController.LOG_TAG + " SQLException -> fillAnimalProgressionByVeterinary() - " + ex.getMessage());
|
||||||
|
ex.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
if (resultSet != null) {
|
||||||
|
try {
|
||||||
|
resultSet.close();
|
||||||
|
} catch (SQLException ex) {
|
||||||
|
System.err.println(IndexController.LOG_TAG + " Failed close ResultSet -> fillAnimalProgressionByVeterinary()");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (statement != null) {
|
||||||
|
try {
|
||||||
|
statement.close();
|
||||||
|
} catch (SQLException ex) {
|
||||||
|
System.err.println(IndexController.LOG_TAG + " Failed close statement -> fillAnimalProgressionByVeterinary()");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (conn != null) {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (SQLException ex) {
|
||||||
|
System.err.println(IndexController.LOG_TAG + " Failed close connection -> fillAnimalProgressionByVeterinary()");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//</editor-fold>
|
//</editor-fold>
|
||||||
|
|
||||||
|
|
@ -464,7 +624,7 @@ public class ProgressionDao extends PostgresSqlDao implements IProgressionDao {
|
||||||
conn = mDataSource.getConnection();
|
conn = mDataSource.getConnection();
|
||||||
statement = conn.prepareStatement("DELETE FROM "+TABLE_NAME+" WHERE animal = ("
|
statement = conn.prepareStatement("DELETE FROM "+TABLE_NAME+" WHERE animal = ("
|
||||||
+ "SELECT id FROM "+AnimalDao.TABLE_NAME+" WHERE owner = ? AND id = ?) "
|
+ "SELECT id FROM "+AnimalDao.TABLE_NAME+" WHERE owner = ? AND id = ?) "
|
||||||
+ "AND care = (SELECT id FROM "+ConsentBehaviorDao.TABLE_NAME+" WHERE animal = ? AND id = ?)");
|
+ "AND consent_behavior = (SELECT id FROM "+ConsentBehaviorDao.TABLE_NAME+" WHERE animal = ? AND id = ?)");
|
||||||
statement.setString(1, owner);
|
statement.setString(1, owner);
|
||||||
statement.setInt(2, animalId);
|
statement.setInt(2, animalId);
|
||||||
statement.setInt(3, animalId);
|
statement.setInt(3, animalId);
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ public interface IServiceAnimal {
|
||||||
public Animal getAnimalCareProgression(String owner, int animalId, int careId);
|
public Animal getAnimalCareProgression(String owner, int animalId, int careId);
|
||||||
public Animal getAnimalConsentBehaviorProgression(String owner, int animalId, int consentBehaviorId);
|
public Animal getAnimalConsentBehaviorProgression(String owner, int animalId, int consentBehaviorId);
|
||||||
public Animal getAnimalProgressionByMe(String username, int animalId, String progressionValue);
|
public Animal getAnimalProgressionByMe(String username, int animalId, String progressionValue);
|
||||||
|
public Animal getAnimalProgressionBySomeoneElse(String username, int animalId, String progressionValue);
|
||||||
|
public Animal getAnimalProgressionByVeterinary(String username, int animalId, String progressionValue);
|
||||||
public List<ConsentBehavior> getAnimalConsentBehaviors(String username, int animalId);
|
public List<ConsentBehavior> getAnimalConsentBehaviors(String username, int animalId);
|
||||||
public List<Care> getAnimalCares(String username, int animalId);
|
public List<Care> getAnimalCares(String username, int animalId);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,5 @@ import fr.geoffrey.medical_training_tracker.dao.UserAlreadyExistException;
|
||||||
*/
|
*/
|
||||||
public interface IServiceRegister {
|
public interface IServiceRegister {
|
||||||
public boolean register(String username, String password, String passwordCheck, String name) throws UserAlreadyExistException;
|
public boolean register(String username, String password, String passwordCheck, String name) throws UserAlreadyExistException;
|
||||||
|
public boolean changePassword(String username, String oldPassword, String newPassword, String newPasswordCheck);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,24 @@ public class ServiceAnimal implements IServiceAnimal {
|
||||||
return animal;
|
return animal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Animal getAnimalProgressionBySomeoneElse(String username, int animalId, String progressionValue) {
|
||||||
|
Animal animal = animalDao.getAnimal(username, animalId);
|
||||||
|
if (animal != null) {
|
||||||
|
progressionDao.fillAnimalProgressionBySomeoneElse(animal, progressionValue);
|
||||||
|
}
|
||||||
|
return animal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Animal getAnimalProgressionByVeterinary(String username, int animalId, String progressionValue) {
|
||||||
|
Animal animal = animalDao.getAnimal(username, animalId);
|
||||||
|
if (animal != null) {
|
||||||
|
progressionDao.fillAnimalProgressionByVeterinary(animal, progressionValue);
|
||||||
|
}
|
||||||
|
return animal;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ConsentBehavior> getAnimalConsentBehaviors(String username, int animalId) {
|
public List<ConsentBehavior> getAnimalConsentBehaviors(String username, int animalId) {
|
||||||
return consentBehaviorDao.getAllAnialConsentBehavior(username, animalId);
|
return consentBehaviorDao.getAllAnialConsentBehavior(username, animalId);
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ package fr.geoffrey.medical_training_tracker.services;
|
||||||
import fr.geoffrey.medical_training_tracker.config.encoder.Encoder;
|
import fr.geoffrey.medical_training_tracker.config.encoder.Encoder;
|
||||||
import fr.geoffrey.medical_training_tracker.dao.IUserDao;
|
import fr.geoffrey.medical_training_tracker.dao.IUserDao;
|
||||||
import fr.geoffrey.medical_training_tracker.dao.UserAlreadyExistException;
|
import fr.geoffrey.medical_training_tracker.dao.UserAlreadyExistException;
|
||||||
|
import fr.geoffrey.medical_training_tracker.dao.bean.User;
|
||||||
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||||
|
|
||||||
|
|
||||||
public class ServiceRegister implements IServiceRegister {
|
public class ServiceRegister implements IServiceRegister {
|
||||||
|
|
@ -25,5 +27,19 @@ public class ServiceRegister implements IServiceRegister {
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean changePassword(String username, String oldPassword, String newPassword, String newPasswordCheck) {
|
||||||
|
boolean ret = false;
|
||||||
|
PasswordEncoder encoder = Encoder.getInstance();
|
||||||
|
User user = userDao.getUser(username);
|
||||||
|
if (encoder.matches(oldPassword, user.getPassword())) {
|
||||||
|
if (!newPassword.equals("") && newPassword.equals(newPasswordCheck)) {
|
||||||
|
String hashedPassword = encoder.encode(newPassword);
|
||||||
|
ret = userDao.updatePassword(username, hashedPassword);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,26 @@ navbar.cares_and_behaviors = Care and Behaviors
|
||||||
|
|
||||||
footer.license = Application under {0} license
|
footer.license = Application under {0} license
|
||||||
footer.source_code = Source code
|
footer.source_code = Source code
|
||||||
|
|
||||||
progression.value.NOT_TRAINED=Not trained
|
progression.value.NOT_TRAINED=Not trained
|
||||||
progression.value.CURRENTLY_TRAINING=Currently training
|
progression.value.CURRENTLY_TRAINING=Currently training
|
||||||
progression.value.TRAINED=Done
|
progression.value.TRAINED=Done
|
||||||
|
progression.by_me=Progression by me
|
||||||
|
progression.by_someone_else=Progression by someone else
|
||||||
|
progression.by_veterinary=Done by veterinary
|
||||||
|
|
||||||
|
register.title=Sign up
|
||||||
|
register.label.login=Username:
|
||||||
|
register.placeholder.login=Username
|
||||||
|
register.label.password=Password:
|
||||||
|
register.placeholder.password=Password
|
||||||
|
register.label.password_check=Check password:
|
||||||
|
register.placeholder.password_check=Password
|
||||||
|
register.button.submit=Create
|
||||||
|
|
||||||
|
authentication.title=Authentication
|
||||||
|
authentication.label.login=Username:
|
||||||
|
authentication.placeholder.login=Username
|
||||||
|
authentication.label.password=Password:
|
||||||
|
authentication.placeholder.password=Password
|
||||||
|
authentication.button.submit=Login
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,26 @@ navbar.cares_and_behaviors = Care and Behaviors
|
||||||
|
|
||||||
footer.source_code=Source code
|
footer.source_code=Source code
|
||||||
footer.license=Application under {0} license
|
footer.license=Application under {0} license
|
||||||
|
|
||||||
progression.value.NOT_TRAINED=Not trained
|
progression.value.NOT_TRAINED=Not trained
|
||||||
progression.value.CURRENTLY_TRAINING=Currently training
|
progression.value.CURRENTLY_TRAINING=Currently training
|
||||||
progression.value.TRAINED=Done
|
progression.value.TRAINED=Done
|
||||||
|
progression.by_me=Progression by me
|
||||||
|
progression.by_someone_else=Progression by someone else
|
||||||
|
progression.by_veterinary=Done by veterinary
|
||||||
|
|
||||||
|
register.title=Sign up
|
||||||
|
register.label.login=Username:
|
||||||
|
register.placeholder.login=Username
|
||||||
|
register.label.password=Password:
|
||||||
|
register.placeholder.password=Password
|
||||||
|
register.label.password_check=Check password:
|
||||||
|
register.placeholder.password_check=Password
|
||||||
|
register.button.submit=Create
|
||||||
|
|
||||||
|
authentication.title=Authentication
|
||||||
|
authentication.label.login=Username:
|
||||||
|
authentication.placeholder.login=Username
|
||||||
|
authentication.label.password=Password:
|
||||||
|
authentication.placeholder.password=Password
|
||||||
|
authentication.button.submit=Login
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,26 @@ navbar.cares_and_behaviors = Soins et Comportements
|
||||||
|
|
||||||
footer.source_code=Code source
|
footer.source_code=Code source
|
||||||
footer.license=Application sous licence {0}
|
footer.license=Application sous licence {0}
|
||||||
|
|
||||||
progression.value.NOT_TRAINED=Non entrainn\u00e9
|
progression.value.NOT_TRAINED=Non entrainn\u00e9
|
||||||
progression.value.CURRENTLY_TRAINING=En cours
|
progression.value.CURRENTLY_TRAINING=En cours
|
||||||
progression.value.TRAINED=Fait
|
progression.value.TRAINED=Fait
|
||||||
|
progression.by_me=Progression par moi
|
||||||
|
progression.by_someone_else=Progression par quelqu'un d'autre
|
||||||
|
progression.by_veterinary=R\u00e9alis\u00e9 par le v\u00e9t\u00e9rinaire
|
||||||
|
|
||||||
|
register.title=Cr\u00e9ation du compte
|
||||||
|
register.label.login=Nom d'utilisateur :
|
||||||
|
register.placeholder.login=Nom d'utilisateur
|
||||||
|
register.label.password=Mot de passe :
|
||||||
|
register.placeholder.password=Mot de passe
|
||||||
|
register.label.password_check=V\u00e9rification du mot de passe :
|
||||||
|
register.placeholder.password_check=Mot de passe
|
||||||
|
register.button.submit=Cr\u00e9er
|
||||||
|
|
||||||
|
authentication.title=Authentification
|
||||||
|
authentication.label.login=Nom d'utilisateur :
|
||||||
|
authentication.placeholder.login=Nom d'utilisateur
|
||||||
|
authentication.label.password=Mot de passe :
|
||||||
|
authentication.placeholder.password=Mot de passe
|
||||||
|
authentication.button.submit=Connexion
|
||||||
|
|
|
||||||
|
|
@ -55,17 +55,29 @@
|
||||||
<c:if test="${progression.getProgressionByMe() == 'TRAINED'}">success</c:if>
|
<c:if test="${progression.getProgressionByMe() == 'TRAINED'}">success</c:if>
|
||||||
<c:if test="${progression.getProgressionByMe() == 'CURRENTLY_TRAINING'}">info</c:if>
|
<c:if test="${progression.getProgressionByMe() == 'CURRENTLY_TRAINING'}">info</c:if>
|
||||||
<c:if test="${progression.getProgressionByMe() == 'NOT_TRAINED'}">active</c:if>
|
<c:if test="${progression.getProgressionByMe() == 'NOT_TRAINED'}">active</c:if>
|
||||||
">${progression.getProgressionByMe()}</td>
|
">
|
||||||
|
<a href="${animalURL}/${MODEL_MAP_ANIMAL.getId()}/progression_by_me/${progression.getProgressionByMe()}">
|
||||||
|
<fmt:message key="progression.value.${progression.getProgressionByMe()}"></fmt:message>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td class="
|
<td class="
|
||||||
<c:if test="${progression.getProgressionBySomeoneElse() == 'TRAINED'}">success</c:if>
|
<c:if test="${progression.getProgressionBySomeoneElse() == 'TRAINED'}">success</c:if>
|
||||||
<c:if test="${progression.getProgressionBySomeoneElse() == 'CURRENTLY_TRAINING'}">info</c:if>
|
<c:if test="${progression.getProgressionBySomeoneElse() == 'CURRENTLY_TRAINING'}">info</c:if>
|
||||||
<c:if test="${progression.getProgressionBySomeoneElse() == 'NOT_TRAINED'}">active</c:if>
|
<c:if test="${progression.getProgressionBySomeoneElse() == 'NOT_TRAINED'}">active</c:if>
|
||||||
">${progression.getProgressionBySomeoneElse()}</td>
|
">
|
||||||
|
<a href="${animalURL}/${MODEL_MAP_ANIMAL.getId()}/progression_by_someone_else/${progression.getProgressionBySomeoneElse()}">
|
||||||
|
<fmt:message key="progression.value.${progression.getProgressionBySomeoneElse()}"></fmt:message>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td class="
|
<td class="
|
||||||
<c:if test="${progression.getProgressionByVeterinary() == 'TRAINED'}">success</c:if>
|
<c:if test="${progression.getProgressionByVeterinary() == 'TRAINED'}">success</c:if>
|
||||||
<c:if test="${progression.getProgressionByVeterinary() == 'CURRENTLY_TRAINING'}">info</c:if>
|
<c:if test="${progression.getProgressionByVeterinary() == 'CURRENTLY_TRAINING'}">info</c:if>
|
||||||
<c:if test="${progression.getProgressionByVeterinary() == 'NOT_TRAINED'}">active</c:if>
|
<c:if test="${progression.getProgressionByVeterinary() == 'NOT_TRAINED'}">active</c:if>
|
||||||
">${progression.getProgressionByVeterinary()}</td>
|
">
|
||||||
|
<a href="${animalURL}/${MODEL_MAP_ANIMAL.getId()}/progression_by_veterinary/${progression.getProgressionByVeterinary()}">
|
||||||
|
<fmt:message key="progression.value.${progression.getProgressionByVeterinary()}"></fmt:message>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<form class="pull-right" action="${animalDeleteProgressionURL}/${progression.getId()}" method="POST">
|
<form class="pull-right" action="${animalDeleteProgressionURL}/${progression.getId()}" method="POST">
|
||||||
<label class="sr-only" for="form_page">Page</label>
|
<label class="sr-only" for="form_page">Page</label>
|
||||||
|
|
@ -100,4 +112,10 @@
|
||||||
<%@ include file="base/footer.jsp" %>
|
<%@ include file="base/footer.jsp" %>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function () {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -64,12 +64,20 @@
|
||||||
<c:if test="${progression.getProgressionBySomeoneElse() == 'TRAINED'}">success</c:if>
|
<c:if test="${progression.getProgressionBySomeoneElse() == 'TRAINED'}">success</c:if>
|
||||||
<c:if test="${progression.getProgressionBySomeoneElse() == 'CURRENTLY_TRAINING'}">info</c:if>
|
<c:if test="${progression.getProgressionBySomeoneElse() == 'CURRENTLY_TRAINING'}">info</c:if>
|
||||||
<c:if test="${progression.getProgressionBySomeoneElse() == 'NOT_TRAINED'}">active</c:if>
|
<c:if test="${progression.getProgressionBySomeoneElse() == 'NOT_TRAINED'}">active</c:if>
|
||||||
"><fmt:message key="progression.value.${progression.getProgressionBySomeoneElse()}"></fmt:message></td>
|
">
|
||||||
|
<a href="${animalURL}/${MODEL_MAP_ANIMAL.getId()}/progression_by_someone_else/${progression.getProgressionBySomeoneElse()}">
|
||||||
|
<fmt:message key="progression.value.${progression.getProgressionBySomeoneElse()}"></fmt:message>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td class="
|
<td class="
|
||||||
<c:if test="${progression.getProgressionByVeterinary() == 'TRAINED'}">success</c:if>
|
<c:if test="${progression.getProgressionByVeterinary() == 'TRAINED'}">success</c:if>
|
||||||
<c:if test="${progression.getProgressionByVeterinary() == 'CURRENTLY_TRAINING'}">info</c:if>
|
<c:if test="${progression.getProgressionByVeterinary() == 'CURRENTLY_TRAINING'}">info</c:if>
|
||||||
<c:if test="${progression.getProgressionByVeterinary() == 'NOT_TRAINED'}">active</c:if>
|
<c:if test="${progression.getProgressionByVeterinary() == 'NOT_TRAINED'}">active</c:if>
|
||||||
"><fmt:message key="progression.value.${progression.getProgressionByVeterinary()}"></fmt:message></td>
|
">
|
||||||
|
<a href="${animalURL}/${MODEL_MAP_ANIMAL.getId()}/progression_by_veterinary/${progression.getProgressionByVeterinary()}">
|
||||||
|
<fmt:message key="progression.value.${progression.getProgressionByVeterinary()}"></fmt:message>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<form class="pull-right" action="${animalDeleteProgressionURL}/${progression.getId()}" method="POST">
|
<form class="pull-right" action="${animalDeleteProgressionURL}/${progression.getId()}" method="POST">
|
||||||
<label class="sr-only" for="form_page">Page</label>
|
<label class="sr-only" for="form_page">Page</label>
|
||||||
|
|
@ -103,4 +111,10 @@
|
||||||
<%@ include file="base/footer.jsp" %>
|
<%@ include file="base/footer.jsp" %>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function () {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -105,4 +105,10 @@
|
||||||
<%@ include file="base/footer.jsp" %>
|
<%@ include file="base/footer.jsp" %>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function () {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<%@ include file="base/navbar.jsp" %>
|
<%@ include file="base/navbar.jsp" %>
|
||||||
<center><h1>Feuille de ${MODEL_MAP_ANIMAL.getName()}</h1></center>
|
<center><h1>Feuille de ${MODEL_MAP_ANIMAL.getName()}</h1></center>
|
||||||
<h4>Progression par moi ${MODEL_MAP_PROGRESSION}</h4>
|
<h4><fmt:message key="progression.${MODEL_MAP_PROGRESSION_TYPE}"></fmt:message> - <fmt:message key="progression.value.${MODEL_MAP_PROGRESSION}"></fmt:message></h4>
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -55,4 +55,10 @@
|
||||||
<%@ include file="base/footer.jsp" %>
|
<%@ include file="base/footer.jsp" %>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function () {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -18,16 +18,15 @@
|
||||||
|
|
||||||
<spring:url value="/login" var="loginURL_POST" />
|
<spring:url value="/login" var="loginURL_POST" />
|
||||||
<form id="loginForm" class="form-signin" action="${loginURL_POST}" method="POST">
|
<form id="loginForm" class="form-signin" action="${loginURL_POST}" method="POST">
|
||||||
<h2 class="form-signin-heading">Authentification</h2>
|
<h2 class="form-signin-heading"><fmt:message key="authentication.title"></fmt:message></h2>
|
||||||
|
|
||||||
<!--
|
<label for="username"><fmt:message key="authentication.label.login"></fmt:message></label>
|
||||||
<input type="text" id="inputLogin" name="inputLogin" class="form-control" placeholder="Login" required autofocus />
|
<input type="text" id="username" name="username" class="form-control" placeholder="<fmt:message key="authentication.placeholder.login"></fmt:message>" required autofocus />
|
||||||
<input type="password" id="inputPassword" name="inputPassword" class="form-control" placeholder="Mot de passe" required />
|
|
||||||
-->
|
|
||||||
<input type="text" id="inputLogin" name="username" class="form-control" placeholder="Login" required autofocus />
|
|
||||||
<input type="password" id="inputPassword" name="password" class="form-control" placeholder="Mot de passe" required />
|
|
||||||
|
|
||||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Valider</button>
|
<label for="username"><fmt:message key="authentication.label.password"></fmt:message></label>
|
||||||
|
<input type="password" id="inputPassword" name="password" class="form-control" placeholder="<fmt:message key="authentication.placeholder.password"></fmt:message>" required />
|
||||||
|
|
||||||
|
<button class="btn btn-lg btn-primary btn-block" type="submit"><fmt:message key="authentication.button.submit"></fmt:message></button>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<p id="errorAuth" style="color: red;" hidden>Erreur lors de l'authentification</p>
|
<p id="errorAuth" style="color: red;" hidden>Erreur lors de l'authentification</p>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||||
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
|
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
|
||||||
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
|
||||||
<%@ page isELIgnored="false"%>
|
<%@ page isELIgnored="false"%>
|
||||||
|
|
||||||
<%@ include file="base/language.jsp" %>
|
<%@ include file="base/language.jsp" %>
|
||||||
|
|
@ -18,14 +17,18 @@
|
||||||
|
|
||||||
<spring:url value="/register" var="registerURL_POST" />
|
<spring:url value="/register" var="registerURL_POST" />
|
||||||
<form id="loginForm" class="form-signin" action="${registerURL_POST}" method="POST">
|
<form id="loginForm" class="form-signin" action="${registerURL_POST}" method="POST">
|
||||||
<h2 class="form-signin-heading">Création d'un compte</h2>
|
<h2 class="form-signin-heading"><fmt:message key="register.title"></fmt:message></h2>
|
||||||
|
|
||||||
<input type="text" id="inputLogin" name="username" class="form-control" placeholder="Login" required autofocus value="${MODEL_MAP_REGISTER_USERNAME}" />
|
<label for="username"><fmt:message key="register.label.login"></fmt:message></label>
|
||||||
<input type="password" id="inputPassword" name="password" class="form-control" placeholder="Mot de passe" required />
|
<input type="text" id="username" name="username" class="form-control" placeholder="<fmt:message key="register.placeholder.login"></fmt:message>" required autofocus value="${MODEL_MAP_REGISTER_USERNAME}" />
|
||||||
<input type="password" id="inputPassword" name="password_check" class="form-control" placeholder="Vérification mot de passe" required />
|
|
||||||
<input type="text" id="inputLogin" name="name" class="form-control" placeholder="Nom" value="${MODEL_MAP_REGISTER_NAME}" />
|
<label for="password"><fmt:message key="register.label.password"></fmt:message></label>
|
||||||
|
<input type="password" id="password" name="password" class="form-control" placeholder="<fmt:message key="register.placeholder.password"></fmt:message>" required />
|
||||||
|
|
||||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Valider</button>
|
<label for="password_check"><fmt:message key="register.label.password_check"></fmt:message></label>
|
||||||
|
<input type="password" id="password_check" name="password_check" class="form-control" placeholder="<fmt:message key="register.placeholder.password_check"></fmt:message>" required />
|
||||||
|
|
||||||
|
<button class="btn btn-lg btn-primary btn-block" type="submit"><fmt:message key="register.button.submit"></fmt:message></button>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<p style="color: red;">${MODEL_MAP_REGISTER_ERROR_MESSAGE}</p>
|
<p style="color: red;">${MODEL_MAP_REGISTER_ERROR_MESSAGE}</p>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue