Index: Prototype Application/Paw5/src/main/java/finki/paw5/service/PetService.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/service/PetService.java	(revision 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/service/PetService.java	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
@@ -2,8 +2,6 @@
 
 import finki.paw5.model.entities.Pet;
-import finki.paw5.web.controllers.PostController;
 
 import java.util.List;
-import java.util.Optional;
 
 public interface PetService {
@@ -11,6 +9,6 @@
     void save (Pet pet);
 
-    List<Pet> findAll();
+    List<Pet> listpets();
 
-    Optional<Pet> findById(Integer petId);
+    Pet findById(Integer id);
 }
Index: Prototype Application/Paw5/src/main/java/finki/paw5/service/PostService.java
===================================================================
--- Prototype Application/Paw5/src/main/java/finki/paw5/service/PostService.java	(revision 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/service/PostService.java	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
@@ -2,5 +2,4 @@
 
 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 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/service/implementation/PetServiceImplementation.java	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
@@ -7,5 +7,4 @@
 
 import java.util.List;
-import java.util.Optional;
 
 @Service
@@ -23,12 +22,9 @@
     }
 
-    @Override
-    public List<Pet> findAll() {
-        return this.petRepository.findAll();
-    }
+    public List<Pet> listpets() {return this.petRepository.findAll();}
 
     @Override
-    public Optional<Pet> findById(Integer petId) {
-        return this.petRepository.findById(petId);
+    public Pet findById(Integer id) {
+        return this.petRepository.findById(id).get();
     }
 }
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 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/HomeController.java	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
@@ -1,4 +1,5 @@
 package finki.paw5.web.controllers;
 
+import jakarta.servlet.http.HttpServletRequest;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -10,9 +11,13 @@
 
     @GetMapping
-    public String getHomePage(){
+    public String getHomePage(HttpServletRequest request) {
+        if(request.getSession().getAttribute("user")==null){
+            return "redirect:/login";
+        }
         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 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PetController.java	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
@@ -28,5 +28,5 @@
     public String saveAdoption(@PathVariable Integer id, HttpServletRequest request) {
 
-        Pet pet = this.petService.findById(id).orElseThrow(InvalidPetIdException::new);
+        Pet pet = this.petService.findById(id);
         
         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 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
+++ Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PostController.java	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
@@ -1,8 +1,6 @@
 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.Shelter;
+import finki.paw5.model.entities.Employee;
 import finki.paw5.model.enumerations.AgeGroup;
 import finki.paw5.model.enumerations.Gender;
@@ -37,27 +35,41 @@
     }
 
-    @GetMapping("create-post")
+    @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);
+        model.addAttribute("pets", this.petService.listpets());
         return "create-post";
     }
 
-    @PostMapping("submit-post")
-    public String savePost(@RequestParam(required = false) String name,
-                           @RequestParam String gender,
-                           @RequestParam String ageGroup,
-                           @RequestParam String size,
-                           @RequestParam String species,
+    @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,
                            @RequestParam(required = false) String breed,
                            @RequestParam(required = false) String imageUrl,
-                           @RequestParam(required = false) boolean canBeFostered) {
+                           @RequestParam(required = false) boolean canBeFostered,
+                           HttpServletRequest request) {
 
-        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);
+        Employee employee = (Employee) request.getSession().getAttribute("user");
 
-        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);
+        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);
+
+        }
 
         return "redirect:/home";
@@ -68,5 +80,5 @@
 
         List<Post> posts = this.postService.findAll();
-        List<Pet> pets = this.petService.findAll();
+        List<Pet> pets = this.petService.listpets();
         //model.addAttribute("posts", posts);
         //model.addAttribute("pets",pets);
@@ -81,5 +93,5 @@
 
         Post post = this.postService.findById(id).get();
-        Pet pet = this.petService.findById(post.getPetId()).get();
+        Pet pet = this.petService.findById(post.getPetId());
 
         //model.addAttribute("pet", pet);
