Commit d130fbd2 authored by roxane.carraux's avatar roxane.carraux
Browse files

add date format for helpRequest.date

parent 90ca9bf1
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
package com.example.demo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
@@ -24,7 +26,7 @@ public class HelpRequest {
	private String matiere;
	
	@Column
	private String date;
	private Date date;
	
	@Column
	private String comment;
@@ -44,7 +46,7 @@ public class HelpRequest {
		return matiere;
	}

	public String getDate() {
	public Date getDate() {
		return date;
	}
	
@@ -64,7 +66,7 @@ public class HelpRequest {
		this.matiere = matiere;
	}

	public void setDate(String date) {
	public void setDate(Date date) {
		this.date = date;
	}

+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
			<tr th:each="help: ${helpRequests}">
				<td th:text="${help.id}" />
				<td th:text="${help.matiere}" />
				<td th:text="${help.date}" />
				<td th:text="${#dates.format(help.date, 'dd-MM-yyyy')}"/>
				<td th:text="${help.comment}" />
				<td th:text="${help.poulain.id}" />
			</tr>
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
	<h1>Form HelpRequest</h1>
    <form action="#" th:action="@{/insertHelpRequest}" th:object="${helpRequest}" method="post">
    	<p>HelpRequest matiere: <input type="text" th:field="*{matiere}" /></p>
		<p>HelpRequest date: <input type="text" th:field="*{date}" /></p>
		<p>HelpRequest date: <input type="date" th:field="*{date}" /></p>
		<p>HelpRequest comment: <input type="text" th:field="*{comment}" /></p>
    	<p>HelpRequest Poulain : TODO recup id Poulain</p>
        <p><input type="submit" value="Submit" /> <input type="reset" value="Reset" /></p>