create_art.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. {% extends "base.html" %}
  2. {% block content %}
  3. <script>
  4. $(function(){
  5. /* Set the Max date */
  6. var dtToday = new Date();
  7. var month = dtToday.getMonth() + 1;
  8. var day = dtToday.getDate() + 7;
  9. var year = dtToday.getFullYear();
  10. if(month < 10)
  11. month = '0' + month.toString();
  12. if(day < 10)
  13. day = '0' + day.toString();
  14. var maxDate = year + '-' + month + '-' + day;
  15. /* Set the Min date */
  16. var dtToday_min = new Date();
  17. var month_min = dtToday.getMonth() + 1;
  18. var day_min = dtToday.getDate()+1;
  19. var year_min = dtToday.getFullYear();
  20. if(month_min < 10)
  21. month_min = '0' + month_min.toString();
  22. if(day_min < 10)
  23. day_min = '0' + day_min.toString();
  24. var minDate = year_min + '-' + month_min + '-' + day_min;
  25. /* Run the codes */
  26. $('#closing_date').attr('max', maxDate);
  27. $('#closing_date').attr('min', minDate);
  28. });
  29. </script>
  30. <div class="container-create_art">
  31. <div class="wrap-create_art">
  32. <div class="create_art-pic" data-tilt>
  33. <img src="static/repository/website_photo/painting.jpg" alt="IMG">
  34. </div>
  35. <form action="" method="POST" enctype="multipart/form-data" class="contact100-form">
  36. <span class="create_art-form-title">
  37. <b>Create Art Auction</b>
  38. </span>
  39. <!--Input Art Name-->
  40. <div class="create_art-input-box">
  41. <input
  42. type="art_name"
  43. class="form-control create_art-input"
  44. id="art_name"
  45. name="art_name"
  46. placeholder="Enter Art Name"
  47. />
  48. </div>
  49. <!--Input Minimum Price-->
  50. <div class="create_art-input-box">
  51. <input
  52. type="number"
  53. class="form-control create_art-input"
  54. id="minimum_price"
  55. name="minimum_price"
  56. placeholder="Enter Minimum Price (USD)"
  57. />
  58. </div>
  59. <!--Input Buyout Price-->
  60. <div class="create_art-input-box">
  61. <input
  62. type="number"
  63. class="form-control create_art-input"
  64. id="buyout_price"
  65. name="buyout_price"
  66. placeholder="Enter Buyout Price (USD)"
  67. />
  68. </div>
  69. <!--Input Description-->
  70. <div class="create_art-input-box">
  71. <textarea type="description" class="form-control create_art-input description_size" id="description" name="description" placeholder=" Enter Description"></textarea>
  72. </div>
  73. <!--Upload Art or choose what they bought before-->
  74. <hr style="border: 2px solid rgb(177, 176, 176); width:327px; border-radius: 5px;">
  75. <div class="input-group">
  76. <div class="input-group-prepend">
  77. <span class="input-group-text"> File Upload </span>
  78. </div>
  79. <div class="custom-file">
  80. <input type="file" id="art_img" name="art_img" accept="image/jpg, image/png">
  81. <label class="custom-file-label"> Choose file </label>
  82. </div>
  83. </div>
  84. <p class="body-column-create_art" style="margin-top: 10px; font-size: 20px;"><b>OR</b></p>
  85. <!-- Dropdown Menu-->
  86. <div class="row">
  87. <div class="col input-group-prepend">
  88. <span class="input-group-text">Select Art in Platform</span>
  89. <select class="btn btn-secondary dropdown-toggle" name="web_group" style="height:47px; width:220px" required aria-invalid="false">
  90. <option value="cng-555">Select here</option>
  91. <option name="web_group" value="bought_art">bought_Art</option>
  92. </select>
  93. </div>
  94. </div>
  95. <hr style="border: 2px solid rgb(177, 176, 176); width:327px; border-radius: 5px;">
  96. <!--Choose Time for Auction ends (I will check how I can limit the user 14days)-->
  97. <div class="row">
  98. <div class="col input-group-prepend">
  99. <span class="input-group-text" style="height:47px; width:175px">Auction End Date</span>
  100. <input type="date" id="closing_date" name="closing_date" class="body-column-create_art" style="height:47px; width:220px">
  101. </div>
  102. </div>
  103. <!-- Tips for the date to let user know-->
  104. <div class="row" style="margin-left:2px">
  105. <small>Tips:</small>
  106. </div>
  107. <div class="row" style="margin-left:25px">
  108. <small>- The maximum Auction time is 14 days</small>
  109. </div>
  110. <div class="row" style="margin-left:25px">
  111. <small>- The exact time of closing is 0000 hrs of that date</small>
  112. </div>
  113. <!-- Button for create Auction-->
  114. <div class="container-create_art-form-btn">
  115. <button class="create_art-form-btn">
  116. Create
  117. </button>
  118. </div>
  119. </form>
  120. </div>
  121. </div>
  122. {% endblock %}