Ignore:
Timestamp:
02/13/23 14:18:54 (21 months ago)
Author:
SazdovaEkaterina <sazdovaekaterina@…>
Branches:
main
Children:
3f5e485, 9ee306b
Parents:
c37c953
Message:

canBeFostered param default false when unchecked

Location:
Prototype Application/Paw5/src/main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PostController.java

    rc37c953 r04e4f54  
    4444                           @RequestParam(required = false) String breed,
    4545                           @RequestParam(required = false) String imageUrl,
    46                            @RequestParam boolean canBeFostered) {
     46                           @RequestParam(required = false) boolean canBeFostered) {
    4747
    4848        Pet pet = new Pet(imageUrl, AgeGroup.valueOf(ageGroup), Size.valueOf(size), breed, name, Species.valueOf(species), Gender.valueOf(gender), canBeFostered, null, 1);
  • Prototype Application/Paw5/src/main/resources/templates/create-post.html

    rc37c953 r04e4f54  
    2828               id="name"
    2929               name="name"
     30               class="form-control"
    3031               placeholder="Enter name">
    3132    </div>
     
    3435        <label for="gender">Gender:</label>
    3536        <select id="gender"
    36                 name="gender">
     37                name="gender"
     38                class="form-control">
    3739            <option value = "MALE">male</option>
    3840            <option value = "FEMALE">female</option>
     
    4345        <label for="ageGroup">Age Group:</label>
    4446        <select id="ageGroup"
    45                 name="ageGroup">
     47                name="ageGroup"
     48                class="form-control">
    4649            <option value = "YOUNG">young</option>
    4750            <option value = "ADULT">adult</option>
     
    5356        <label for="size">Size:</label>
    5457        <select id="size"
    55                 name="size">
     58                name="size"
     59                class="form-control">
    5660            <option value = "XSMALL">extra small</option>
    5761            <option value = "SMALL">small</option>
     
    6569        <label for="species">Species:</label>
    6670        <select id="species"
    67                 name="species">
     71                name="species"
     72                class="form-control">
    6873            <option value = "CAT">cat</option>
    6974            <option value = "DOG">dog</option>
     
    7782               id="breed"
    7883               name="breed"
     84               class="form-control"
    7985               placeholder="Enter breed" >
    8086    </div>
     
    8591               id="imageUrl"
    8692               name="imageUrl"
     93               class="form-control"
    8794               placeholder="Enter image URL">
    8895        <!-- <label for="upload">Image:</label>
     
    95102        <input type="checkbox"
    96103               id="canBeFostered"
    97                name="canBeFostered">
     104               name="canBeFostered"
     105               class="form-control"
     106               value=false>
    98107    </div>
    99108
Note: See TracChangeset for help on using the changeset viewer.