A tumblelog CMS built on AJAX, PHP and MySQL.

template_add_link.htm 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <div>
  2. <label for="title">Name <span class="option">(optional)</span></label>
  3. <br /><input class="txt" type="text" name="title" id="title" value="{editTitle}" size="80" />
  4. </div>
  5. <div>
  6. <label for="url">URL</label>
  7. <br /><input class="txt" type="text" name="url" id="url" value="{editUrl}" size="80" />
  8. </div>
  9. <div>
  10. <div id="add_link_description" style="margin-top:5px;">
  11. <a class="linkFrm" href="#" onclick="document.getElementById('link_description').style.display = ''; document.getElementById('add_link_description').style.display = 'none'; return false;" style="font-size:11px;">Add a description</a><br /><br />
  12. </div>
  13. <div id="link_description" style="display:none;">
  14. <label for="description">Description</label><br />
  15. <textarea rows="12" cols="84" name="description" id="description">{editBody}</textarea>
  16. </div>
  17. </div>
  18. <input type="hidden" name="type" id="type" value="{type}" />
  19. <input type="hidden" name="date" id="date" value="{date}" />
  20. <input type="hidden" name="id_user" id="id_user" value="{id_user}" />
  21. <script>
  22. $("#autosave").validate({
  23. rules: {
  24. url: {
  25. required: true,
  26. url: true
  27. }
  28. },
  29. errorElement: "span",
  30. errorClass: "validate_span",
  31. errorPlacement: function(label, element) {
  32. label.prependTo(element.prev())
  33. }
  34. });
  35. </script>