Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="" xmlns:th="http://www.thymeleaf.org">
- <head>
- <meta charset="utf-8" />
- <meta http-equiv="x-ua-compatible" content="ie=edge" />
- <title th:with="appName=#{home.title},pageName=#{link.post}"
- th:text="${pageName + ' | ' + appName}">SpeedHome</title>
- <meta name="description" content="" />
- <meta name="viewport" content="width=device-width, initial-scale=1" />
- <!--
- Icons for different devices you can generate with - http://realfavicongenerator.net
- Place generated files in the dev/static/favicons directory.
- -->
- <link rel="stylesheet" href="/assets/fonts/icomoon/style.css" />
- <link
- rel="stylesheet"
- href="https://use.fontawesome.com/releases/v5.6.3/css/all.css"
- integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/"
- crossorigin="anonymous"
- />
- <link
- rel="stylesheet"
- href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.min.css"
- />
- <link
- rel="stylesheet"
- href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.0.0-beta.3/assets/owl.carousel.min.css"
- />
- <link
- rel="stylesheet"
- href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.0.0-beta.3/assets/owl.theme.default.min.css"
- />
- <link rel="stylesheet" href="/assets/css/wizard/smart_wizard.min.css" />
- <link
- rel="stylesheet"
- href="/assets/css/wizard/smart_wizard_theme_arrows.min.css"
- />
- <link
- rel="stylesheet"
- href="/assets/css/wizard/smart_wizard_theme_circles.min.css"
- />
- <link
- rel="stylesheet"
- href="/assets/css/wizard/smart_wizard_theme_dots.min.css"
- />
- <link rel="stylesheet" href="/assets/css/bundle.css" />
- <link rel="stylesheet" href="/assets/css/pikaday.css" />
- <th:block th:replace="common/links" />
- </head>
- <body>
- <div th:replace="common/header :: header"></div>
- <main id="main" class="inner-pages">
- <div class="breadcrumb-wrapper">
- <div class="container">
- <ul class="breadcrumb">
- <li>
- <a
- th:href="${@urlHelper.format(language, '/')}"
- th:text="#{link.home}"
- >Home</a
- >
- </li>
- <li>
- <a
- th:href="${@urlHelper.format(language, '/dashboard')}"
- th:text="#{link.dashboard}"
- ></a>
- </li>
- <li>
- <a
- th:href="${@urlHelper.format(language, '/dashboard/listings')}"
- th:text="#{dashboard.my_listings}"
- ></a>
- </li>
- <li>
- <strong th:text="#{property.edit_title}">Edit Listing</strong>
- </li>
- </ul>
- </div>
- </div>
- <div class="container create-listing">
- <div id="smartwizard">
- <ul class="progressbar">
- <li>
- <a href="#step-1" aria-disabled="true"
- ><span class="num">1</span>
- <th:block th:text="#{property.info_text}"
- >Property Info</th:block
- >
- </a>
- </li>
- <li>
- <a href="#step-2" aria-disabled="true"
- ><span class="num">2</span>
- <th:block th:text="#{property.upload_photo}"
- >Upload Photo</th:block
- >
- </a>
- </li>
- <li>
- <a href="#step-3" aria-disabled="true"
- ><span class="num">3</span>
- <th:block th:text="#{property.extra_info}"
- >Extra Info</th:block
- >
- </a>
- </li>
- </ul>
- <div>
- <input type="hidden" id="propId" th:value="${property.id}">
- <input type="hidden" id="propType" th:value="${property.type}">
- <input type="hidden" id="propFurnishType" th:value="${property.furnishType}">
- <input type="hidden" id="propFurnishes" th:value="${property.furnishes}">
- <input type="hidden" id="propFacilities" th:value="${property.facilities}">
- <input type="hidden" id="propStorey" th:value="${property.storeys}">
- <input type="hidden" id="coverPhotoId" value="0">
- <div id="step-1" class="">
- <!-- <h2>Step 1 Content</h2> -->
- <div id="form-step-0" role="form" data-toggle="validator">
- <div class="check-wrap">
- <label class="checkbox form-group checkbox-sm">
- <input id="owner" type="checkbox" required/>
- <span class="checkbox__icon"></span>
- <th:block th:text="#{property.owner_check}"
- >I am the owner of this unit</th:block
- >
- </label>
- </div>
- <div class="form-group input-wrap select-wrap select-wrap-single">
- <label for="type" th:text="#{filter.housing_type}"
- >Housing Type</label
- >
- <div class=" status-housing-type">
- <select
- name="type"
- id="type"
- class="select-sm housingType"
- placeholder="Housing Type"
- required
- >
- <option
- id="typeHighrise"
- value="HIGHRISE"
- th:text="#{property_sqft.high_rise}"
- >Highrise</option>
- <option
- id="typeLanded"
- value="LANDED"
- th:text="#{property_sqft.landed}"
- >Landed</option
- >
- <option
- id="typeRoom"
- value="ROOM"
- th:text="#{property_sqft.room}"
- >Room</option
- >
- </select>
- </div>
- </div>
- <div class="row gutter-big">
- <div class="col-xs-12 col-md-6">
- <div class="form-group input-wrap prop-name-wrap">
- <label for="propName" th:text="#{property.name_text}"
- >Property Name</label
- >
- <div class="status status-property-name">
- <input
- id="propName"
- name="propName"
- type="text"
- placeholder="Property Name"
- class="form-control"
- required
- th:value="${property.name}"
- />
- <span class="error" th:text="#{error_message.property_name_required}">Property name must be required</span>
- <span class="error-v2" th:text="#{error_message.property_name_required_cond}">Property must be 4 character long and less than 100.</span>
- </div>
- </div>
- </div>
- <div id="blockFloor" class="col-xs-12 col-md-6">
- <div class="input-wrap form-group">
- <label for="storeys" th:text="#{property.floor_level}"
- >Floor level / Storey no.</label
- >
- <div class="status status-foor-level">
- <input
- type="number"
- id="floor"
- class="form-control"
- required
- th:value="${property.level}"
- />
- <span class="error" th:text="#{error_message.floor_required}">Floor level must be required</span>
- <span class="error-v2" th:text="#{error_message.floor_required_cond}">Floor level should be less than 20 character long.</span>
- </div>
- </div>
- </div>
- <div id="blockStorey" class="col-xs-12 col-md-6">
- <div class="input-wrap select-wrap">
- <label for="storeys" th:text="#{property.floor_level}">Floor level / Storey no.</label>
- <div class=" status-storey-no">
- <select
- name="storeys"
- id="storeys"
- class="custom-select select-sm sources"
- placeholder="Single"
- required>
- <option value="1" th:selected="${property.storeys}==1">Single</option>
- <option value="2" th:selected="${property.storeys}==2">Double</option>
- <option value="3" th:selected="${property.storeys}==3">More than 2 storeys</option>
- </select>
- </div>
- </div>
- </div>
- <div class="col-xs-12 col-md-6">
- <div class="input-wrap form-group">
- <label for="address" th:text="#{property.address_text}"
- >Address</label
- >
- <div class="status status-property-address">
- <input
- name="address"
- id="address"
- type="text"
- placeholder="Property Address"
- class="form-control"
- required
- th:value="${property.address}"
- />
- <span class="error" th:text="#{error_message.address_required}">Property address must be required</span>
- <span class="error-v2" th:text="#{error_message.address_required_cond}">Property address must be required</span>
- </div>
- </div>
- </div>
- <div id="blockBedroom" class="col-xs-12 col-md-6">
- <div class="input-wrap form-group select-wrap">
- <label for="bedroom" th:text="#{property.bedroom_text}"
- >Bedroom</label
- >
- <div class=" status-bedroom">
- <select
- name="bedroom"
- id="bedroom"
- class="custom-select select-sm sources"
- th:placeholder= "${property.bedroom}">
- <option value="1">1</option>
- <option value="2">2</option>
- <option value="3">3</option>
- <option value="4">4</option>
- </select>
- </div>
- </div>
- </div>
- <div id="blockRoomPax" class="col-xs-12 col-md-6">
- <div class="input-wrap form-group select-wrap">
- <label for="bedroom" th:text="#{property.room.pax}">Max pax allowed to stay</label>
- <div class=" status-pax">
- <select
- name="bedroom"
- id="roomPax"
- class="custom-select select-sm sources"
- >
- <option value="1">1</option>
- <option value="2">2</option>
- <option value="3">3</option>
- <option value="4">4</option>
- <option value="5">5</option>
- </select>
- </div>
- </div>
- </div>
- <div class="col-xs-12 col-md-6">
- <div class="input-wrap form-group">
- <label
- for="postcode"
- th:text="#{property.post_code_text}"
- >Post Code</label
- >
- <div class="status status-post-code">
- <input
- name="postcode"
- id="postcode"
- type="text"
- class="form-control"
- required
- th:value="${property.postcode}"
- />
- <span class="error" th:text="#{error_message.post_required}">Post code must be required</span>
- <span class="error-v2" th:text="#{error_message.post_required_cond}">Post code must be required</span>
- <span class="error-v3" th:text="#{error_message.post_required_cond1}">Post code need to be numbers only.</span>
- </div>
- </div>
- </div>
- <div id="blockBathroom" class="col-xs-12 col-md-6">
- <div class="input-wrap form-group select-wrap">
- <label
- for="bathroom"
- th:text="#{property.bathroom_text}"
- >Bathroom</label
- >
- <div class=" status-bathroom">
- <select
- name="bathroom"
- id="bathroom"
- class="custom-select select-sm sources"
- required
- >
- <option value="1">1</option>
- <option value="2">2</option>
- <option value="3">3</option>
- <option value="4">4</option>
- </select>
- </div>
- </div>
- </div>
- <div id="blockRoomBathroom" class="col-xs-12 col-md-6">
- <div class="input-wrap form-group select-wrap">
- <label
- for="bathroom"
- th:text="#{property.bathroom_text}">Bathroom</label>
- <div class=" status-room-bathroom">
- <select
- name="bathroom"
- id="roomBathroom"
- class="custom-select select-sm sources"
- required>
- <option value="PRIVATE" th:text="#{property_room.private}">Private</option>
- <option value="SHARED" th:text="#{property_room.shared}">Shared</option>
- </select>
- </div>
- </div>
- </div>
- <div id="blockSqft" class="col-xs-12 col-md-6">
- <div class="input-wrap form-group">
- <label for="sqft" th:text="#{property.sqft_text}"
- >Build-up Size (sqft)*</label
- >
- <div class="status status-sqft">
- <input
- name="sqft"
- id="sqft"
- type="text"
- class="form-control"
- required
- th:value="${property.sqft}"
- />
- <span class="error" th:text="#{error_message.sqft_required}">Property sqft must be required</span>
- <span class="error-v2" th:text="#{error_message.sqft_required_cond}">Property sqft must be greater</span>
- <span class="error-v3" th:text="#{error_message.sqft_required_cond1}">Please insert a valid value for sqft.</span>
- </div>
- <small class="sm-note" th:text="#{property.area_note}"
- >*
- <th:block th:text="#{property.area_note}"
- >this refers to the total area occupied by your
- property/house</th:block
- ></small
- >
- </div>
- </div>
- <div id="blockRoomSize" class="col-xs-12 col-md-6">
- <div class="input-wrap form-group">
- <label for="sqft" th:text="#{property.room.sqft_text}"
- >Room Size</label
- >
- <div class=" status-room-size">
- <select
- name="roomSize"
- id="roomSize"
- class="custom-select select-sm sources"
- th:placeholder="#{property_room.single}"
- required>
- <option value="SMALL" th:text="#{property_room.single}">Single</option>
- <option value="MEDIUM" th:text="#{property_room.middle}">Middle</option>
- <option value="MASTER" th:text="#{property_room.master}">Master</option>
- </select>
- </div>
- </div>
- </div>
- <div class="col-xs-12 col-md-6">
- <div class="input-wrap form-group select-wrap">
- <label for="carpark" th:text="#{property.parking_text}"
- >Parking</label
- >
- <div class=" status-parking">
- <select
- name="carpark"
- id="carpark"
- class="custom-select select-sm sources"
- required
- >
- <option value="0">0</option>
- <option value="1">1</option>
- <option value="2">2</option>
- <option value="3">3</option>
- <option value="4">4</option>
- </select>
- </div>
- </div>
- </div>
- <div class="col-xs-12 col-md-6">
- <div class="input-wrap form-group ">
- <label for="price" th:text="#{filter.price}"
- >Price (RM)</label
- >
- <div class="status status-price">
- <input
- name="price"
- id="price"
- type="text"
- class="form-control"
- required
- th:value="${property.price}"
- />
- <span class="error" th:text="#{error_message.price_required}">Property price must be required</span>
- <span class="error-v2" th:text="#{error_message.price_required_cond}">Property price must be required</span>
- <span class="error-v3" th:text="#{error_message.price_required_cond1}">Property price must be required</span>
- </div>
- </div>
- </div>
- <div class="col-xs-12 col-md-6">
- <div class="input-wrap form-group select-wrap">
- <label
- for="furnishingType"
- th:text="#{property.furnishing_title}"
- >Furnishing</label
- >
- <div class=" status-furnishing">
- <select
- name="furnishingTypeSelect"
- id="furnishingTypeSelect"
- class="custom-select select-sm sources "
- required
- >
- <option
- selected
- value="NONE"
- th:text="#{property_furnish.unfurnished}"
- >Unfurnished</option
- >
- <option
- value="PARTIAL"
- th:text="#{property_furnish.partially}"
- >Partially Furnished</option
- >
- <option
- value="FULL"
- th:text="#{property_furnish.fully}"
- >Fully Furnished</option
- >
- </select>
- </div>
- </div>
- </div>
- <div class="col-xs-12 col-md-6">
- <div class="check-wrap">
- <label class="checkbox form-group checkbox-sm checkbox-inline-sm">
- <input type="checkbox" id="negotiable" required/>
- <span class="checkbox__icon"></span>
- <th:block th:text="#{property.negotiable_text}"
- >Negotiable</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-12 col-md-6">
- <div class="check-wrap">
- <label class="checkbox form-group checkbox-sm checkbox-inline-sm">
- <input type="checkbox" id="fullyFurnishable" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{property.extra_note}"
- >I'm willing to fully furnish this unit at extra
- cost</th:block
- >
- </label>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div id="step-2" class="">
- <div id="form-step-1" role="form" data-toggle="validator">
- <h2
- class="step-sub-title text-center"
- th:text="#{property.photo_guidelines}"
- >
- Photo Guidelines
- </h2>
- <div class="photo-guideline-top d-flex h-center">
- <div class="col">
- <div class="ico">
- <img
- src="/assets/img/icons/photo-guidelines.svg"
- width="80"
- alt=""
- />
- </div>
- <div class="caption">
- <th:block th:text="#{property.photo_guidelines_tag1}"
- >At least</th:block
- >
- <br />
- <th:block th:text="#{property.photo_guidelines_tag2}"
- >non-watermarked</th:block
- >
- </div>
- </div>
- <div class="col">
- <div class="ico">
- <img
- src="/assets/img/icons/photo-guidelines-hd.svg"
- width="80"
- alt=""
- />
- </div>
- <div class="caption">
- <th:block th:text="#{property.photo_guidelines_tag3}"
- >High</th:block
- >
- <br />
- <th:block th:text="#{property.photo_guidelines_tag4}"
- >quality photo</th:block
- >
- </div>
- </div>
- <div class="col">
- <div class="ico">
- <img
- src="/assets/img/icons/photo-guidelines-sun.svg"
- width="80"
- alt=""
- />
- </div>
- <div class="caption">
- <th:block th:text="#{property.photo_guidelines_tag5}"
- >Bright and</th:block
- >
- <br />
- <th:block th:text="#{property.photo_guidelines_tag6}"
- >natural lighting</th:block
- >
- </div>
- </div>
- </div>
- <div class="check-wrap" th:if="false">
- <label class="checkbox checkbox-sm checkbox-inline-sm">
- <input type="checkbox" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{property.photographer_tagline1}"
- >I need a photographer to take high quality photos /
- 360</th:block
- >
- </label>
- </div>
- <div class="row photo-thumb-listing">
- <div class="col-xs-6 col-md-4">
- <div class="box text-right">
- <button class="btn btn-secondary-filled btn-set-cover-photo" id="setCoverPhotoBtn0"
- th:text="#{button.set_cover_photo}" onclick="setAsCoverPhoto(0)"
- >Set as Cover Photo</button>
- <div class="btn btn-primary-filled btn-rotate">
- <button class="rotate-left">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- <button class="rotate-right">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- </div>
- <div class="js--image-preview" id="img0"></div>
- <div class="upload-options">
- <label>
- <input
- type="file"
- class="image-upload"
- accept="image/*"
- />
- </label>
- </div>
- </div>
- </div>
- <div class="col-xs-6 col-md-4">
- <div class="box text-right">
- <button class="btn btn-secondary-filled btn-set-cover-photo" id="setCoverPhotoBtn1"
- th:text="#{button.set_cover_photo}" onclick="setAsCoverPhoto(1)"
- >Set as Cover Photo</button>
- <div class="btn btn-primary-filled btn-rotate">
- <button class="rotate-left">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- <button class="rotate-right">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- </div>
- <div class="js--image-preview" id="img1"></div>
- <div class="upload-options">
- <label>
- <input
- type="file"
- class="image-upload"
- accept="image/*"
- />
- </label>
- </div>
- </div>
- </div>
- <div class="col-xs-6 col-md-4">
- <div class="box text-right">
- <button class="btn btn-secondary-filled btn-set-cover-photo" id="setCoverPhotoBtn2"
- th:text="#{button.set_cover_photo}" onclick="setAsCoverPhoto(2)"
- >Set as Cover Photo</button>
- <div class="btn btn-primary-filled btn-rotate">
- <button class="rotate-left">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- <button class="rotate-right">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- </div>
- <div class="js--image-preview" id="img2"></div>
- <div class="upload-options">
- <label>
- <input
- type="file"
- class="image-upload"
- accept="image/*"
- />
- </label>
- </div>
- </div>
- </div>
- <div class="col-xs-6 col-md-4">
- <div class="box text-right">
- <button class="btn btn-secondary-filled btn-set-cover-photo" id="setCoverPhotoBtn3"
- th:text="#{button.set_cover_photo}" onclick="setAsCoverPhoto(3)"
- >Set as Cover Photo</button>
- <div class="btn btn-primary-filled btn-rotate">
- <button class="rotate-left">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- <button class="rotate-right">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- </div>
- <div class="js--image-preview" id="img3"></div>
- <div class="upload-options">
- <label>
- <input
- type="file"
- class="image-upload"
- accept="image/*"
- />
- </label>
- </div>
- </div>
- </div>
- <div class="col-xs-6 col-md-4">
- <div class="box text-right">
- <button class="btn btn-secondary-filled btn-set-cover-photo" id="setCoverPhotoBtn4"
- th:text="#{button.set_cover_photo}" onclick="setAsCoverPhoto(4)"
- >Set as Cover Photo</button>
- <div class="btn btn-primary-filled btn-rotate">
- <button class="rotate-left">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- <button class="rotate-right">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- </div>
- <div class="js--image-preview" id="img4"></div>
- <div class="upload-options">
- <label>
- <input
- type="file"
- class="image-upload"
- accept="image/*"
- />
- </label>
- </div>
- </div>
- </div>
- <div class="col-xs-6 col-md-4">
- <div class="box text-right">
- <button class="btn btn-secondary-filled btn-set-cover-photo" id="setCoverPhotoBtn5"
- th:text="#{button.set_cover_photo}" onclick="setAsCoverPhoto(5)"
- >Set as Cover Photo</button>
- <div class="btn btn-primary-filled btn-rotate">
- <button class="rotate-left">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- <button class="rotate-right">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- </div>
- <div class="js--image-preview" id="img5"></div>
- <div class="upload-options">
- <label>
- <input
- type="file"
- class="image-upload"
- accept="image/*"
- />
- </label>
- </div>
- </div>
- </div>
- <div class="col-xs-6 col-md-4">
- <div class="box text-right">
- <button class="btn btn-secondary-filled btn-set-cover-photo" id="setCoverPhotoBtn6"
- th:text="#{button.set_cover_photo}" onclick="setAsCoverPhoto(6)"
- >Set as Cover Photo</button>
- <div class="btn btn-primary-filled btn-rotate">
- <button class="rotate-left">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- <button class="rotate-right">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- </div>
- <div class="js--image-preview" id="img6"></div>
- <div class="upload-options">
- <label>
- <input
- type="file"
- class="image-upload"
- accept="image/*"
- />
- </label>
- </div>
- </div>
- </div>
- <div class="col-xs-6 col-md-4">
- <div class="box text-right">
- <button class="btn btn-secondary-filled btn-set-cover-photo" id="setCoverPhotoBtn7"
- th:text="#{button.set_cover_photo}" onclick="setAsCoverPhoto(7)"
- >Set as Cover Photo</button>
- <div class="btn btn-primary-filled btn-rotate">
- <button class="rotate-left">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- <button class="rotate-right">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- </div>
- <div class="js--image-preview" id="img7"></div>
- <div class="upload-options">
- <label>
- <input
- type="file"
- class="image-upload"
- accept="image/*"
- />
- </label>
- </div>
- </div>
- </div>
- <div class="col-xs-6 col-md-4">
- <div class="box text-right">
- <button class="btn btn-secondary-filled btn-set-cover-photo" id="setCoverPhotoBtn8"
- th:text="#{button.set_cover_photo}" onclick="setAsCoverPhoto(8)"
- >Set as Cover Photo</button>
- <div class="btn btn-primary-filled btn-rotate">
- <button class="rotate-left">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- <button class="rotate-right">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- </div>
- <div class="js--image-preview" id="img8"></div>
- <div class="upload-options">
- <label>
- <input
- type="file"
- class="image-upload"
- accept="image/*"
- />
- </label>
- </div>
- </div>
- </div>
- <div class="col-xs-6 col-md-4">
- <div class="box text-right">
- <button class="btn btn-secondary-filled btn-set-cover-photo" id="setCoverPhotoBtn9"
- th:text="#{button.set_cover_photo}" onclick="setAsCoverPhoto(9)"
- >Set as Cover Photo</button>
- <div class="btn btn-primary-filled btn-rotate">
- <button class="rotate-left">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- <button class="rotate-right">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- </div>
- <div class="js--image-preview" id="img9"></div>
- <div class="upload-options">
- <label>
- <input
- type="file"
- class="image-upload"
- accept="image/*"
- />
- </label>
- </div>
- </div>
- </div>
- <div class="col-xs-6 col-md-4">
- <div class="box text-right">
- <button class="btn btn-secondary-filled btn-set-cover-photo" id="setCoverPhotoBtn10"
- th:text="#{button.set_cover_photo}" onclick="setAsCoverPhoto(10)"
- >Set as Cover Photo</button>
- <div class="btn btn-primary-filled btn-rotate">
- <button class="rotate-left">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- <button class="rotate-right">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- </div>
- <div class="js--image-preview" id="img10"></div>
- <div class="upload-options">
- <label>
- <input
- type="file"
- class="image-upload"
- accept="image/*"
- />
- </label>
- </div>
- </div>
- </div>
- <div class="col-xs-6 col-md-4">
- <div class="box text-right">
- <button class="btn btn-secondary-filled btn-set-cover-photo" id="setCoverPhotoBtn11"
- th:text="#{button.set_cover_photo}" onclick="setAsCoverPhoto(11)"
- >Set as Cover Photo</button>
- <div class="btn btn-primary-filled btn-rotate">
- <button class="rotate-left">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- <button class="rotate-right">
- <i class="material-icons">
- rotate_90_degrees_ccw
- </i>
- </button>
- </div>
- <div class="js--image-preview" id="img11"></div>
- <div class="upload-options">
- <label>
- <input
- type="file"
- class="image-upload"
- accept="image/*"
- />
- </label>
- </div>
- </div>
- </div>
- <div th:if="false" class="col-xs-6 col-md-4">
- <div class="box box-add lastme">
- <div class="js--image-preview"></div>
- <div class="thumb-inner centered">
- <div>
- <div class="icons">
- <i class="fas fa-plus-circle"></i>
- </div>
- <small th:text="#{property.add_more_photos}"
- >Add more photos</small
- >
- </div>
- </div>
- <div class="upload-options">
- <label>
- <input
- type="file"
- class="image-upload"
- accept="image/*"
- />
- <input type="hidden" id="image7" />
- </label>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div id="step-3" class="">
- <div id="form-step-2" role="form" data-toggle="validator">
- <div class="extra-info">
- <div class="text-center stat-msg">
- <em th:text="#{property.photo_uploaded}"
- >Photo successfully uploaded!</em
- >
- </div>
- <div class="inner-main">
- <div class="slot-extra">
- <strong
- class="content-title text-center"
- th:text="#{property.furnishing_title}"
- >Furnishing</strong
- >
- <div class="extra-inner">
- <div class="row">
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbTv" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{furnish.tv}"
- >TV</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbCurtain" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{furnish.curtain}"
- >Curtain</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbMattress" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{furnish.mattress}"
- >Mattress</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input
- type="checkbox"
- id="cbWashingMachine"
- />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{furnish.washing_machine}"
- >Washing machine</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbHood" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{furnish.hood_hub}"
- >Hood & hub</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbAc" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{furnish.ac}"
- >A/C</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbWaterHeater" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{furnish.water_heater}"
- >Water heater</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbDiningTable" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{furnish.dining_table}"
- >Dining table</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbWardrobe" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{furnish.wardrobe}"
- >Wardrobe</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbKitchenCabinet" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{furnish.kitchen_cabinet}"
- >Kitchen cabinet</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbOven" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{furnish.oven}"
- >Oven</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbFridge" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{furnish.fridge}"
- >Refrigerator</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbSofa" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{furnish.sofa}"
- >Sofa</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbMicrowave" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{furnish.microwave}"
- >Microwave</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbBedframe" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{furnish.bed_frame}"
- >Bed frame</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbInternet" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{furnish.internet}"
- >Internet</th:block
- >
- </label>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="slot-extra">
- <strong class="content-title text-center"
- >Facilities</strong
- >
- <div class="extra-inner">
- <div class="row">
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbBbq" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{facility.bbq}"
- >Barbeque area</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input
- type="checkbox"
- id="cbCoveredParking"
- />
- <span class="checkbox__icon"></span>
- <th:block
- th:text="#{facility.covered_parking}"
- >Covered parking</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbGym" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{facility.gymnasium}"
- >Gymnasium</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbBasketball" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{facility.basketball}"
- >Basketball</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbRestaurant" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{facility.restaurant}"
- >Restaurant</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbDobby" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{facility.dobby}"
- >Dobby</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbNursery" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{facility.nursery}"
- >Nursery</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbPlayground" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{facility.playground}"
- >Playground</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbSauna" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{facility.sauna}"
- >Sauna</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbSwimming" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{facility.swimming}"
- >Swimming pool</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbTennis" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{facility.tennis}"
- >Tennis court</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbSecurity24hr" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{facility.security24hr}"
- >24hr security</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbMart" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{facility.mart}"
- >Mart</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbSquash" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{facility.squash}"
- >Squash court</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbBadminton" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{facility.badminton}"
- >Badminton</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbElevator" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{facility.elevator}"
- >Elevator</th:block
- >
- </label>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="slot-extra">
- <strong
- class="content-title text-center"
- th:text="#{property.description_title}"
- >Description</strong
- >
- <div class="extra-inner">
- <textarea
- name=""
- id="description"
- cols="30"
- rows="10"
- class="big-des form-control"
- >
- </textarea>
- </div>
- </div>
- <div class="slot-extra">
- <strong class="content-title text-center"
- > </strong
- >
- <div class="extra-inner">
- <div class="row">
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbAllRace" />
- <span class="checkbox__icon"></span>
- <th:block
- th:text="#{extra_info.accept_all_races}"
- >Accept all races</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm"
- >
- <input type="checkbox" id="cbPet" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{extra_info.pet_friendly}"
- >Pet-friendly</th:block
- >
- </label>
- </div>
- </div>
- <div class="col-xs-6 col-sm-4" th:if="false">
- <div class="check-wrap">
- <label
- class="checkbox checkbox-sm checkbox-inline-sm">
- <input type="checkbox" />
- <span class="checkbox__icon"></span>
- <th:block th:text="#{extra_info.handicapped}"
- >Handicapped</th:block
- >
- </label>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="slot-extra">
- <strong class="content-title"> </strong>
- <div class="row extra-inner">
- <div class="col-date col-xs-12 col-md-6">
- <div class="input-inline-group d-flex">
- <label
- for="dateAvailable"
- th:text="#{property.avaliable_date_text}"
- >Availability date:</label
- >
- <input
- th:placeholder="#{property_ava_date.placeholder}"
- type="text"
- id="dateAvailable"
- class="form-control datepicker-nice"
- data-language="en"
- data-position="bottom left"
- />
- </div>
- </div>
- <div class="col-xs-12 col-md-6" th:if="false">
- <div class="input-inline-group d-flex">
- <label
- for="dateIn"
- th:text="#{property.minimum_stay}"
- >Minimum stay:</label
- >
- <div class="input-wrap select-wrap">
- <div class="status">
- <select
- name="sources"
- id="sources"
- class="custom-select select-sm sources"
- placeholder="Any"
- >
- <option selected value="rent">Any</option>
- <option value="buy">Many</option>
- </select>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="slot-extra">
- <strong class="content-title"> </strong>
- <div class="slot-inner">
- <div class="note-box">
- <div class="head d-flex">
- <div
- class="txt-left"
- th:text="#{property.insurance_note}"
- >
- LANDLORD INSURANCE AS DEPOSIT
- </div>
- <div class="right">
- <img
- src="/assets/img/icons/no-deposit.svg"
- width="30"
- alt=""
- />
- <img
- src="/assets/img/icons/allinaz.svg"
- width="110"
- alt=""
- />
- </div>
- </div>
- <div class="sub-inner">
- <strong
- class="content-title"
- th:text="#{property.secured_note}"
- >Be secured up to RM26,000</strong
- >
- <p th:text="#{property.bottom_info}">
- When you sign up and rent with SPEEDHOME, your
- property is insured up to RM15,000. You can also
- claim up to RM1,000 in unpaid utility bills and
- 2 months’ of rent.
- </p>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </form>
- </div>
- </main>
- <div replace="common/footer :: footer"></div>
- <div id="uploadPhotoError" class="white-popup mfp-hide text-center">
- <div class="user-container upload-photo-error">
- <div class="popup-header">Whoopsie Daisy</div>
- <div class="user-faces">
- <img
- src="/assets/img/icons/warning.svg" width="60"
- />
- </div>
- <div class="user-title">
- You need to upload at least 4 photos to proceed.
- </div>
- <div class="btn-wrapper">
- <div class="">
- <span
- id="btnCloseErrorPopup"
- class="btn btn-curv btn-dark-gray-filled"
- >Got it
- </span>
- </div>
- </div>
- </div>
- </div>
- <div th:replace="common/filter :: filter"></div>
- <div class="m-cookies"></div>
- <script src="/assets/js/jquery.min.js"></script>
- <script src="/assets/js/owl.carousel.min.js"></script>
- <script src="/assets/js/jquery.autocomplete.min.js"></script>
- <script src="/assets/js/jquery.magnific-popup.min.js"></script>
- <script src="/assets/js/jquery.smartWizard.min.js"></script>
- <script src="/assets/js/wizardInit.js"></script>
- <script src="/assets/js/moment.js"></script>
- <script src="/assets/js/pikaday.js"></script>
- <script src="/assets/js/jquery-ui.js"></script>
- <script src="/assets/js/jquery-ui-slider-pips.js"></script>
- <script src="/assets/js/main.js"></script>
- <script src="/assets/js/intlTelInput.js"></script>
- <script>
- $("#btnCloseErrorPopup").on("click", function () {
- $.magnificPopup.close();
- $(this).scrollTop(0);
- });
- var picker = new Pikaday({
- field: document.getElementById("dateAvailable"),
- format: "DD/MM/YYYY",
- minDate: new Date(),
- });
- </script>
- <div th:replace="common/post-autocomplete-js"></div>
- <div th:replace="common/tracking :: tracking"></div>
- <div th:replace="common/login :: login"></div>
- <script th:inline="javascript">
- var edited = null;
- var propType = /*[[${property.type}]]*/;
- var propFurnish = /*[[${property.furnishType}]]*/;
- var propPrice = $("#price").val();
- var furnishes = $("#propFurnishes").val();
- var facilities = $("#propFacilities").val();
- var carpark = /*[[${property.carpark}]]*/;
- var bathroom = /*[[${property.bathroom}]]*/;
- var bedroom = /*[[${property.bedroom}]]*/;
- var bathroomType = /*[[${property.bathroomType}]]*/;
- var roomMate = /*[[${property.roommate}]]*/;
- var roomType = /*[[${property.roomType}]]*/;
- var isOwner = /*[[${property.owner}]]*/;
- var isNegotiable = /*[[${property.negotiable}]]*/;
- var isFullyFurnishable = /*[[${property.fullyFurnishable}]]*/;
- var isAllRaces = /*[[${property.allRaces}]]*/;
- var isPetFriendly = /*[[${property.petFriendly}]]*/;
- var description = /*[[${property.description}]]*/;
- var availDate = /*[[${property.availability}]]*/;
- var tempDate = availDate.substring(0, availDate.indexOf('T'));
- var year = tempDate.substring(0,4);
- var mon = tempDate.substring(5,7);
- var day = tempDate.substring(8,10);
- var finalDate = day + "/" + mon + "/" + year;
- document.getElementById("dateAvailable").value = finalDate;
- document.getElementById("description").value = description;
- $("#price").val(propPrice.substring(0, propPrice.length - 3));
- $("#carpark").attr('placeholder', carpark);
- $("#carpark").val(carpark);
- $("#bathroom").attr('placeholder', bathroom);
- $("#bathroom").val(bathroom);
- if(propType != "ROOM"){
- $("#bedroom").attr('placeholder', bedroom);
- $("#bedroom").val(bedroom);
- } else {
- // Set bathroom type
- if(bathroomType == "SHARED")
- {
- $("#roomBathroom").attr('placeholder', 'Shared');
- $("#roomBathroom").val(bathroomType);
- }else{
- $("#roomBathroom").attr('placeholder', 'Private');
- $("#roomBathroom").val(bathroomType);
- }
- // Pre populate Number of Pax
- $("#roomPax").attr('placeholder', roomMate);
- $("#roomPax").val(roomMate);
- // Pre populate Room Type
- switch(roomType){
- case "SMALL" :
- $("#roomSize").attr('placeholder', 'Single');
- $("#roomSize").val(roomType);
- break;
- case "MEDIUM" :
- $("#roomSize").attr('placeholder', 'Middle');
- $("#roomSize").val(roomType);
- break;
- case "MASTER" :
- $("#roomSize").attr('placeholder', 'Master');
- $("#roomSize").val(roomType);
- break;
- }
- }
- if(isOwner) {
- $("#owner").prop("checked", true);
- }
- if(isNegotiable) {
- $("#negotiable").prop("checked" , true);
- }
- if(isFullyFurnishable) {
- $("#fullyFurnishable").prop("checked" , true);
- }
- if(isAllRaces) {
- $("#cbAllRace").prop("checked" , true);
- }
- if(isPetFriendly) {
- $("#cbPet").prop("checked" , true);
- }
- if(propType == 'HIGHRISE'){
- $("#type").attr('placeholder', "High-Rise");
- $("#type").val("HIGHRISE");
- $("#blockBathroom").show();
- $("#blockBedroom").show();
- $("#blockSqft").show();
- $("#blockStorey").hide();
- $("#blockRoomPax").hide();
- $("#blockRoomSize").hide();
- $("#blockRoomBathroom").hide();
- } else if (propType == 'LANDED'){
- $("#type").attr('placeholder', "Landed");
- $("#type").val("LANDED");
- $("#blockStorey").show();
- $("#blockBathroom").show();
- $("#blockBedroom").show();
- $("#blockSqft").show();
- $("#blockFloor").hide();
- $("#blockRoomPax").hide();
- $("#blockRoomSize").hide();
- $("#blockRoomBathroom").hide();
- } else {
- $("#type").attr('placeholder', "Room");
- $("#type").val("ROOM");
- $("#blockStorey").hide();
- $("#blockRoomPax").show();
- $("#blockRoomSize").show();
- $("#blockRoomBathroom").show();
- $("#blockBathroom").hide();
- $("#blockBedroom").hide();
- $("#blockSqft").hide();
- }
- if(propFurnish == 'FULL'){
- $("#furnishingTypeSelect").attr('placeholder', 'Fully furnished');
- $("#furnishingTypeSelect").val("FULL");
- } else if (propFurnish == 'PARTIAL'){
- $("#furnishingTypeSelect").attr('placeholder', 'Partially furnished');
- $("#furnishingTypeSelect").val("PARTIAL");
- } else {
- $("#furnishingTypeSelect").attr('placeholder', 'Unfurnished');
- $("#furnishingTypeSelect").val("NONE");
- }
- $("#img0").ready(function(){getImageURL("0","#img0");});
- $("#img1").ready(function(){getImageURL("1","#img1");});
- $("#img2").ready(function(){getImageURL("2","#img2");});
- $("#img3").ready(function(){getImageURL("3","#img3");});
- $("#img4").ready(function(){getImageURL("4","#img4");});
- $("#img5").ready(function(){getImageURL("5","#img5");});
- $("#img6").ready(function(){getImageURL("6","#img6");});
- $("#img7").ready(function(){getImageURL("7","#img7");});
- $("#img8").ready(function(){getImageURL("8","#img8");});
- $("#img9").ready(function(){getImageURL("9","#img9");});
- $("#img10").ready(function(){getImageURL("10","#img10");});
- $("#img11").ready(function(){getImageURL("11","#img11");});
- function getImageURL(e, id){
- var propImageURL = /*[[${property.images}]]*/;
- var cnst = 1;
- var indx = (parseFloat(cnst) + parseFloat(e));
- if (indx <= propImageURL.length){
- previewCurrentImage(propImageURL[e].url, propImageURL[e].id, id);
- }
- }
- function previewCurrentImage(url, propImageId, id) {
- let thumb = document.querySelector(id)
- $.ajax({
- url: "/api/post/get/image",
- type: "POST",
- data: JSON.stringify({ url : url }),
- contentType: "application/json; charset=utf-8",
- success: function(data){
- $(id).css("background-image", "url('data:image/jpeg;base64," + data.replace(/(\r\n|\n|\r)/gm, "") + "')");
- $(id).attr("value", propImageId);
- }
- });
- }
- var furnishes = /*[[${property.furnishes}]]*/;
- var facilities = /*[[${property.facilities}]]*/;
- var checkboxId = document.querySelectorAll("input[type='checkbox']");
- if(furnishes.length > 0){
- for(i = 0 ; i < checkboxId.length ; i++){
- for (cnt = 0 ; cnt < furnishes.length ; cnt++){
- var checkedFurnish = furnishes[cnt];
- //var nunders = s.indexOf('?');
- var resultId = "cb" + checkedFurnish.replace("_","");
- //var resultId = "cb" + checkedFurnish.substring(0, checkedFurnish.indexOf('_'));
- var checkId = checkboxId[i].id;
- var checkIdToLower = checkId.toLowerCase();
- //alert(checkIdToLower + " " + resultId);
- if(checkIdToLower == resultId){
- $("#" + checkId).prop("checked", true);
- }
- }
- }
- }
- if(facilities.length > 0){
- for(i = 0 ; i < checkboxId.length ; i++){
- for (ctr = 0 ; ctr < facilities.length ; ctr++){
- var checkedFacilities = facilities[ctr];
- var resultId = "cb" + checkedFacilities.replace("_","");
- var checkId = checkboxId[i].id;
- var checkIdToLower = checkId.toLowerCase();
- if(checkIdToLower == resultId){
- $("#" + checkId).prop("checked", true);
- }
- }
- }
- }
- $(document).ready(function() {
- // change type select
- $(".housingType")
- .find(".custom-option")
- .on("click", function() {
- var type = $(this).data("value");
- if(type == 'LANDED'){
- $("#blockFloor").hide();
- $("#blockStorey").show();
- $("#blockRoomPax").hide();
- $("#blockRoomSize").hide();
- $("#blockRoomBathroom").hide();
- $("#blockBathroom").show();
- $("#blockBedroom").show();
- $("#blockSqft").show();
- }else{
- //high rise or room
- $("#blockFloor").show();
- $("#blockStorey").hide();
- if(type == 'ROOM'){
- $("#blockRoomPax").show();
- $("#blockRoomSize").show();
- $("#blockRoomBathroom").show();
- $("#blockBathroom").hide();
- $("#blockBedroom").hide();
- $("#blockSqft").hide();
- }else{
- $("#blockRoomPax").hide();
- $("#blockRoomSize").hide();
- $("#blockRoomBathroom").hide();
- $("#blockBathroom").show();
- $("#blockBedroom").show();
- $("#blockSqft").show();
- }
- }
- });
- // Initialize the leaveStep event
- $("#smartwizard").on("leaveStep", function(
- e,
- anchorObject,
- stepNumber,
- stepDirection
- ) {
- //Edit property
- var id = $("#propId").val();
- var name = $("#propName").val();
- var type = $("#type").val();
- var owner = checkIfTicked("negotiable");
- var storeys = $("#storeys").val();
- var floor = $("#floor").val();
- var furnishingType = $("#furnishingType").val();
- var roomSize = $("#roomSize").val();
- var roomPax = $("#roomPax").val();
- var roomBathroom = $("#roomBathroom").val();
- var address = $("#address").val();
- var bathroom = $("#bathroom").val();
- var postcode = $("#postcode").val();
- var bedroom = $("#bedroom").val();
- var sqft = $("#sqft").val();
- var carpark = $("#carpark").val();
- var price = $("#price").val();
- var negotiable = checkIfTicked("negotiable");
- var fullyFurnishable = checkIfTicked("fullyFurnishable");
- if (stepNumber == 0 && stepDirection == "forward") {
- if(name == '' || type == '' || address == '' || carpark == '' || price == '' || furnishingType == ''){
- $("#step-1").find('input[required]').filter(function() {
- $(this).scrollTop(0);
- $(this).removeClass("error");
- $("span[for='" + $(this).attr('id') + "']").remove();
- if( $(this).val().length === 0 ) {
- var label = $("label[for='" + $(this).attr('id') + "']");
- $(this).addClass("error");
- $(this).parent().addClass('invalid');
- // debugger
- $(this).nextAll('span.error').addClass('show');
- }
- // keyup events
- $(this).keyup(function () {
- if( $(this).val().length > 1 ) {
- $(this).removeClass("error");
- $(this).parent().removeClass('invalid');
- $(this).next('.error').hide();
- }
- });
- });
- return false;
- }
- if(type == null){
- type = $("#propType").val();
- }
- if(type == 'LANDED'){
- if(storeys == ''){
- alert('Please fill up all the details.');
- return false;
- }
- }else{
- if(floor == ''){
- // alert('Please fill up all floor the details.');
- let _floorField = $('#floor');
- _floorField.removeClass("error");
- $("span[for='" + _floorField.attr('id') + "']").remove();
- let label = $("label[for='" + _floorField.attr('id') + "']");
- _floorField.addClass("error");
- _floorField.parent().addClass('invalid');
- $(_floorField).nextAll('span.error').addClass('show');
- return false;
- }
- }
- $(floor,postcode,sqft,price).on('keyup', function (e) {
- if(name.length > 1) {
- $(this).parent().removeClass('invalid');
- }
- });
- if(type == 'ROOM'){
- if(roomBathroom == '' || roomPax == '' || roomSize == ''){
- alert('Please fill up all the details.');
- return false;
- }
- }else{
- if(bathroom == '' || bedroom == '' || sqft == ''){
- alert('Please fill up all the details.');
- return false;
- }
- if(!isNormalInteger(sqft)){
- let _priceField = $('#sqft');
- _sqftField.parent().addClass('invalid');
- $(_sqftField).nextAll('span.error').removeClass('show');
- $(_sqftField).nextAll('span.error-v2').removeClass('show');
- $(_sqftField).nextAll('span.error-v3').addClass('show');
- return false;
- }
- }
- if(type !== 'ROOM'){
- if (sqft <= 99 || sqft >= 99999) {
- //alert('Budget should be more than 1');
- let _sqftField = $('#sqft');
- _sqftField.removeClass("error");
- $("span[for='" + _sqftField.attr('id') + "']").remove();
- let label = $("label[for='" + _sqftField.attr('id') + "']");
- _sqftField.addClass("error");
- _sqftField.parent().addClass('invalid');
- $(_sqftField).nextAll('span.error').removeClass('show');
- $(_sqftField).nextAll('span.error-v2').addClass('show');
- return false
- }
- }
- if(name.length < 4){
- alert('Name need to be at least 4 characters long.');
- return false;
- }
- if(postcode.length != 5){
- alert('Postcode needs to be 5 digit long.');
- return false;
- }
- if(!isNormalInteger(postcode)){
- let _postcodeField = $('#postcode');
- _postcodeField.parent().addClass('invalid');
- $(_postcodeField).nextAll('span.error').removeClass('show');
- $(_postcodeField).nextAll('span.error-v2').removeClass('show');
- $(_postcodeField).nextAll('span.error-v3').addClass('show');
- return false;
- }
- if(!isNormalInteger(price)){
- let _priceField = $('#price');
- // alert('Please insert a valid value for price.');
- _priceField.parent().addClass('invalid');
- $(_priceField).nextAll('span.error').removeClass('show');
- $(_priceField).nextAll('span.error-v2').removeClass('show');
- $(_priceField).nextAll('span.error-v3').addClass('show');
- return false;
- }
- } else if (
- stepNumber == 1 &&
- stepDirection == "forward" &&
- edited == null
- ){
- var count = 0;
- for(var i = 0; i < 12; i++){
- var val = $("#img" + i).css("background-image");
- if (val != null && val != "" && (val.startsWith('url(data:image')|| val.startsWith('url("data:image'))) {
- count++;
- }
- }
- if(count < 4){
- // alert('Plese submit at least 4 photos.');
- $.magnificPopup.open({
- items: {
- src: '#uploadPhotoError'
- },
- type: 'inline'
- });
- return false;
- }
- editListing();
- return false;
- //added
- $('.status').removeClass('invalid');
- }
- });
- var id = $("#propId").val();
- function editListing(){
- var name = $("#propName").val();
- var type = $("#type").val();
- var owner = checkIfTicked("negotiable");
- var storeys = $("#storeys").val();
- var furnishType = $('#furnishingTypeSelect option:selected').val();
- var floor = $("#floor").val();
- var address = $("#address").val();
- var bathroom = $('#bathroom option:selected').val();
- var postcode = $("#postcode").val();
- var bedroom = $('#bedroom option:selected').val();
- var sqft = $("#sqft").val();
- var carpark = $('#carpark option:selected').val();
- var price = $("#price").val();
- var negotiable = checkIfTicked("negotiable");
- var fullyFurnishable = checkIfTicked("fullyFurnishable");
- var roomSize = $("#roomSize").val();
- var roomPax = $("#roomPax").val();
- var roomBathroom = $("#roomBathroom").val();
- var description = $("#description").val();
- var dateAvailable = $("#dateAvailable").val();
- var furnishes = /*[[${property.furnishes}]]*/;
- var facilities = /*[[${property.facilities}]]*/;
- $('.loader-wrapper').show();
- $.ajax({
- url: "/api/post/edit",
- data: JSON.stringify({
- id : id,
- name: name,
- type: type,
- owner: owner,
- storeys: type == "LANDED" ? storeys : null,
- level: type != "LANDED" ? floor : null,
- roomType: type == "ROOM" ? roomSize : null,
- address: address,
- bathroom: bathroom,
- bathroomType: type == "ROOM" ? roomBathroom : null,
- postcode: postcode,
- bedroom: bedroom,
- sqft: sqft,
- roommate: type == "ROOM" ? roomPax : null,
- carpark: carpark,
- price: price,
- description: description,
- dateAvailable : dateAvailable,
- furnishType: furnishType,
- negotiable: negotiable,
- fullyFurnishable: fullyFurnishable,
- furnishes: furnishes,
- facilities: facilities
- }),
- type: "PUT",
- dataType: "json",
- contentType: "application/json; charset=utf-8",
- success: function(data) {
- propId = data.id;
- edited = "Done";
- propRef = data.ref;
- deleteExistingPhotos();
- },
- error: function(response, error) {
- $('.loader-wrapper').hide();
- alert(response + " " + error);
- }
- });
- }
- function deleteExistingPhotos(){
- for (i = 0 ; i < 12 ; i++) {
- if($("#img" + i ).attr("class") == 'js--image-preview js--no-default-changed')
- {
- var value = $("#img" + i).attr("value");
- if($("#img" + i).attr("value") !== undefined)
- {
- var imgId = $("#img" + i).attr("value");
- $.ajax({
- url: "/api/post/delete/image/" + imgId,
- type: "DELETE",
- async: false,
- success: function(data){
- uploadPhoto(i);
- },
- error: function(response, error) {
- alert(response + " " +error);
- }
- });
- } else {
- uploadPhoto(i);
- }
- }
- }
- $('.loader-wrapper').hide();
- $("#smartwizard").smartWizard("next");
- window.scrollTo(0, 0);
- $('.sw-btn-next').hide();
- $('#btnFinish').show();
- $('#btnFinish').removeClass( "disabledd" )
- }
- function uploadPhoto(i) {
- var coverPhoto = false;
- var coverPhotoId= $('#coverPhotoId').val();
- if (i == coverPhotoId) {
- coverPhoto = true;
- }
- var val = $("#img" + i).css("background-image");
- if (val != null && val != "" && (val.startsWith('url(data:image')|| val.startsWith('url("data:image'))) {
- $.ajax({
- url: "/api/post/create/" + id + "/image",
- data: JSON.stringify({ image: val, coverPhoto: coverPhoto }),
- type: "POST",
- dataType: "json",
- contentType: "application/json; charset=utf-8",
- success: function(data, response) {
- //$('.loader-wrapper').hide();
- },
- error: function(response, error) {
- $('.loader-wrapper').hide();
- alert(response + " " + error);
- }
- });
- }
- }
- });
- function checkIfTicked(tag) {
- var result = document.getElementById(tag).checked;
- return result;
- }
- function uploadListing(){
- var name = $("#propName").val();
- var type = $("#type").val();
- var owner = checkIfTicked("negotiable");
- var storeys = $("#storeys").val();
- var floor = $("#floor").val();
- var address = $("#address").val();
- var bathroom = $("#bathroom").val();
- var postcode = $("#postcode").val();
- var bedroom = $("#bedroom").val();
- var sqft = $("#sqft").val();
- var carpark = $("#carpark").val();
- var price = $("#price").val();
- var negotiable = checkIfTicked("negotiable");
- var fullyFurnishable = checkIfTicked("fullyFurnishable");
- var furnishes = [];
- var facilities = [];
- if (checkIfTicked("cbTv")) {
- furnishes.push("tv");
- }
- if (checkIfTicked("cbCurtain")) {
- furnishes.push("curtain");
- }
- if (checkIfTicked("cbMattress")) {
- furnishes.push("mattress");
- }
- if (checkIfTicked("cbWashingMachine")) {
- furnishes.push("washing_machine");
- }
- if (checkIfTicked("cbHood")) {
- furnishes.push("hood");
- }
- if (checkIfTicked("cbAc")) {
- furnishes.push("ac");
- }
- if (checkIfTicked("cbWaterHeater")) {
- furnishes.push("water_heater");
- }
- if (checkIfTicked("cbDiningTable")) {
- furnishes.push("dining_table");
- }
- if (checkIfTicked("cbWardrobe")) {
- furnishes.push("wardrobe");
- }
- if (checkIfTicked("cbKitchenCabinet")) {
- furnishes.push("kitchen_cabinet");
- }
- if (checkIfTicked("cbOven")) {
- furnishes.push("oven");
- }
- if (checkIfTicked("cbFridge")) {
- furnishes.push("fridge");
- }
- if (checkIfTicked("cbSofa")) {
- furnishes.push("sofa");
- }
- if (checkIfTicked("cbMicrowave")) {
- furnishes.push("microwave");
- }
- if (checkIfTicked("cbBedframe")) {
- furnishes.push("bed_frame");
- }
- if (checkIfTicked("cbInternet")) {
- furnishes.push("internet");
- }
- if (checkIfTicked("cbBbq")) {
- facilities.push("bbq");
- }
- if (checkIfTicked("cbGym")) {
- facilities.push("gym");
- }
- if (checkIfTicked("cbBasketball")) {
- facilities.push("basketball");
- }
- if (checkIfTicked("cbRestaurant")) {
- facilities.push("restaurant");
- }
- if (checkIfTicked("cbDobby")) {
- facilities.push("dobby");
- }
- if (checkIfTicked("cbNursery")) {
- facilities.push("nursery");
- }
- if (checkIfTicked("cbPlayground")) {
- facilities.push("playground");
- }
- if (checkIfTicked("cbSauna")) {
- facilities.push("sauna");
- }
- if (checkIfTicked("cbSwimming")) {
- facilities.push("swimming");
- }
- if (checkIfTicked("cbTennis")) {
- facilities.push("tennis");
- }
- if (checkIfTicked("cbSecurity24hr")) {
- facilities.push("security24hr");
- }
- if (checkIfTicked("cbMart")) {
- facilities.push("mart");
- }
- if (checkIfTicked("cbSquash")) {
- facilities.push("squash");
- }
- if (checkIfTicked("cbBadminton")) {
- facilities.push("badminton");
- }
- if (checkIfTicked("cbElevator")) {
- facilities.push("elevator");
- }
- if (checkIfTicked("cbCoveredParking")) {
- facilities.push("covered_parking");
- }
- var description = $("#description").val();
- var dateAvailable = $("#dateAvailable").val();
- if (dateAvailable == "") {
- alert("Please fill up your availability date");
- return;
- }
- $('.loader-wrapper').show();
- $.ajax({
- url: "/api/post/update",
- data: JSON.stringify({
- id: propId,
- description: description,
- availability: dateAvailable,
- petFriendly: checkIfTicked("cbPet"),
- allRaces: checkIfTicked("cbAllRace"),
- furnishes: furnishes,
- facilities: facilities
- }),
- type: "PUT",
- dataType: "json",
- contentType: "application/json; charset=utf-8",
- success: function(data, response) {
- $('.loader-wrapper').hide();
- localStorage.setItem("Success","Status")
- window.location.href = [[${@urlHelper.format(language, '/dashboard/listings')}]];
- },
- error: function(response, error) {
- $('.loader-wrapper').hide();
- alert(response + " " + error);
- }
- });
- }
- // Toolbar extra buttons
- var btnFinish = $('<button id="btnFinish"></button>').text('Finish')
- .addClass('btn btn-secondary sw-btn-next');
- // Smart Wizard initialize
- $("#smartwizard").smartWizard({
- selected: 0,
- theme: "dots",
- transitionEffect: "fade",
- showStepURLhash: false,
- anchorSettings: {
- markDoneStep: true, // add done css
- markAllPreviousStepsAsDone: true, // When a step selected by url hash, all previous steps are marked done
- removeDoneStepOnNavigateBack: true, // While navigate back done step after active step will be cleared
- enableAnchorOnDoneStep: true // Enable/Disable the done steps navigation
- },
- toolbarSettings: {
- toolbarPosition: "bottom",
- toolbarExtraButtons: [btnFinish]
- }
- });
- // External Button Events
- $("#reset-btn").on("click", function() {
- // Reset wizard
- $("#smartwizard").smartWizard("reset");
- return true;
- });
- $("#prev-btn").on("click", function() {
- // Navigate previous
- $("#smartwizard").smartWizard("prev");
- return true;
- });
- $("#next-btn").on("click", function() {
- // Navigate next
- $("#smartwizard").smartWizard("next");
- return true;
- });
- $("#theme_selector").on("change", function() {
- // Change theme
- $("#smartwizard").smartWizard("theme", $(this).val());
- return true;
- });
- $(document).ready(function() {
- setTimeout(function() {
- window.scrollTo(0, 0);
- }, 1);
- $('#btnFinish').hide();
- $("#btnFinish").click(function() {
- uploadListing();
- });
- });
- $(".progressbar li").each(function() {
- if (
- $(this)
- .next("li")
- .hasClass("done")
- ) {
- debugger;
- $(this).addClass("done");
- }
- });
- function isNormalInteger(str) {
- var n = Math.floor(Number(str));
- return n !== Infinity && String(n) === str && n > 0;
- }
- $('#type').prop('disabled', 'disabled');
- </script>
- <script th:inline="javascript">
- $(document).ready(function() {
- var propImages = /*[[${property.images}]]*/;
- for(var i=0; i<propImages.length; i++){
- if(propImages[i].coverPhoto)
- markCoverPhoto(i);
- }
- });
- function markCoverPhoto(i){
- var setCoverPhoto=/*[[#{button.set_cover_photo}]]*/;
- var coverPhoto=/*[[#{button.cover_photo}]]*/;
- for(var j=0; j<12; j++){
- if(i!=j)
- $('#setCoverPhotoBtn'+j).html(setCoverPhoto);
- else
- $('#setCoverPhotoBtn'+j).html(coverPhoto);
- }
- }
- function setAsCoverPhoto(i){
- $('#coverPhotoId').val(i);
- if($("#img" + i ).attr("class") != 'js--image-preview js--no-default-changed'){
- if($("#img" + i).attr("value") !== undefined){
- var propId = $("#propId").val();
- var imgId = $("#img" + i).attr("value");
- $.ajax({
- url: "/api/post/update/"+propId+"/image/" + imgId,
- data: JSON.stringify({
- coverPhoto:true
- }),
- type: "PUT",
- dataType: "json",
- contentType: "application/json; charset=utf-8",
- async: false,
- success: function(data){
- markCoverPhoto(i);
- },
- error: function(response, error) {
- var errormsg=/*[[#{error_message.set_cover_photo}]]*/;
- alert(errormsg);
- }
- });
- }
- }
- }
- var tmpAnimation = 0;
- $(".rotate-right").click(function(){
- var element = $(this).parent().nextAll('.js--image-preview');
- tmpAnimation = tmpAnimation + 90;
- let id= element[0].id.replace("img","")
- let _elementUrl=element.css("background-image");
- let data= _elementUrl.replace('url("','').replace('")','').toString();
- $({degrees: tmpAnimation - 90}).animate({degrees: tmpAnimation}, {
- duration: 200,
- step: function(now) {
- // element.css({
- // transform: 'rotate(' + now + 'deg)'
- // });
- }
- });
- rotateBase64ImageRight(data, element,id);
- });
- $(".rotate-left").click(function(){
- var element = $(this).parent().nextAll('.js--image-preview');
- tmpAnimation = tmpAnimation - 90;
- let id= element[0].id.replace("img","")
- let _elementUrl=element.css("background-image");
- let data= _elementUrl.replace('url("','').replace('")','').toString();
- $({degrees: tmpAnimation + 90}).animate({degrees: tmpAnimation}, {
- duration: 200,
- step: function(now) {
- // element.css({
- // transform: 'rotate(' + now + 'deg)'
- // });
- }
- });
- rotateBase64ImageLeft(data, element,id);
- });
- function rotateBase64ImageRight(base64data, element,id) {
- var canvas = document.getElementById("c");
- var ctx = canvas.getContext("2d");
- debugger;
- var image = new Image();
- image.src = base64data;
- image.onload = function() {
- debugger;
- canvas.height = image.width;
- canvas.width = image.height;
- // ctx.translate(image.width, image.height);
- // ctx.rotate(180 * Math.PI / 180);
- ctx.rotate(90 * Math.PI / 180);
- ctx.translate(0, -canvas.width);
- ctx.drawImage(image, 0, 0);
- callback(canvas.toDataURL(),id,element);
- };
- }
- function rotateBase64ImageLeft(base64data, element,id) {
- var canvas = document.getElementById("c");
- var ctx = canvas.getContext("2d");
- debugger;
- var image = new Image();
- image.src = base64data;
- image.onload = function() {
- debugger;
- canvas.height = image.width;
- canvas.width = image.height;
- // ctx.translate(image.width, image.height);
- // ctx.rotate(180 * Math.PI / 180);
- ctx.rotate(-90 * Math.PI / 180);
- ctx.translate(-canvas.height, 0);
- ctx.drawImage(image, 0, 0);
- callback(canvas.toDataURL(),id,element);
- };
- }
- function callback(base64data,i,element) {
- // debugger;
- // console.log(base64data);
- // var imgId = $("#img" + i).attr("value");
- // $.ajax({
- // url: "/api/post/delete/image/" + imgId,
- // type: "DELETE",
- // async: false,
- // success: function(data){
- // uploadBaseImage(base64data,imgId,i);
- // },
- // error: function(response, error) {
- // alert(response + " " +error);
- // }
- // });
- element.addClass('js--no-default-changed');
- element.css({
- 'background-image': 'url("'+base64data + '")'
- });
- }
- function uploadBaseImage(base64data,id1,i) {
- console.log(base64data);
- var coverPhoto = false;
- var coverPhotoId= $('#coverPhotoId').val();
- if (i == coverPhotoId) {
- coverPhoto = true;
- }
- let val = 'url("'+base64data + '")';
- $.ajax({
- url: "/api/post/create/" + id + "/image",
- data: JSON.stringify({ image: val, coverPhoto: coverPhoto }),
- type: "POST",
- dataType: "json",
- contentType: "application/json; charset=utf-8",
- success: function(data, response) {
- //$('.loader-wrapper').hide();
- },
- error: function(response, error) {
- $('.loader-wrapper').hide();
- alert(response + " " + error);
- }
- });
- };
- if($('.js--image-preview').attr('style')){
- $(this).parent().addClass('show')
- }
- </script>
- <canvas style='display: none;' id="c"/>
- </body>
- </html>
Add Comment
Please, Sign In to add comment