def submit(form): wgo_contest.folio_init("GIMP 10th Anniversary Contest Submission") image = 'images/gimp-splash.png' author = "Wilber Gimp" email = "*****@*****.**" print xhtml.h1("GIMP 10th Anniversary Contest", {"class" : "heading"}) #xhtml.div(thumb, {"class": "splash-thumb", "style" : "float: right; margin-left: 1em;"}) print xhtml.para("""Welcome to the www.gimp.org 10th Anniversary Splash Contest. From here you may submit images to be considered as candidates for a splash image.""") print xhtml.h2("Submit Your Image", {"class" : "subtitle"}) cell = xhtml.table.cell row = xhtml.table.row thumb = wgo_contest.image_generate("Your Image Here", image, "Wilber", "*****@*****.**") fields = (xhtml.table.init({"cellspacing" : 0}) + row(cell("Image File name:", {"style" : "font-weight: bold"}) + cell(xhtml.input.file({"name" : "image"}))) + row(cell("Title:", {"style" : "font-weight: bold"}) + cell(xhtml.input.text({"name" : "title"}))) + row(cell("Artist's Name:", {"style" : "font-weight: bold"}) + cell(xhtml.input.text({"name" : "author"}))) + row(cell("Artist's Email:", {"style" : "font-weight: bold"}) + cell(xhtml.input.text({"name" : "email"}))) + row(cell("Tutorial File name:", {"style" : "font-weight: bold"}) + cell(xhtml.input.file({"name" : "tutorial"}))) + row(cell(xhtml.input.hidden({"name" : "mode","value" : "preview"})) + cell(xhtml.input.submit({"name" : "preview", "value" : "PREVIEW"}))) + xhtml.table.fini()) form = xhtml.form(fields, {"enctype" : "multipart/form-data", "method" : "post", "action" : "contest.cgi", "style" : "margin: 1.33em 0px; margin-left: 40px; margin-right: 40px;" }) guidelines = (xhtml.para("Fill in the fields below, and click the " + xhtml.input.submit({"value" : "PREVIEW", "disabled" : "disabled"}) + " button below.")) print guidelines print form wgo_contest.folio_fini() return
print xhtml.para("""Welcome to the www.gimp.org 10th Anniversary Splash Contest. """ """From here you may submit images with tutorials to be considered as candidates for a "splash" image. We appreciate your participation, but we offer No Promises on what may become of your image here.""") print xhtml.h2("Approve Your Image", {"class" : "subtitle"}) form = xhtml.form(xhtml.input.submit({"name" : "approve", "value" : "APPROVE"}) + xhtml.input.hidden({"name" : "mode", "value" : "approve"}) + xhtml.input.hidden({"name" : "name", "value" : name}) + xhtml.input.hidden({"name" : "title", "value" : title}) + xhtml.input.hidden({"name" : "author", "value" : author}) + xhtml.input.hidden({"name" : "email", "value" : email}), {"enctype" : "multipart/form-data", "method" : "post", "action" : "contest.cgi"}) thumb = wgo_contest.image_generate(title, thumb_file, author, email) img = wgo_contest.image_generate(title, image_file, author, email) guidelines = (xhtml.para(xhtml.span(xhtml.div(thumb, {"class": "splash-thumb"}), {"style" : "float: right; margin-left: 1em;"}) + """Below is your image as we see it, in its original size surrounded by a red border 2 pixels thick over a background of alternating light and dark grey squares to make the transparency and size of the image clear. """ """To the right is a thumbnail image 150 pixels wide and proportionate height.""", { "style" : "text-align: justify;"}) + xhtml.para("""If this is the image you want to submit, click on the """ + xhtml.input.submit({"value" : "APPROVE", "disabled" : "disabled"}) + """ button below. """ """Otherwise, use your browser's Back button to submit another image.""", {"style" : "text-align: justify;"}) + xhtml.para("""If you do not see your image, there are a large number of potential reasons. """