diff --git a/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java b/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java
index 9435b1b30..747947a5a 100644
--- a/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java
+++ b/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java
@@ -47,10 +47,10 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
.antMatchers("/offers/speed/**").hasAnyAuthority("admin", "cliente")
.antMatchers("/offers/food/**").hasAnyAuthority("admin", "cliente")
.antMatchers("/owners/**").hasAnyAuthority("owner", "admin")
-
+
.antMatchers("/clients/new").permitAll()
.antMatchers("/offers").permitAll()
-
+ .antMatchers("/offersCreate").hasAuthority("cliente")
.and().formLogin()
diff --git a/src/main/java/org/springframework/cheapy/web/OfertaController.java b/src/main/java/org/springframework/cheapy/web/OfertaController.java
index c7cb3de71..d1fc6a407 100644
--- a/src/main/java/org/springframework/cheapy/web/OfertaController.java
+++ b/src/main/java/org/springframework/cheapy/web/OfertaController.java
@@ -12,6 +12,9 @@ import org.springframework.cheapy.service.FoodOfferService;
import org.springframework.cheapy.service.NuOfferService;
import org.springframework.cheapy.service.SpeedOfferService;
import org.springframework.cheapy.service.TimeOfferService;
+import org.springframework.security.authentication.AnonymousAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@@ -50,6 +53,12 @@ public class OfertaController {
return "offers/offersList";
}
+
+ @GetMapping("/offersCreate")
+ public String createOffers() {
+
+ return "offers/offersCreate";
+ }
// @GetMapping("/owners/{ownerId}/edit")
// public String initUpdateOwnerForm(@PathVariable("ownerId") int ownerId, Model model) {
diff --git a/src/main/less/cheapy.less b/src/main/less/cheapy.less
index 17d012e1f..52ebdf6ab 100644
--- a/src/main/less/cheapy.less
+++ b/src/main/less/cheapy.less
@@ -240,6 +240,38 @@ img.img-responsive{
background-color: rgb(40, 140, 215);
}
+.btn-home{
+ display: table;
+ margin: 0 auto;
+}
+
+.btn-create button {
+ background-color: rgb(40, 140, 215);
+ border: 1px solid rgb(0, 0, 160);
+ color: white;
+ padding: 10px 24px;
+ cursor: pointer;
+ width: 70%;
+ display: block;
+
+}
+
+.btn-create button:not(:last-child) {
+ border-bottom: none;
+}
+
+
+.btn-create button:hover {
+ background-color: rgb(0, 64, 128)
+}
+
+.btn-create-max button {
+ padding: 20px;
+ margin-left:auto;
+ margin-right: auto;
+ margin-bottom: 20px;
+}
+
.btn-mod{
display: table;
margin: 0 auto;
diff --git a/src/main/resources/messages/messages_es.properties b/src/main/resources/messages/messages_es.properties
index f17c6626b..52ca403e5 100644
--- a/src/main/resources/messages/messages_es.properties
+++ b/src/main/resources/messages/messages_es.properties
@@ -4,10 +4,11 @@ deleteOffer=Eliminar Oferta
cancel=Cancelar
deleteOfferMessage=Confirme que quiere eliminar su oferta
listOffers=Ver Ofertas
-foodOffers=Ofertas por plato especifico
-foodOffer=Oferta por plato especifico
-nuOffers=Ofertas por numero de comensales
-nuOffer=Oferta por numero de comensales
+createOffers=Crear Ofertas
+foodOffers=Ofertas por plato específico
+foodOffer=Oferta por plato específico
+nuOffers=Ofertas por número de comensales
+nuOffer=Oferta por número de comensales
speedOffers=Ofertas rapidez comiendo
speedOffer=Oferta por comer veloz
timeOffers=Ofertas por franja horaria
@@ -27,12 +28,16 @@ offerBeginning=Inicio de la oferta
endDate=Fecha fin
offerEnding=Fin de la oferta
details=Detalles
-offerCode=Codigo de la oferta
+offerCode=Código de la oferta
return=Volver
-required=Es requeridOfertas por franja horariao
+required=Es requerido Ofertas por franja horaria
notFound=No ha sido encontrado
duplicate=Ya se encuentra en uso
-nonNumeric=Sólo debe contener numeros
-duplicateFormSubmission=No se permite el envÃo de formularios duplicados
-typeMismatch.date=Fecha invalida
-typeMismatch.birthDate=Fecha invalida
\ No newline at end of file
+nonNumeric=Sólo debe contener números
+duplicateFormSubmission=No se permite el envío de formularios duplicados
+typeMismatch.date=Fecha inválida
+typeMismatch.birthDate=Fecha inválida
+createFoodOffers= Crear ofertas por plato específico
+createNuOffers= Crear ofertas por número de comensales
+createSpeedOffers= Crear ofertas por rapidez comiendo
+createTimeOffers= Crear ofertas por franja horaria
\ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/jsp/foodOffers/createOrUpdateFoodOfferForm.jsp b/src/main/webapp/WEB-INF/jsp/foodOffers/createOrUpdateFoodOfferForm.jsp
index 5c636d761..b5e5dcfaa 100644
--- a/src/main/webapp/WEB-INF/jsp/foodOffers/createOrUpdateFoodOfferForm.jsp
+++ b/src/main/webapp/WEB-INF/jsp/foodOffers/createOrUpdateFoodOfferForm.jsp
@@ -16,10 +16,10 @@
El usuario y/o la contraseña son incorrectos
+ +Invalid username or password
-