Index: Prototype Application/Paw5/src/main/resources/templates/aboutUs.html
===================================================================
--- Prototype Application/Paw5/src/main/resources/templates/aboutUs.html	(revision 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
+++ Prototype Application/Paw5/src/main/resources/templates/aboutUs.html	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
@@ -1,4 +1,4 @@
 <!DOCTYPE html>
-<html lang="en">
+<html lang="en" xmlns:th="http://thymeleaf.org">
 <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 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
+++ Prototype Application/Paw5/src/main/resources/templates/create-post.html	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:th="http://www.thymeleaf.org"
+      xmlns:th="http://thymeleaf.org"
       xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"
       xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
@@ -7,18 +7,83 @@
     <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="pet">Selet pet:</label>
-        <select id="pet">
+        <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>
         </select>
     </div>
 
     <div>
-        <label for="newpet">Add new pet:</label>
-            <input id="newpet" name="newpet" placeholder="newpet" type="checkbox">
+        <label for="newPetCheckbox">Add new pet:</label>
+            <input id="newPetCheckbox" name="newPetCheckbox" type="checkbox" onclick="addNewPet(this)">
     </div>
 
@@ -29,5 +94,6 @@
                name="name"
                class="form-control"
-               placeholder="Enter name">
+               placeholder="Enter name"
+               disabled>
     </div>
 
@@ -36,5 +102,6 @@
         <select id="gender"
                 name="gender"
-                class="form-control">
+                class="form-control"
+                disabled>
             <option value = "MALE">male</option>
             <option value = "FEMALE">female</option>
@@ -46,5 +113,6 @@
         <select id="ageGroup"
                 name="ageGroup"
-                class="form-control">
+                class="form-control"
+                disabled>
             <option value = "YOUNG">young</option>
             <option value = "ADULT">adult</option>
@@ -57,5 +125,6 @@
         <select id="size"
                 name="size"
-                class="form-control">
+                class="form-control"
+                disabled>
             <option value = "XSMALL">extra small</option>
             <option value = "SMALL">small</option>
@@ -70,5 +139,6 @@
         <select id="species"
                 name="species"
-                class="form-control">
+                class="form-control"
+                disabled>
             <option value = "CAT">cat</option>
             <option value = "DOG">dog</option>
@@ -83,5 +153,6 @@
                name="breed"
                class="form-control"
-               placeholder="Enter breed" >
+               placeholder="Enter breed"
+               disabled>
     </div>
 
@@ -92,5 +163,6 @@
                name="imageUrl"
                class="form-control"
-               placeholder="Enter image URL">
+               placeholder="Enter image URL"
+               disabled>
         <!-- <label for="upload">Image:</label>
         <input id="upload" type="file" accept="image/*">
@@ -104,5 +176,6 @@
                name="canBeFostered"
                class="form-control"
-               value=false>
+               value=false
+               disabled>
     </div>
 
Index: Prototype Application/Paw5/src/main/resources/templates/home.html
===================================================================
--- Prototype Application/Paw5/src/main/resources/templates/home.html	(revision 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
+++ Prototype Application/Paw5/src/main/resources/templates/home.html	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
@@ -1,4 +1,4 @@
 <!DOCTYPE html>
-<html lang="en">
+<html lang="en" xmlns:th="http://thymeleaf.org">
 <head>
     <meta charset="UTF-8">
@@ -35,5 +35,9 @@
   </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 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
+++ Prototype Application/Paw5/src/main/resources/templates/login.html	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
@@ -1,4 +1,4 @@
 <!DOCTYPE html>
-<html lang="en">
+<html lang="en" xmlns:th="http://thymeleaf.org">
 <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 3c7bf5bcfa995f9f22d28c0de572204c5336f441)
+++ Prototype Application/Paw5/src/main/resources/templates/register.html	(revision eac569a88d05dfc7d2636393d7333806a10091cb)
@@ -1,4 +1,4 @@
 <!DOCTYPE html>
-<html lang="en" xmlns:th="http://www.thymeleaf.org">
+<html lang="en" xmlns:th="http://thymeleaf.org">
 <head>
     <meta charset="UTF-8">
