Also did not go through.

-------- Original Message --------
Subject:        fix validation bug, input tags should be between paragraphs
Date:   Sun, 09 Sep 2012 20:41:33 +0200
From:   William Bell <[email protected]>
To:     [email protected]



From 99f97a61be09bdbfb19fec05824468b21f1ac1a5 Mon Sep 17 00:00:00 2001
From: William Bell <[email protected]>
Date: Fri, 7 Sep 2012 01:00:50 +0200
Subject: [PATCH] fix validation bug

input tags should be between paragraphs
---
 ui-diff.c   |    4 ++--
 ui-shared.c |   12 ++++++------
 ui-stats.c  |   10 +++++-----
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/ui-diff.c b/ui-diff.c
index c6bad63..0922217 100644
--- a/ui-diff.c
+++ b/ui-diff.c
@@ -312,7 +312,7 @@ void cgit_print_diff_ctrls()

     html("<div class='cgit-panel'>");
     html("<b>diff options</b>");
-    html("<form method='get' action='.'>");
+    html("<form method='get' action='.'><p>");
     cgit_add_hidden_formfields(1, 0, ctx.qry.page);
     html("<table>");
     html("<tr><td colspan='2'/></tr>");
@@ -348,7 +348,7 @@ void cgit_print_diff_ctrls()
     html("<tr><td/><td class='ctrl'>");
     html("<noscript><input type='submit' value='reload'/></noscript>");
     html("</td></tr></table>");
-    html("</form>");
+    html("</p></form>");
     html("</div>");
 }

diff --git a/ui-shared.c b/ui-shared.c
index 43166af..ddbf632 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -848,13 +848,13 @@ static void print_header(struct cgit_context *ctx)
         html(" : ");
         cgit_summary_link(ctx->repo->name, ctx->repo->name, NULL, NULL);
         html("</td><td class='form'>");
-        html("<form method='get' action=''>\n");
+        html("<form method='get' action=''>\n<p>");
         cgit_add_hidden_formfields(0, 1, ctx->qry.page);
         html("<select name='h' onchange='this.form.submit();'>\n");
         for_each_branch_ref(print_branch_option, ctx->qry.head);
         html("</select> ");
         html("<input type='submit' name='' value='switch'/>");
-        html("</form>");
+        html("</p></form>");
     } else
         html_txt(ctx->cfg.root_title);
     html("</td></tr>\n");
@@ -906,7 +906,7 @@ void cgit_print_pageheader(struct cgit_context *ctx)
         if (ctx->cfg.virtual_root)
             html_url_path(cgit_fileurl(ctx->qry.repo, "log",
                            ctx->qry.vpath, NULL));
-        html("'>\n");
+        html("'>\n<p>");
         cgit_add_hidden_formfields(1, 0, "log");
         html("<select name='qt'>\n");
         html_option("grep", "log msg", ctx->qry.grep);
@@ -918,7 +918,7 @@ void cgit_print_pageheader(struct cgit_context *ctx)
         html_attr(ctx->qry.search);
         html("'/>\n");
         html("<input type='submit' value='search'/>\n");
-        html("</form>\n");
+        html("</p></form>\n");
     } else {
         site_link(NULL, "index", NULL, hc(ctx, "repolist"), NULL,
NULL, 0);
         if (ctx->cfg.root_readme)
@@ -928,10 +928,10 @@ void cgit_print_pageheader(struct cgit_context *ctx)
         html("<form method='get' action='");
         html_attr(cgit_rooturl());
         html("'>\n");
-        html("<input type='text' name='q' size='10' value='");
+        html("<p><input type='text' name='q' size='10' value='");
         html_attr(ctx->qry.search);
         html("'/>\n");
-        html("<input type='submit' value='search'/>\n");
+        html("<input type='submit' value='search'/></p>\n");
         html("</form>");
     }
     html("</td></tr></table>\n");
diff --git a/ui-stats.c b/ui-stats.c
index 59f4c1e..ce1438f 100644
--- a/ui-stats.c
+++ b/ui-stats.c
@@ -23,21 +23,21 @@ static void trunc_week(struct tm *tm)
 {
     time_t t = timegm(tm);
     t -= ((tm->tm_wday + 6) % 7) * DAY_SECS;
-    gmtime_r(&t, tm);
+    gmtime_r(&t, tm);
 }

 static void dec_week(struct tm *tm)
 {
     time_t t = timegm(tm);
     t -= WEEK_SECS;
-    gmtime_r(&t, tm);
+    gmtime_r(&t, tm);
 }

 static void inc_week(struct tm *tm)
 {
     time_t t = timegm(tm);
     t += WEEK_SECS;
-    gmtime_r(&t, tm);
+    gmtime_r(&t, tm);
 }

 static char *pretty_week(struct tm *tm)
@@ -389,7 +389,7 @@ void cgit_show_stats(struct cgit_context *ctx)

     html("<div class='cgit-panel'>");
     html("<b>stat options</b>");
-    html("<form method='get' action=''>");
+    html("<form method='get' action=''><p>");
     cgit_add_hidden_formfields(1, 0, "stats");
     html("<table><tr><td colspan='2'/></tr>");
     if (ctx->repo->max_stats > 1) {
@@ -411,7 +411,7 @@ void cgit_show_stats(struct cgit_context *ctx)
     html("<tr><td/><td class='ctrl'>");
     html("<noscript><input type='submit' value='Reload'/></noscript>");
     html("</td></tr></table>");
-    html("</form>");
+    html("</p></form>");
     html("</div>");
     htmlf("<h2>Commits per author per %s", period->name);
     if (ctx->qry.path) {
--
1.7.9.5





_______________________________________________
cgit mailing list
[email protected]
http://hjemli.net/mailman/listinfo/cgit

Reply via email to