diff --git a/routers/web/admin/emails.go b/routers/web/admin/emails.go index 49338fbd7c..e9c97d8b8f 100644 --- a/routers/web/admin/emails.go +++ b/routers/web/admin/emails.go @@ -154,7 +154,7 @@ func ActivateEmail(ctx *context.Context) { // DeleteEmail serves a POST request for delete a user's email func DeleteEmail(ctx *context.Context) { - u, err := user_model.GetUserByID(ctx, ctx.FormInt64("Uid")) + u, err := user_model.GetUserByID(ctx, ctx.FormInt64("uid")) if err != nil || u == nil { ctx.ServerError("GetUserByID", err) return diff --git a/routers/web/devtest/devtest.go b/routers/web/devtest/devtest.go index 8c343197d9..0068c9fe88 100644 --- a/routers/web/devtest/devtest.go +++ b/routers/web/devtest/devtest.go @@ -24,12 +24,12 @@ func List(ctx *context.Context) { var subNames []string for _, tmplName := range templateNames { subName := strings.TrimSuffix(tmplName, ".tmpl") - if subName != "list" { + if !strings.HasPrefix(subName, "devtest-") { subNames = append(subNames, subName) } } ctx.Data["SubNames"] = subNames - ctx.HTML(http.StatusOK, "devtest/list") + ctx.HTML(http.StatusOK, "devtest/devtest-list") } func FetchActionTest(ctx *context.Context) { diff --git a/templates/admin/emails/list.tmpl b/templates/admin/emails/list.tmpl index 835b77ea17..0dc1fb9d03 100644 --- a/templates/admin/emails/list.tmpl +++ b/templates/admin/emails/list.tmpl @@ -50,10 +50,10 @@ {{svg (Iif .IsPrimary "octicon-check" "octicon-x")}} {{if .CanChange}} - + {{svg (Iif .IsActivated "octicon-check" "octicon-x")}} {{else}} @@ -61,9 +61,10 @@ {{end}} -
- {{svg "octicon-trash"}} -
+ {{svg "octicon-trash"}} {{end}} @@ -77,40 +78,24 @@
{{ctx.Locale.Tr "admin.emails.change_email_header"}}
-
+

{{ctx.Locale.Tr "admin.emails.change_email_text"}}

- - {{$.CsrfTokenHtml}} + {{$.CsrfTokenHtml}} - - - - + + + + - - - - + + + + -
- {{template "base/modal_actions_confirm" .}} -
-
-
+ {{template "base/modal_actions_confirm" .}} + - - - {{template "admin/layout_footer" .}} diff --git a/templates/devtest/devtest-footer.tmpl b/templates/devtest/devtest-footer.tmpl new file mode 100644 index 0000000000..1c755508a5 --- /dev/null +++ b/templates/devtest/devtest-footer.tmpl @@ -0,0 +1,3 @@ +{{/* TODO: the devtest.js is isolated from index.js, so no module is shared and many index.js functions do not work in devtest.ts */}} + +{{template "base/footer" dict}} diff --git a/templates/devtest/devtest-header.tmpl b/templates/devtest/devtest-header.tmpl new file mode 100644 index 0000000000..a5910b96e6 --- /dev/null +++ b/templates/devtest/devtest-header.tmpl @@ -0,0 +1,2 @@ +{{template "base/head" dict}} + diff --git a/templates/devtest/list.tmpl b/templates/devtest/devtest-list.tmpl similarity index 65% rename from templates/devtest/list.tmpl rename to templates/devtest/devtest-list.tmpl index 90b1fcc9d0..71ee6807f0 100644 --- a/templates/devtest/list.tmpl +++ b/templates/devtest/devtest-list.tmpl @@ -1,5 +1,4 @@ -{{template "base/head" .}} - +{{template "devtest/devtest-header"}}