Advertisement
Guest User

Rob

a guest
Jan 12th, 2011
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.59 KB | None | 0 0
  1. {exp:safecracker channel="{segment_2}" return="messages/new/{segment_2}/{segment_3}/{segment_4}" error_handling="inline" safecracker_head="no" rules:description="required|min_length[50]" rules:postcode="required|numeric|min_length[5]" rules:price="numeric|integer"}
  2.  
  3. <div style="padding:20px">
  4.  
  5. <div style="border-bottom: 1px solid #EEE; overflow:hidden; padding:20px 0 20px 0">
  6. <div style="float:left; width:114px; margin-right:20px">
  7. <label for="title">Title</label>
  8. </div>
  9.  
  10. <div style="float:left">
  11. <input type="text" name="title" id="title" value="{title}" size="30" maxlength="70" />
  12. {if error:title}
  13. <br/><span class="error">{error:title}</span>
  14. {/if}
  15. <br/><span>For best results, use clear and specific text.</span>
  16. </div>
  17. </div>
  18.  
  19.  
  20.  
  21. <div style="border-bottom: 1px solid #EEE; overflow:hidden; padding:20px 0 20px 0">
  22. <div style="float:left; width:114px; margin-right:20px">
  23. <label for="description">Description</label>
  24. </div>
  25.  
  26. <div style="float:left">
  27. <textarea id="description" name="description" cols="75" rows="10">{description}</textarea>
  28. {if error:description}
  29. <br/><span class="error">{error:description}</span>
  30. {/if}
  31. </div>
  32. </div>
  33.  
  34.  
  35. {if segment_5 == "221"}
  36. <div style="border-bottom: 1px solid #EEE; overflow:hidden; padding:20px 0 20px 0">
  37. <div style="float:left; width:114px; margin-right:20px">
  38. <label for="bedrooms">Bedrooms</label>
  39. </div>
  40.  
  41. <div style="float:left">
  42. <!--this would be easier-->
  43. <!--{field:bedrooms}-->
  44. <select name="bedrooms" dir="ltr" id="bedrooms">
  45. <option value="any 1"{if '{bedrooms}' == 'any 1'} selected="selected"{/if}>1</option>
  46. <option value="any 2"{if '{bedrooms}' == 'any 2'} selected="selected"{/if}>2</option>
  47. <option value="any 3"{if '{bedrooms}' == 'any 3'} selected="selected"{/if}>3</option>
  48. <option value="any 4"{if '{bedrooms}' == 'any 4'} selected="selected"{/if}>4</option>
  49. <option value="any 5"{if '{bedrooms}' == 'any 5'} selected="selected"{/if}>5</option>
  50. <option value="any 6"{if '{bedrooms}' == 'any 6'} selected="selected"{/if}>6</option>
  51. <option value="any 7"{if '{bedrooms}' == 'any 7'} selected="selected"{/if}>7</option>
  52. <option value="any 8"{if '{bedrooms}' == 'any 8'} selected="selected"{/if}>8</option>
  53. <option value="any 9"{if '{bedrooms}' == 'any 9'} selected="selected"{/if}>9</option>
  54. </select>
  55. </div>
  56. </div>
  57. {/if}
  58.  
  59.  
  60. <div style="border-bottom: 1px solid #EEE; overflow:hidden; padding:20px 0 20px 0">
  61. <div style="float:left; width:114px; margin-right:20px">
  62. <label for="price">Price</label>
  63. </div>
  64.  
  65. <div style="float:left">
  66. <input type="text" id="price" name="price" value="{price}" maxlength="7" size="9" />
  67. {if error:price}
  68. <br/><span class="error">{error:price}</span>
  69. {/if}
  70. <br/><span>Example: 199 (no spaces, commas or euro signs)</span>
  71. </div>
  72. </div>
  73.  
  74.  
  75. <div style="border-bottom: 1px solid #EEE; overflow:hidden; padding:20px 0 20px 0">
  76. <div style="float:left; width:114px; margin-right:20px">
  77. <label for="postcode">Postcode</label>
  78. </div>
  79.  
  80. <div style="float:left">
  81. <input type="text" id="postcode" name="postcode" value="{postcode}" maxlength="5" size="7" />
  82. {if error:postcode}
  83. <br/><span class="error">{error:postcode}</span>
  84. {/if}
  85. <br/><span>Example: 50340</span>
  86. </div>
  87. </div>
  88.  
  89.  
  90. <div style="border-bottom: 1px solid #EEE; overflow:hidden; padding:20px 0 20px 0">
  91. <div style="float:left; width:114px; margin-right:20px">
  92. <label for="photo1">Photo 1</label>
  93. </div>
  94.  
  95. <div style="float:left">
  96. {field:photo1}
  97. </div>
  98. </div>
  99.  
  100.  
  101. <div style="border-bottom: 1px solid #EEE; overflow:hidden; padding:20px 0 20px 0">
  102. <div style="float:left; width:114px; margin-right:20px">
  103. <label for="photo2">Photo 2</label>
  104. </div>
  105.  
  106. <div style="float:left">
  107. {field:photo2}
  108. </div>
  109. </div>
  110.  
  111. <div style="overflow:hidden; padding:20px 0 20px 0">
  112. <div style="float:left; width:114px; margin-right:20px">
  113. &nbsp;
  114. </div>
  115.  
  116. <div style="float:left">
  117. <blockquote></blockquote>
  118. <div class="inputContainer" id="submitContainer"><input type="submit" name="submit" value="I'm done! Post my classified."/></div>
  119. </div>
  120. </div>
  121.  
  122. </div>
  123.  
  124. {!-- DEPARTMENT --}
  125. <input type="hidden" id="department" name="department" value="{segment_3}" maxlength="128" size="50" />
  126.  
  127. {!-- REGION --}
  128. <input type="hidden" id="region" name="region" value="{segment_2}" maxlength="128" size="50" />
  129.  
  130. {!-- CLASSIFIED --}
  131. <input type="hidden" id="classified" name="classified" value="yes" maxlength="3" size="3" />
  132.  
  133. {if segment_5 != "29"}
  134. {!-- BEDROOMS SET TO 0 SO THAT SEARCH 0+1+2+3+4+5+6+7+8+9 WORKS --}
  135. <input type="hidden" id="bedrooms" name="bedrooms" value="0" maxlength="1" size="1" />
  136. {/if}
  137.  
  138. {!-- STATUS --}
  139. <input type="hidden" name="status" value="open" />
  140.  
  141. <input type="hidden" name="allow_comments" value="y" />
  142.  
  143. {!-- CATEGORIES --}
  144. <input type="hidden" name="category[]" value="{segment_5}" />
  145.  
  146. {!-- ITEM CATEGORY URL TITLE --}
  147. <input type="hidden" id="category-url" name="category-url" value="{segment_4}" />
  148.  
  149. {!-- ITEM CATEGORY DESCRIPTION --}
  150. <input type="hidden" id="category-description" name="category-description"
  151. {if segment_5 == "214"} value="For Sale: General" {/if}
  152. {if segment_5 == "215"} value="Wanted: General" {/if}
  153. {if segment_5 == "216"} value="Giveaways" {/if}
  154. {if segment_5 == "217"} value="Vehicles" {/if}
  155. {if segment_5 == "218"} value="Job Offers" {/if}
  156. {if segment_5 == "219"} value="Jobs Wanted" {/if}
  157. {if segment_5 == "220"} value="Pets and Animals" {/if}
  158. {if segment_5 == "221"} value="Property For Sale" {/if}
  159. {if segment_5 == "222"} value="Property wanted" {/if}
  160. {if segment_5 == "223"} value="Property For Rent" {/if}
  161.  
  162. {/exp:safecracker}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement