diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-06-02 08:59:19 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-06-02 08:59:19 +0200 |
| commit | 800dde68388cc5145a0d90c4e8862d12fd2db523 (patch) | |
| tree | e9d220e0a579bd6a2d1a813ff98b99ace0c9ac8c | |
| parent | 1ffba8f5f9d1dc40686df7bc8d5c9ea89ba2f32f (diff) | |
| download | slcl-800dde68388cc5145a0d90c4e8862d12fd2db523.tar.gz | |
page.c: Add padding to mkdir, logout, and upload forms
| -rw-r--r-- | page.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -383,6 +383,11 @@ static int prepare_upload_form(struct html_node *const n, const char *const dir) fprintf(stderr, "%s: html_node_add_child submit failed\n", __func__); return -1; } + else if (html_node_add_attr(div, "class", "userform")) + { + fprintf(stderr, "%s: html_node_add_attr div failed\n", __func__); + return -1; + } else if (html_node_add_attr(form, "method", "post")) { fprintf(stderr, "%s: html_node_add_attr method failed\n", __func__); @@ -472,6 +477,11 @@ static int prepare_mkdir_form(struct html_node *const n, const char *const dir) fprintf(stderr, "%s: html_node_add_child submit failed\n", __func__); return -1; } + else if (html_node_add_attr(div, "class", "userform")) + { + fprintf(stderr, "%s: html_node_add_attr div failed\n", __func__); + return -1; + } else if (html_node_add_attr(form, "method", "post")) { fprintf(stderr, "%s: html_node_add_attr method failed\n", __func__); @@ -577,6 +587,11 @@ static int prepare_quota_form(struct html_node *const n, fprintf(stderr, "%s: html_node_alloc progress failed\n", __func__); goto end; } + else if (html_node_add_attr(div, "class", "userform")) + { + fprintf(stderr, "%s: html_node_add_attr div failed\n", __func__); + return -1; + } else if (html_node_add_attr(progress, "value", cur_nu)) { fprintf(stderr, "%s: html_node_add_attr value failed\n", __func__); @@ -647,6 +662,11 @@ static int prepare_logout_form(struct html_node *const n) fprintf(stderr, "%s: html_node_add_child input failed\n", __func__); return -1; } + else if (html_node_add_attr(div, "class", "userform")) + { + fprintf(stderr, "%s: html_node_add_attr div failed\n", __func__); + return -1; + } else if (html_node_add_attr(form, "method", "post")) { fprintf(stderr, "%s: html_node_add_attr method failed\n", __func__); @@ -1306,6 +1326,10 @@ int page_style(struct http_response *const r) "{\n" " text-decoration: none;\n" "}\n" + ".userform\n" + "{\n" + " padding: 4px;\n" + "}\n" "form, label, table, input\n" "{\n" " margin: auto;\n" |
