make item edit form neater

This commit is contained in:
Sanj 2011-07-01 01:00:12 +05:30
parent c00a619ab4
commit ac3fe18054

View File

@ -78,9 +78,14 @@ function getJQ(f) {
function getItemForm(f) {
var $form = $('<div />').addClass("itemForm");
var $title = $('<input />').val(f.title).appendTo($form);
var $description = $('<textarea />').val(f.description).appendTo($form);
var $submit = $('<input />').addClass("submitItem").attr("type", "submit").val("Submit").appendTo($form);
var $titleP = $('<p />').appendTo($form);
var $titleLabel = $('<span />').addClass("itemFormLabel").text("Title: ").appendTo($titleP);
var $titleInput = $('<input />').val(f.title).appendTo($titleP);
var $descriptionP = $('<p />').appendTo($form);
var $descriptionLabel = $('<span />').addClass("itemFormLabel").text("Description: ").appendTo($descriptionP);
var $descriptionInput = $('<textarea />').val(f.description).appendTo($descriptionP);
var $submitP = $('<p />').appendTo($form);
var $submit = $('<input />').addClass("submitItem").attr("type", "submit").val("Submit").appendTo($submitP);
return $form;
}