Index: Prototype Application/Paw5/src/main/java/finki/paw5/service/PetService.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/service/PetService.java	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/service/PetService.java	(revision 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
@@ -2,6 +2,8 @@
 
 import finki.paw5.model.entities.Pet;
+import finki.paw5.web.controllers.PostController;
 
 import java.util.List;
+import java.util.Optional;
 
 public interface PetService {
@@ -9,6 +11,6 @@
     void save (Pet pet);
 
-    List<Pet> listpets();
+    List<Pet> findAll();
 
-    Pet findById(Integer id);
+    Optional<Pet> findById(Integer petId);
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/service/PostService.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/service/PostService.java	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/service/PostService.java	(revision 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
@@ -2,4 +2,5 @@
 
 import finki.paw5.model.entities.Post;
+
 import java.util.List;
 import java.util.Optional;
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 eac569a88d05dfc7d2636393d7333806a10091cb)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/service/implementation/PetServiceImplementation.java	(revision 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
@@ -7,4 +7,5 @@
 
 import java.util.List;
+import java.util.Optional;
 
 @Service
@@ -22,9 +23,12 @@
     }
 
-    public List<Pet> listpets() {return this.petRepository.findAll();}
+    @Override
+    public List<Pet> findAll() {
+        return this.petRepository.findAll();
+    }
 
     @Override
-    public Pet findById(Integer id) {
-        return this.petRepository.findById(id).get();
+    public Optional<Pet> findById(Integer petId) {
+        return this.petRepository.findById(petId);
     }
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/HomeController.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/HomeController.java	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/HomeController.java	(revision 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
@@ -1,5 +1,4 @@
 package finki.paw5.web.controllers;
 
-import jakarta.servlet.http.HttpServletRequest;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -11,13 +10,9 @@
 
     @GetMapping
-    public String getHomePage(HttpServletRequest request) {
-        if(request.getSession().getAttribute("user")==null){
-            return "redirect:/login";
-        }
+    public String getHomePage(){
         return "home";
     }
-
     @GetMapping("/aboutUs")
-    public String getSuccessPage() {
+    public String getSuccessPage(){
         return "/aboutUs";
     }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PetController.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PetController.java	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PetController.java	(revision 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
@@ -28,5 +28,5 @@
     public String saveAdoption(@PathVariable Integer id, HttpServletRequest request) {
 
-        Pet pet = this.petService.findById(id);
+        Pet pet = this.petService.findById(id).orElseThrow(InvalidPetIdException::new);
         
         User user = (User) request.getSession().getAttribute("user");
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 eac569a88d05dfc7d2636393d7333806a10091cb)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PostController.java	(revision 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
@@ -1,6 +1,8 @@
 package finki.paw5.web.controllers;
+
+import finki.paw5.model.entities.PersonalProfile;
 import finki.paw5.model.entities.Pet;
 import finki.paw5.model.entities.Post;
-import finki.paw5.model.entities.Employee;
+import finki.paw5.model.entities.Shelter;
 import finki.paw5.model.enumerations.AgeGroup;
 import finki.paw5.model.enumerations.Gender;
@@ -35,41 +37,27 @@
     }
 
-    @GetMapping("/create-post")
+    @GetMapping("create-post")
     public String get(Model model) {
-        model.addAttribute("pets", this.petService.listpets());
+        //TODO: vakvo ama za lista so pets
+        //        List<Manufacturer> manufacturers = this.manufacturerService.findAll();
+        //        model.addAttribute("manufacturers", manufacturers);
         return "create-post";
     }
 
-    @PostMapping("/submit-post")
-    public String savePost(@RequestParam(required = false) Integer petId,
-                           @RequestParam(required = false) boolean newPetCheckbox,
-                           @RequestParam(required = false) String name,
-                           @RequestParam(required = false) String gender,
-                           @RequestParam(required = false) String ageGroup,
-                           @RequestParam(required = false) String size,
-                           @RequestParam(required = false) String species,
+    @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(required = false) boolean canBeFostered,
-                           HttpServletRequest request) {
+                           @RequestParam(required = false) boolean canBeFostered) {
 
-        Employee employee = (Employee) request.getSession().getAttribute("user");
+        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);
 
-        if(newPetCheckbox == true){
-
-            Pet newPet = new Pet(imageUrl, AgeGroup.valueOf(ageGroup), Size.valueOf(size), breed, name, Species.valueOf(species), Gender.valueOf(gender), canBeFostered, null, employee.getShelterId());
-            this.petService.save(newPet);
-
-            Post post = new Post(LocalDate.now(), imageUrl, newPet.getId(), null, employee.getId());
-            this.postService.save(post);
-
-        } else{
-
-            Pet selectedPet = this.petService.findById(petId);
-
-            Post post = new Post(LocalDate.now(), imageUrl, selectedPet.getId(), null, employee.getId());
-            this.postService.save(post);
-
-        }
+        Post post = new Post(LocalDate.now(), imageUrl, pet.getId(), null, 10);//TODO: employee id da se zeme preku session user getid
+        this.postService.save(post);
 
         return "redirect:/home";
@@ -80,5 +68,5 @@
 
         List<Post> posts = this.postService.findAll();
-        List<Pet> pets = this.petService.listpets();
+        List<Pet> pets = this.petService.findAll();
         //model.addAttribute("posts", posts);
         //model.addAttribute("pets",pets);
@@ -93,5 +81,5 @@
 
         Post post = this.postService.findById(id).get();
-        Pet pet = this.petService.findById(post.getPetId());
+        Pet pet = this.petService.findById(post.getPetId()).get();
 
         //model.addAttribute("pet", pet);
Index: Prototype Application/Paw5/src/main/resources/templates/aboutUs.html
===================================================================
--- Prototype Application/Paw5/src/main/resources/templates/aboutUs.html	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
+++ Prototype Application/Paw5/src/main/resources/templates/aboutUs.html	(revision 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
@@ -1,4 +1,4 @@
 <!DOCTYPE html>
-<html lang="en" xmlns:th="http://thymeleaf.org">
+<html lang="en">
 <head>
     <meta charset="UTF-8">
Index: Prototype Application/Paw5/src/main/resources/templates/create-post.html
===================================================================
--- Prototype Application/Paw5/src/main/resources/templates/create-post.html	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
+++ Prototype Application/Paw5/src/main/resources/templates/create-post.html	(revision 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:th="http://thymeleaf.org"
+      xmlns:th="http://www.thymeleaf.org"
       xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"
       xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
@@ -7,83 +7,18 @@
     <meta charset="UTF-8">
     <title>Create a post</title>
-    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
-    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
-    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
-    <script>
-        function addNewPet(addNewPetCheckBox){
-
-            if(addNewPetCheckBox.checked){
-
-                document.getElementById("name").disabled = false;
-                document.getElementById("gender").disabled = false;
-                document.getElementById("ageGroup").disabled = false;
-                document.getElementById("size").disabled = false;
-                document.getElementById("species").disabled = false;
-                document.getElementById("breed").disabled = false;
-                document.getElementById("imageUrl").disabled = false;
-                document.getElementById("canBeFostered").disabled = false;
-
-                document.getElementById("petId").disabled = true;
-            } else{
-
-                document.getElementById("name").disabled = true;
-                document.getElementById("gender").disabled = true;
-                document.getElementById("ageGroup").disabled = true;
-                document.getElementById("size").disabled = true;
-                document.getElementById("species").disabled = true;
-                document.getElementById("breed").disabled = true;
-                document.getElementById("imageUrl").disabled = true;
-                document.getElementById("canBeFostered").disabled = true;
-
-                document.getElementById("petId").disabled = false;
-
-            }
-        }
-    </script>
 </head>
 <body>
-<header>
-    <nav class="navbar navbar-expand-md navbar-dark bg-dark">
-        <div class="container">
-            <a class="navbar-brand" href="/home">Paw 5</a>
-            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault"
-                    aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
-                <span class="navbar-toggler-icon"></span>
-            </button>
-
-            <div class="collapse navbar-collapse justify-content-end" id="navbarsExampleDefault">
-                <ul class="navbar-nav m-auto">
-                    <li class="nav-item m-auto">
-                        <a class="nav-link active" href="/home/aboutUs">About us</a>
-                    </li>
-                    <li class="nav-item m-auto">
-                        <a class="nav-link active" href="/login">Login</a>
-                    </li>
-                    <li class="nav-item m-auto">
-                        <a class="nav-link active" href="/register">Register</a>
-                    </li>
-                </ul>
-            </div>
-        </div>
-    </nav>
-</header>
     <h1>Create post</h1>
 <form th:action="@{/submit-post}" method="post">
 
     <div>
-        <label for="petId">Select pet:</label>
-        <select id="petId" name="petId">
-            <option
-            th:each="pet :${pets}"
-            th:text="${pet.getName()}"
-            th:value="${pet.getId()}">
-            </option>
+        <label for="pet">Selet pet:</label>
+        <select id="pet">
         </select>
     </div>
 
     <div>
-        <label for="newPetCheckbox">Add new pet:</label>
-            <input id="newPetCheckbox" name="newPetCheckbox" type="checkbox" onclick="addNewPet(this)">
+        <label for="newpet">Add new pet:</label>
+            <input id="newpet" name="newpet" placeholder="newpet" type="checkbox">
     </div>
 
@@ -94,6 +29,5 @@
                name="name"
                class="form-control"
-               placeholder="Enter name"
-               disabled>
+               placeholder="Enter name">
     </div>
 
@@ -102,6 +36,5 @@
         <select id="gender"
                 name="gender"
-                class="form-control"
-                disabled>
+                class="form-control">
             <option value = "MALE">male</option>
             <option value = "FEMALE">female</option>
@@ -113,6 +46,5 @@
         <select id="ageGroup"
                 name="ageGroup"
-                class="form-control"
-                disabled>
+                class="form-control">
             <option value = "YOUNG">young</option>
             <option value = "ADULT">adult</option>
@@ -125,6 +57,5 @@
         <select id="size"
                 name="size"
-                class="form-control"
-                disabled>
+                class="form-control">
             <option value = "XSMALL">extra small</option>
             <option value = "SMALL">small</option>
@@ -139,6 +70,5 @@
         <select id="species"
                 name="species"
-                class="form-control"
-                disabled>
+                class="form-control">
             <option value = "CAT">cat</option>
             <option value = "DOG">dog</option>
@@ -153,6 +83,5 @@
                name="breed"
                class="form-control"
-               placeholder="Enter breed"
-               disabled>
+               placeholder="Enter breed" >
     </div>
 
@@ -163,6 +92,5 @@
                name="imageUrl"
                class="form-control"
-               placeholder="Enter image URL"
-               disabled>
+               placeholder="Enter image URL">
         <!-- <label for="upload">Image:</label>
         <input id="upload" type="file" accept="image/*">
@@ -176,6 +104,5 @@
                name="canBeFostered"
                class="form-control"
-               value=false
-               disabled>
+               value=false>
     </div>
 
Index: Prototype Application/Paw5/src/main/resources/templates/home.html
===================================================================
--- Prototype Application/Paw5/src/main/resources/templates/home.html	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
+++ Prototype Application/Paw5/src/main/resources/templates/home.html	(revision 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
@@ -1,4 +1,4 @@
 <!DOCTYPE html>
-<html lang="en" xmlns:th="http://thymeleaf.org">
+<html lang="en">
 <head>
     <meta charset="UTF-8">
@@ -35,9 +35,5 @@
   </nav>
 </header>
-<div>
-  <form method="get" th:action="@{'/create-post'}">
-    <button id="submit" type="submit">Create an Adoption Post</button>
-  </form>
-</div>
+
 <div>
   <h1>Welcome to Paw 5</h1>
Index: Prototype Application/Paw5/src/main/resources/templates/login.html
===================================================================
--- Prototype Application/Paw5/src/main/resources/templates/login.html	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
+++ Prototype Application/Paw5/src/main/resources/templates/login.html	(revision 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
@@ -1,4 +1,4 @@
 <!DOCTYPE html>
-<html lang="en" xmlns:th="http://thymeleaf.org">
+<html lang="en">
 <head>
   <meta charset="UTF-8">
Index: Prototype Application/Paw5/src/main/resources/templates/register.html
===================================================================
--- Prototype Application/Paw5/src/main/resources/templates/register.html	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
+++ Prototype Application/Paw5/src/main/resources/templates/register.html	(revision 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
@@ -1,4 +1,4 @@
 <!DOCTYPE html>
-<html lang="en" xmlns:th="http://thymeleaf.org">
+<html lang="en" xmlns:th="http://www.thymeleaf.org">
 <head>
     <meta charset="UTF-8">
