Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Pet.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Pet.java	(revision 988f3facbd3ab2361ef2bc1fa7ceba9d1c74694e)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Pet.java	(revision 468b7b62cf974bd937d2fb853caef76cee7a9714)
@@ -43,10 +43,10 @@
 
     @Column(name = "id_adoption")
-    private int adoptionId;
+    private Integer adoptionId;
 
     @Column(name = "id_shelter")
-    private int shelterId;
+    private Integer shelterId;
 
-    public Pet(String imageUrl, AgeGroup ageGroup, Size size, String breed, String name, Species species, Gender gender, boolean canBeFostered, int adoptionId, int shelterId) {
+    public Pet(String imageUrl, AgeGroup ageGroup, Size size, String breed, String name, Species species, Gender gender, boolean canBeFostered, Integer adoptionId, Integer shelterId) {
         this.imageUrl = imageUrl;
         this.ageGroup = ageGroup;
Index: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Post.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Post.java	(revision 988f3facbd3ab2361ef2bc1fa7ceba9d1c74694e)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Post.java	(revision 468b7b62cf974bd937d2fb853caef76cee7a9714)
@@ -5,5 +5,4 @@
 
 import java.time.LocalDate;
-import java.util.Date;
 
 @Data
@@ -24,13 +23,13 @@
 
     @Column(name="id_pet", nullable = false)
-    private int petId;
+    private Integer petId;
 
     @Column(name="id_surendee")
-    private int surendeeId;
+    private Integer surendeeId;
 
     @Column(name="id_employee")
-    private int employeeId;
+    private Integer employeeId;
 
-    public Post(LocalDate dateCreated, String thumbnailUrl, int petId, int surendeeId, int employeeId) {
+    public Post(LocalDate dateCreated, String thumbnailUrl, Integer petId, Integer surendeeId, Integer employeeId) {
         this.dateCreated = dateCreated;
         this.thumbnailUrl = thumbnailUrl;
Index: Prototype Application/Paw5/src/main/java/finki/paw5/service/PetService.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/service/PetService.java	(revision 988f3facbd3ab2361ef2bc1fa7ceba9d1c74694e)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/service/PetService.java	(revision 468b7b62cf974bd937d2fb853caef76cee7a9714)
@@ -1,4 +1,8 @@
 package finki.paw5.service;
 
+import finki.paw5.model.entities.Pet;
+
 public interface PetService {
+
+    void save (Pet pet);
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/service/PostService.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/service/PostService.java	(revision 988f3facbd3ab2361ef2bc1fa7ceba9d1c74694e)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/service/PostService.java	(revision 468b7b62cf974bd937d2fb853caef76cee7a9714)
@@ -9,5 +9,5 @@
 public interface PostService {
 
-    Post submit (String pet_name, Gender gender, AgeGroup ageGroup, Size size, Species species, String breed, String urlimage);
+    void save (Post post);
 
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/service/implementation/PetServiceImplementation.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/service/implementation/PetServiceImplementation.java	(revision 988f3facbd3ab2361ef2bc1fa7ceba9d1c74694e)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/service/implementation/PetServiceImplementation.java	(revision 468b7b62cf974bd937d2fb853caef76cee7a9714)
@@ -1,4 +1,5 @@
 package finki.paw5.service.implementation;
 
+import finki.paw5.model.entities.Pet;
 import finki.paw5.repository.PetRepository;
 import finki.paw5.service.PetService;
@@ -14,3 +15,7 @@
     }
 
+    @Override
+    public void save(Pet pet) {
+        this.petRepository.save(pet);
+    }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/service/implementation/PostServiceImplementation.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/service/implementation/PostServiceImplementation.java	(revision 988f3facbd3ab2361ef2bc1fa7ceba9d1c74694e)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/service/implementation/PostServiceImplementation.java	(revision 468b7b62cf974bd937d2fb853caef76cee7a9714)
@@ -2,8 +2,4 @@
 
 import finki.paw5.model.entities.Post;
-import finki.paw5.model.enumerations.AgeGroup;
-import finki.paw5.model.enumerations.Gender;
-import finki.paw5.model.enumerations.Size;
-import finki.paw5.model.enumerations.Species;
 import finki.paw5.repository.PostRepository;
 import finki.paw5.service.PostService;
@@ -20,7 +16,6 @@
 
     @Override
-    public Post submit(String name, Gender gender, AgeGroup ageGroup, Size size, Species species, String breed, String urlimage) {
-        //Post post = new Post(name, gender, ageGroup, size, species, breed, urlimage);
-        return null;
+    public void save(Post post) {
+        this.postRepository.save(post);
     }
 
Index: Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PostController.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PostController.java	(revision 988f3facbd3ab2361ef2bc1fa7ceba9d1c74694e)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PostController.java	(revision 468b7b62cf974bd937d2fb853caef76cee7a9714)
@@ -1,34 +1,54 @@
 package finki.paw5.web.controllers;
 
+import finki.paw5.model.entities.Pet;
+import finki.paw5.model.entities.Post;
 import finki.paw5.model.enumerations.AgeGroup;
 import finki.paw5.model.enumerations.Gender;
 import finki.paw5.model.enumerations.Size;
 import finki.paw5.model.enumerations.Species;
+import finki.paw5.service.PetService;
 import finki.paw5.service.PostService;
 import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 
+import java.time.LocalDate;
+
 @Controller
-@RequestMapping("/CreatePost")
 public class PostController {
 
     private final PostService postService;
+    private final PetService petService;
 
-    public PostController(PostService postService) {
+    public PostController(PostService postService, PetService petService) {
         this.postService = postService;
+        this.petService = petService;
     }
 
-    @PostMapping
-    public String submit(@RequestParam String name,
-                         @RequestParam Gender gender,
-                         @RequestParam AgeGroup ageGroup,
-                         @RequestParam Size size,
-                         @RequestParam Species species,
-                         @RequestParam String breed,
-                         @RequestParam String urlimage) {
+    @GetMapping("create-post")
+    public String get(Model model) {
+        //TODO: vakvo ama za lista so pets
+        //        List<Manufacturer> manufacturers = this.manufacturerService.findAll();
+        //        model.addAttribute("manufacturers", manufacturers);
+        return "create-post";
+    }
 
-        this.postService.submit(name, gender, ageGroup, size, species, breed, urlimage);
+    @PostMapping("submit-post")
+    public String savePost(@RequestParam(required = false) String name,
+                           @RequestParam String gender,
+                           @RequestParam String ageGroup,
+                           @RequestParam String size,
+                           @RequestParam String species,
+                           @RequestParam(required = false) String breed,
+                           @RequestParam(required = false) String imageUrl,
+                           @RequestParam boolean canBeFostered) {
+
+        Pet pet = new Pet(imageUrl, AgeGroup.valueOf(ageGroup), Size.valueOf(size), breed, name, Species.valueOf(species), Gender.valueOf(gender), canBeFostered, null, 1);
+        this.petService.save(pet);
+
+        Post post = new Post(LocalDate.now(), imageUrl, pet.getId(), null, 10);
+        this.postService.save(post);
 
         return null;
Index: ototype Application/Paw5/src/main/resources/templates/CreatePost.html
===================================================================
--- Prototype Application/Paw5/src/main/resources/templates/CreatePost.html	(revision 988f3facbd3ab2361ef2bc1fa7ceba9d1c74694e)
+++ 	(revision )
@@ -1,76 +1,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <title>Create a post</title>
-</head>
-<body>
-    <h1>Create post</h1>
-<form method="post" action="/CreatePost">
-
-    <div id="SelectPet">
-        <label for="pet">Selet pet:</label>
-        <select id="pet">
-        </select>
-    </div>
-
-    <div id="AddNewPet">
-        <label for="newpet">Add new pet:</label>
-            <input id="newpet" name="newpet" placeholder="newpet" type="checkbox">
-    </div>
-
-    <div id="PetName">
-        Name:<input id="name" name="name" placeholder="name" type="text">
-    </div>
-
-    <div id="Genders">
-        <label for="gender">Gender:</label>
-        <select id="gender" name="gender">
-            <option value = "MALE">male</option>
-            <option value = "FEMALE">female</option>
-        </select>
-    </div>
-
-    <div id="AgeGroup">
-        <label for="age">Age Group:</label>
-        <select id="age" name="size">
-            <option value = "YOUNG">young</option>
-            <option value = "ADULT">adult</option>
-            <option value = "ELDER">elder</option>
-        </select>
-    </div>
-
-    <div id="Sizes">
-        <label for="size">Size:</label>
-        <select id="size" name="size">
-            <option value = "XSMALL">extra small</option>
-            <option value = "SMALL">small</option>
-            <option value = "MEDIUM">medium</option>
-            <option value = "LARGE">large</option>
-            <option value = "XLARGE">extra large</option>
-        </select>
-    </div>
-
-    <div id="Species">
-        <label for="specie">Species:</label>
-        <select id="specie" name="specie">
-            <option value = "CAT">cat</option>
-            <option value = "DOG">dog</option>
-            <option value = "BIRD">bird</option>
-        </select>
-    </div>
-
-    <div id="Breeds">
-        Breed:<input id="breed" name="breed" placeholder="breed" type="text">
-    </div>
-
-    <div id="UploadImages">
-        URL of Image:<input id="image" name="image" placeholder="image" type="text">
-       <!-- <label for="upload">Image:</label>
-        <input id="upload" type="file" accept="image/*">
-        <input type="submit">-->
-    </div>
-    <input id="SubmitPost" type="submit">
-</form>
-</body>
-</html>
Index: Prototype Application/Paw5/src/main/resources/templates/create-post.html
===================================================================
--- Prototype Application/Paw5/src/main/resources/templates/create-post.html	(revision 468b7b62cf974bd937d2fb853caef76cee7a9714)
+++ Prototype Application/Paw5/src/main/resources/templates/create-post.html	(revision 468b7b62cf974bd937d2fb853caef76cee7a9714)
@@ -0,0 +1,104 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:th="http://www.thymeleaf.org"
+      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"
+      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
+<head>
+    <meta charset="UTF-8">
+    <title>Create a post</title>
+</head>
+<body>
+    <h1>Create post</h1>
+<form th:action="@{/submit-post}" method="post">
+
+    <div>
+        <label for="pet">Selet pet:</label>
+        <select id="pet">
+        </select>
+    </div>
+
+    <div>
+        <label for="newpet">Add new pet:</label>
+            <input id="newpet" name="newpet" placeholder="newpet" type="checkbox">
+    </div>
+
+    <div>
+        <label for="name">Name:</label>
+        <input type="text"
+               id="name"
+               name="name"
+               placeholder="Enter name">
+    </div>
+
+    <div>
+        <label for="gender">Gender:</label>
+        <select id="gender"
+                name="gender">
+            <option value = "MALE">male</option>
+            <option value = "FEMALE">female</option>
+        </select>
+    </div>
+
+    <div>
+        <label for="ageGroup">Age Group:</label>
+        <select id="ageGroup"
+                name="ageGroup">
+            <option value = "YOUNG">young</option>
+            <option value = "ADULT">adult</option>
+            <option value = "ELDER">elder</option>
+        </select>
+    </div>
+
+    <div>
+        <label for="size">Size:</label>
+        <select id="size"
+                name="size">
+            <option value = "XSMALL">extra small</option>
+            <option value = "SMALL">small</option>
+            <option value = "MEDIUM">medium</option>
+            <option value = "LARGE">large</option>
+            <option value = "XLARGE">extra large</option>
+        </select>
+    </div>
+
+    <div>
+        <label for="species">Species:</label>
+        <select id="species"
+                name="species">
+            <option value = "CAT">cat</option>
+            <option value = "DOG">dog</option>
+            <option value = "BIRD">bird</option>
+        </select>
+    </div>
+
+    <div>
+        <label for="breed">Breed:</label>
+        <input type="text"
+               id="breed"
+               name="breed"
+               placeholder="Enter breed" >
+    </div>
+
+    <div>
+        <label for="imageUrl">Image URL:</label>
+        <input type="text"
+               id="imageUrl"
+               name="imageUrl"
+               placeholder="Enter image URL">
+        <!-- <label for="upload">Image:</label>
+        <input id="upload" type="file" accept="image/*">
+        <input type="submit">-->
+    </div>
+
+    <div>
+        <label for="canBeFostered">Can be fostered:</label>
+        <input type="checkbox"
+               id="canBeFostered"
+               name="canBeFostered">
+    </div>
+
+    <button id="submit" type="submit">Submit</button>
+
+</form>
+</body>
+</html>
Index: ototype Application/Paw5/src/main/resources/templates/createpost.html
===================================================================
--- Prototype Application/Paw5/src/main/resources/templates/createpost.html	(revision 988f3facbd3ab2361ef2bc1fa7ceba9d1c74694e)
+++ 	(revision )
@@ -1,76 +1,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <title>Create a post</title>
-</head>
-<body>
-    <h1>Create post</h1>
-<form method="post" action="/CreatePost">
-
-    <div id="SelectPet">
-        <label for="pet">Selet pet:</label>
-        <select id="pet">
-        </select>
-    </div>
-
-    <div id="AddNewPet">
-        <label for="newpet">Add new pet:</label>
-            <input id="newpet" name="newpet" placeholder="newpet" type="checkbox">
-    </div>
-
-    <div id="PetName">
-        Name:<input id="name" name="name" placeholder="name" type="text">
-    </div>
-
-    <div id="Genders">
-        <label for="gender">Gender:</label>
-        <select id="gender" name="gender">
-            <option value = "MALE">male</option>
-            <option value = "FEMALE">female</option>
-        </select>
-    </div>
-
-    <div id="AgeGroup">
-        <label for="age">Age Group:</label>
-        <select id="age" name="size">
-            <option value = "YOUNG">young</option>
-            <option value = "ADULT">adult</option>
-            <option value = "ELDER">elder</option>
-        </select>
-    </div>
-
-    <div id="Sizes">
-        <label for="size">Size:</label>
-        <select id="size" name="size">
-            <option value = "XSMALL">extra small</option>
-            <option value = "SMALL">small</option>
-            <option value = "MEDIUM">medium</option>
-            <option value = "LARGE">large</option>
-            <option value = "XLARGE">extra large</option>
-        </select>
-    </div>
-
-    <div id="Species">
-        <label for="specie">Species:</label>
-        <select id="specie" name="specie">
-            <option value = "CAT">cat</option>
-            <option value = "DOG">dog</option>
-            <option value = "BIRD">bird</option>
-        </select>
-    </div>
-
-    <div id="Breeds">
-        Breed:<input id="breed" name="breed" placeholder="breed" type="text">
-    </div>
-
-    <div id="UploadImages">
-        URL of Image:<input id="image" name="image" placeholder="image" type="text">
-       <!-- <label for="upload">Image:</label>
-        <input id="upload" type="file" accept="image/*">
-        <input type="submit">-->
-    </div>
-    <input id="SubmitPost" type="submit">
-</form>
-</body>
-</html>
