Add template linting via djlint (#25212)

So I found this [linter](https://github.com/Riverside-Healthcare/djlint)
which features a mode for go templates, so I gave it a try and it did
find a number of valid issue, like unbalanced tags etc. It also has a
number of bugs, I had to disable/workaround many issues.

Given that this linter is written in python, this does add a dependency
on `python` >= 3.8 and `poetry` to the development environment to be
able to run this linter locally.

- `e.g.` prefixes on placeholders are removed because the linter had a
false-positive on `placeholder="e.g. cn=Search"` for the `attr=value`
syntax and it's not ideal anyways to write `e.g.` into a placeholder
because a placeholder is meant to hold a sample value.
- In `templates/repo/settings/options.tmpl` I simplified the logic to
not conditionally create opening tags without closing tags because this
stuff confuses the linter (and possibly the reader as well).
pull/25267/head
silverwind 1 year ago committed by GitHub
parent a0eaf08812
commit e24f651c86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      .github/workflows/files-changed.yml
  2. 13
      .github/workflows/pull-compliance.yml
  3. 1
      .gitignore
  4. 15
      Makefile
  5. 3
      docs/content/doc/development/hacking-on-gitea.en-us.md
  6. 331
      poetry.lock
  7. 4
      poetry.toml
  8. 19
      pyproject.toml
  9. 30
      templates/admin/auth/edit.tmpl
  10. 28
      templates/admin/auth/source/ldap.tmpl
  11. 2
      templates/admin/auth/source/oauth.tmpl
  12. 2
      templates/admin/queue.tmpl
  13. 2
      templates/admin/queue_manage.tmpl
  14. 4
      templates/admin/repo/unadopted.tmpl
  15. 4
      templates/admin/user/edit.tmpl
  16. 4
      templates/base/head_navbar.tmpl
  17. 4
      templates/install.tmpl
  18. 1
      templates/mail/notify/repo_transfer.tmpl
  19. 6
      templates/org/team/sidebar.tmpl
  20. 2
      templates/repo/blame.tmpl
  21. 2
      templates/repo/commit_page.tmpl
  22. 4
      templates/repo/commits_list.tmpl
  23. 7
      templates/repo/diff/section_code.tmpl
  24. 2
      templates/repo/diff/section_split.tmpl
  25. 2
      templates/repo/diff/whitespace_dropdown.tmpl
  26. 2
      templates/repo/editor/cherry_pick.tmpl
  27. 2
      templates/repo/header.tmpl
  28. 2
      templates/repo/issue/branch_selector_field.tmpl
  29. 2
      templates/repo/issue/choose.tmpl
  30. 3
      templates/repo/issue/labels.tmpl
  31. 2
      templates/repo/issue/view_content/comments_delete_time.tmpl
  32. 14
      templates/repo/issue/view_content/sidebar.tmpl
  33. 4
      templates/repo/settings/lfs_locks.tmpl
  34. 88
      templates/repo/settings/options.tmpl
  35. 2
      templates/repo/settings/webhook/base_list.tmpl
  36. 4
      templates/repo/settings/webhook/discord.tmpl
  37. 3
      templates/repo/settings/webhook/history.tmpl
  38. 6
      templates/repo/settings/webhook/packagist.tmpl
  39. 8
      templates/repo/settings/webhook/slack.tmpl
  40. 2
      templates/shared/actions/runner_list.tmpl
  41. 2
      templates/status/404.tmpl
  42. 8
      templates/user/notification/notification_div.tmpl
  43. 2
      templates/user/settings/keys_gpg.tmpl
  44. 1
      templates/user/settings/packages.tmpl
  45. 4
      templates/user/settings/repos.tmpl
  46. 1
      templates/user/settings/security/openid.tmpl
  47. 4
      templates/user/settings/security/twofa_enroll.tmpl

@ -15,6 +15,9 @@ on:
actions: actions:
description: "whether actions files changed" description: "whether actions files changed"
value: ${{ jobs.detect.outputs.actions }} value: ${{ jobs.detect.outputs.actions }}
templates:
description: "whether templates files changed"
value: ${{ jobs.detect.outputs.templates }}
jobs: jobs:
detect: detect:
@ -27,6 +30,7 @@ jobs:
frontend: ${{ steps.changes.outputs.frontend }} frontend: ${{ steps.changes.outputs.frontend }}
docs: ${{ steps.changes.outputs.docs }} docs: ${{ steps.changes.outputs.docs }}
actions: ${{ steps.changes.outputs.actions }} actions: ${{ steps.changes.outputs.actions }}
templates: ${{ steps.changes.outputs.templates }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: dorny/paths-filter@v2 - uses: dorny/paths-filter@v2
@ -35,7 +39,7 @@ jobs:
filters: | filters: |
backend: backend:
- "**/*.go" - "**/*.go"
- "**/*.tmpl" - "templates/**/*.tmpl"
- "go.mod" - "go.mod"
- "go.sum" - "go.sum"
@ -51,3 +55,6 @@ jobs:
actions: actions:
- ".github/workflows/*" - ".github/workflows/*"
templates:
- "templates/**/*.tmpl"

@ -26,6 +26,19 @@ jobs:
env: env:
TAGS: bindata sqlite sqlite_unlock_notify TAGS: bindata sqlite sqlite_unlock_notify
lint-templates:
if: needs.files-changed.outputs.templates == 'true'
needs: files-changed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: pip install poetry
- run: make deps-py
- run: make lint-templates
lint-go-windows: lint-go-windows:
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true' if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
needs: files-changed needs: files-changed

1
.gitignore vendored

@ -70,6 +70,7 @@ cpu.out
/tests/*.ini /tests/*.ini
/tests/**/*.git/**/*.sample /tests/**/*.git/**/*.sample
/node_modules /node_modules
/.venv
/yarn.lock /yarn.lock
/yarn-error.log /yarn-error.log
/npm-debug.log* /npm-debug.log*

@ -198,6 +198,7 @@ help:
@echo " - deps-frontend install frontend dependencies" @echo " - deps-frontend install frontend dependencies"
@echo " - deps-backend install backend dependencies" @echo " - deps-backend install backend dependencies"
@echo " - deps-tools install tool dependencies" @echo " - deps-tools install tool dependencies"
@echo " - deps-py install python dependencies"
@echo " - lint lint everything" @echo " - lint lint everything"
@echo " - lint-fix lint everything and fix issues" @echo " - lint-fix lint everything and fix issues"
@echo " - lint-actions lint action workflow files" @echo " - lint-actions lint action workflow files"
@ -214,6 +215,7 @@ help:
@echo " - lint-css-fix lint css files and fix issues" @echo " - lint-css-fix lint css files and fix issues"
@echo " - lint-md lint markdown files" @echo " - lint-md lint markdown files"
@echo " - lint-swagger lint swagger files" @echo " - lint-swagger lint swagger files"
@echo " - lint-templates lint template files"
@echo " - checks run various consistency checks" @echo " - checks run various consistency checks"
@echo " - checks-frontend check frontend files" @echo " - checks-frontend check frontend files"
@echo " - checks-backend check backend files" @echo " - checks-backend check backend files"
@ -417,6 +419,10 @@ lint-editorconfig:
lint-actions: lint-actions:
$(GO) run $(ACTIONLINT_PACKAGE) $(GO) run $(ACTIONLINT_PACKAGE)
.PHONY: lint-templates
lint-templates: .venv
@poetry run djlint $(shell find templates -type f -iname '*.tmpl')
.PHONY: watch .PHONY: watch
watch: watch:
@bash build/watch.sh @bash build/watch.sh
@ -893,7 +899,10 @@ deps-docs:
fi fi
.PHONY: deps .PHONY: deps
deps: deps-frontend deps-backend deps-tools deps-docs deps: deps-frontend deps-backend deps-tools deps-docs deps-py
.PHONY: deps-py
deps-py: .venv
.PHONY: deps-frontend .PHONY: deps-frontend
deps-frontend: node_modules deps-frontend: node_modules
@ -920,6 +929,10 @@ node_modules: package-lock.json
npm install --no-save npm install --no-save
@touch node_modules @touch node_modules
.venv: poetry.lock
poetry install
@touch .venv
.PHONY: npm-update .PHONY: npm-update
npm-update: node-check | node_modules npm-update: node-check | node_modules
npx updates -cu npx updates -cu

@ -48,6 +48,9 @@ Gitea uses `gofmt` to format source code. However, the results of
recommended to install the version of Go that our continuous integration is recommended to install the version of Go that our continuous integration is
running. As of last update, the Go version should be {{< go-version >}}. running. As of last update, the Go version should be {{< go-version >}}.
To lint the template files, ensure [Python](https://www.python.org/) and
[Poetry](https://python-poetry.org/) are installed.
## Installing Make ## Installing Make
Gitea makes heavy use of Make to automate tasks and improve development. This Gitea makes heavy use of Make to automate tasks and improve development. This

331
poetry.lock generated

@ -0,0 +1,331 @@
# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand.
[[package]]
name = "click"
version = "8.1.3"
description = "Composable command line interface toolkit"
optional = false
python-versions = ">=3.7"
files = [
{file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"},
{file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"},
]
[package.dependencies]
colorama = {version = "*", markers = "platform_system == \"Windows\""}
[[package]]
name = "colorama"
version = "0.4.6"
description = "Cross-platform colored terminal text."
optional = false
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
files = [
{file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
{file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
]
[[package]]
name = "cssbeautifier"
version = "1.14.8"
description = "CSS unobfuscator and beautifier."
optional = false
python-versions = "*"
files = [
{file = "cssbeautifier-1.14.8.tar.gz", hash = "sha256:9ad4c5b2ffe0b439a4bed278bc440b6a89c40823c3f19db38f808d256216a592"},
]
[package.dependencies]
editorconfig = ">=0.12.2"
jsbeautifier = "*"
six = ">=1.13.0"
[[package]]
name = "djlint"
version = "1.31.0"
description = "HTML Template Linter and Formatter"
optional = false
python-versions = ">=3.8.0,<4.0.0"
files = [
{file = "djlint-1.31.0-py3-none-any.whl", hash = "sha256:2b9200c67103b79835b7547ff732e910888d1f0ef684f5b329eb64b14d09c046"},
{file = "djlint-1.31.0.tar.gz", hash = "sha256:8acb4b751b429c5aabb1aef5b6007bdf53224eceda25c5fbe04c42cc57c0a7ba"},
]
[package.dependencies]
click = ">=8.0.1,<9.0.0"
colorama = ">=0.4.4,<0.5.0"
cssbeautifier = ">=1.14.4,<2.0.0"
html-tag-names = ">=0.1.2,<0.2.0"
html-void-elements = ">=0.1.0,<0.2.0"
jsbeautifier = ">=1.14.4,<2.0.0"
json5 = ">=0.9.11,<0.10.0"
pathspec = ">=0.11.0,<0.12.0"
PyYAML = ">=6.0,<7.0"
regex = ">=2023.0.0,<2024.0.0"
tomli = {version = ">=2.0.1,<3.0.0", markers = "python_version < \"3.11\""}
tqdm = ">=4.62.2,<5.0.0"
[[package]]
name = "editorconfig"
version = "0.12.3"
description = "EditorConfig File Locator and Interpreter for Python"
optional = false
python-versions = "*"
files = [
{file = "EditorConfig-0.12.3-py3-none-any.whl", hash = "sha256:6b0851425aa875b08b16789ee0eeadbd4ab59666e9ebe728e526314c4a2e52c1"},
{file = "EditorConfig-0.12.3.tar.gz", hash = "sha256:57f8ce78afcba15c8b18d46b5170848c88d56fd38f05c2ec60dbbfcb8996e89e"},
]
[[package]]
name = "html-tag-names"
version = "0.1.2"
description = "List of known HTML tag names"
optional = false
python-versions = ">=3.7,<4.0"
files = [
{file = "html-tag-names-0.1.2.tar.gz", hash = "sha256:04924aca48770f36b5a41c27e4d917062507be05118acb0ba869c97389084297"},
{file = "html_tag_names-0.1.2-py3-none-any.whl", hash = "sha256:eeb69ef21078486b615241f0393a72b41352c5219ee648e7c61f5632d26f0420"},
]
[[package]]
name = "html-void-elements"
version = "0.1.0"
description = "List of HTML void tag names."
optional = false
python-versions = ">=3.7,<4.0"
files = [
{file = "html-void-elements-0.1.0.tar.gz", hash = "sha256:931b88f84cd606fee0b582c28fcd00e41d7149421fb673e1e1abd2f0c4f231f0"},
{file = "html_void_elements-0.1.0-py3-none-any.whl", hash = "sha256:784cf39db03cdeb017320d9301009f8f3480f9d7b254d0974272e80e0cb5e0d2"},
]
[[package]]
name = "jsbeautifier"
version = "1.14.8"
description = "JavaScript unobfuscator and beautifier."
optional = false
python-versions = "*"
files = [
{file = "jsbeautifier-1.14.8.tar.gz", hash = "sha256:d4c4e263a42dd6194afb9dbe54710be3c5604492cbec3e89c92dd98513f98b9f"},
]
[package.dependencies]
editorconfig = ">=0.12.2"
six = ">=1.13.0"
[[package]]
name = "json5"
version = "0.9.14"
description = "A Python implementation of the JSON5 data format."
optional = false
python-versions = "*"
files = [
{file = "json5-0.9.14-py2.py3-none-any.whl", hash = "sha256:740c7f1b9e584a468dbb2939d8d458db3427f2c93ae2139d05f47e453eae964f"},
{file = "json5-0.9.14.tar.gz", hash = "sha256:9ed66c3a6ca3510a976a9ef9b8c0787de24802724ab1860bc0153c7fdd589b02"},
]
[package.extras]
dev = ["hypothesis"]
[[package]]
name = "pathspec"
version = "0.11.1"
description = "Utility library for gitignore style pattern matching of file paths."
optional = false
python-versions = ">=3.7"
files = [
{file = "pathspec-0.11.1-py3-none-any.whl", hash = "sha256:d8af70af76652554bd134c22b3e8a1cc46ed7d91edcdd721ef1a0c51a84a5293"},
{file = "pathspec-0.11.1.tar.gz", hash = "sha256:2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687"},
]
[[package]]
name = "pyyaml"
version = "6.0"
description = "YAML parser and emitter for Python"
optional = false
python-versions = ">=3.6"
files = [
{file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"},
{file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"},
{file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"},
{file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"},
{file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"},
{file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"},
{file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"},
{file = "PyYAML-6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358"},
{file = "PyYAML-6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1"},
{file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d"},
{file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f"},
{file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782"},
{file = "PyYAML-6.0-cp311-cp311-win32.whl", hash = "sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7"},
{file = "PyYAML-6.0-cp311-cp311-win_amd64.whl", hash = "sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf"},
{file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"},
{file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"},
{file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"},
{file = "PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4"},
{file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"},
{file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"},
{file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"},
{file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"},
{file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"},
{file = "PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9"},
{file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"},
{file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"},
{file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"},
{file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"},
{file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"},
{file = "PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287"},
{file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"},
{file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"},
{file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"},
{file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"},
{file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"},
{file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"},
{file = "PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0"},
{file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"},
{file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"},
{file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"},
]
[[package]]
name = "regex"
version = "2023.6.3"
description = "Alternative regular expression module, to replace re."
optional = false
python-versions = ">=3.6"
files = [
{file = "regex-2023.6.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:824bf3ac11001849aec3fa1d69abcb67aac3e150a933963fb12bda5151fe1bfd"},
{file = "regex-2023.6.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:05ed27acdf4465c95826962528f9e8d41dbf9b1aa8531a387dee6ed215a3e9ef"},
{file = "regex-2023.6.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b49c764f88a79160fa64f9a7b425620e87c9f46095ef9c9920542ab2495c8bc"},
{file = "regex-2023.6.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8e3f1316c2293e5469f8f09dc2d76efb6c3982d3da91ba95061a7e69489a14ef"},
{file = "regex-2023.6.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:43e1dd9d12df9004246bacb79a0e5886b3b6071b32e41f83b0acbf293f820ee8"},
{file = "regex-2023.6.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4959e8bcbfda5146477d21c3a8ad81b185cd252f3d0d6e4724a5ef11c012fb06"},
{file = "regex-2023.6.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:af4dd387354dc83a3bff67127a124c21116feb0d2ef536805c454721c5d7993d"},
{file = "regex-2023.6.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:2239d95d8e243658b8dbb36b12bd10c33ad6e6933a54d36ff053713f129aa536"},
{file = "regex-2023.6.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:890e5a11c97cf0d0c550eb661b937a1e45431ffa79803b942a057c4fb12a2da2"},
{file = "regex-2023.6.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:a8105e9af3b029f243ab11ad47c19b566482c150c754e4c717900a798806b222"},
{file = "regex-2023.6.3-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:25be746a8ec7bc7b082783216de8e9473803706723b3f6bef34b3d0ed03d57e2"},
{file = "regex-2023.6.3-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:3676f1dd082be28b1266c93f618ee07741b704ab7b68501a173ce7d8d0d0ca18"},
{file = "regex-2023.6.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:10cb847aeb1728412c666ab2e2000ba6f174f25b2bdc7292e7dd71b16db07568"},
{file = "regex-2023.6.3-cp310-cp310-win32.whl", hash = "sha256:dbbbfce33cd98f97f6bffb17801b0576e653f4fdb1d399b2ea89638bc8d08ae1"},
{file = "regex-2023.6.3-cp310-cp310-win_amd64.whl", hash = "sha256:c5f8037000eb21e4823aa485149f2299eb589f8d1fe4b448036d230c3f4e68e0"},
{file = "regex-2023.6.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c123f662be8ec5ab4ea72ea300359023a5d1df095b7ead76fedcd8babbedf969"},
{file = "regex-2023.6.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9edcbad1f8a407e450fbac88d89e04e0b99a08473f666a3f3de0fd292badb6aa"},
{file = "regex-2023.6.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcba6dae7de533c876255317c11f3abe4907ba7d9aa15d13e3d9710d4315ec0e"},
{file = "regex-2023.6.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:29cdd471ebf9e0f2fb3cac165efedc3c58db841d83a518b082077e612d3ee5df"},
{file = "regex-2023.6.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:12b74fbbf6cbbf9dbce20eb9b5879469e97aeeaa874145517563cca4029db65c"},
{file = "regex-2023.6.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c29ca1bd61b16b67be247be87390ef1d1ef702800f91fbd1991f5c4421ebae8"},
{file = "regex-2023.6.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d77f09bc4b55d4bf7cc5eba785d87001d6757b7c9eec237fe2af57aba1a071d9"},
{file = "regex-2023.6.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ea353ecb6ab5f7e7d2f4372b1e779796ebd7b37352d290096978fea83c4dba0c"},
{file = "regex-2023.6.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:10590510780b7541969287512d1b43f19f965c2ece6c9b1c00fc367b29d8dce7"},
{file = "regex-2023.6.3-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:e2fbd6236aae3b7f9d514312cdb58e6494ee1c76a9948adde6eba33eb1c4264f"},
{file = "regex-2023.6.3-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:6b2675068c8b56f6bfd5a2bda55b8accbb96c02fd563704732fd1c95e2083461"},
{file = "regex-2023.6.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:74419d2b50ecb98360cfaa2974da8689cb3b45b9deff0dcf489c0d333bcc1477"},
{file = "regex-2023.6.3-cp311-cp311-win32.whl", hash = "sha256:fb5ec16523dc573a4b277663a2b5a364e2099902d3944c9419a40ebd56a118f9"},
{file = "regex-2023.6.3-cp311-cp311-win_amd64.whl", hash = "sha256:09e4a1a6acc39294a36b7338819b10baceb227f7f7dbbea0506d419b5a1dd8af"},
{file = "regex-2023.6.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:0654bca0cdf28a5956c83839162692725159f4cda8d63e0911a2c0dc76166525"},
{file = "regex-2023.6.3-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:463b6a3ceb5ca952e66550a4532cef94c9a0c80dc156c4cc343041951aec1697"},
{file = "regex-2023.6.3-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:87b2a5bb5e78ee0ad1de71c664d6eb536dc3947a46a69182a90f4410f5e3f7dd"},
{file = "regex-2023.6.3-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6343c6928282c1f6a9db41f5fd551662310e8774c0e5ebccb767002fcf663ca9"},
{file = "regex-2023.6.3-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b6192d5af2ccd2a38877bfef086d35e6659566a335b1492786ff254c168b1693"},
{file = "regex-2023.6.3-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:74390d18c75054947e4194019077e243c06fbb62e541d8817a0fa822ea310c14"},
{file = "regex-2023.6.3-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:742e19a90d9bb2f4a6cf2862b8b06dea5e09b96c9f2df1779e53432d7275331f"},
{file = "regex-2023.6.3-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:8abbc5d54ea0ee80e37fef009e3cec5dafd722ed3c829126253d3e22f3846f1e"},
{file = "regex-2023.6.3-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:c2b867c17a7a7ae44c43ebbeb1b5ff406b3e8d5b3e14662683e5e66e6cc868d3"},
{file = "regex-2023.6.3-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:d831c2f8ff278179705ca59f7e8524069c1a989e716a1874d6d1aab6119d91d1"},
{file = "regex-2023.6.3-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:ee2d1a9a253b1729bb2de27d41f696ae893507c7db224436abe83ee25356f5c1"},
{file = "regex-2023.6.3-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:61474f0b41fe1a80e8dfa70f70ea1e047387b7cd01c85ec88fa44f5d7561d787"},
{file = "regex-2023.6.3-cp36-cp36m-win32.whl", hash = "sha256:0b71e63226e393b534105fcbdd8740410dc6b0854c2bfa39bbda6b0d40e59a54"},
{file = "regex-2023.6.3-cp36-cp36m-win_amd64.whl", hash = "sha256:bbb02fd4462f37060122e5acacec78e49c0fbb303c30dd49c7f493cf21fc5b27"},
{file = "regex-2023.6.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b862c2b9d5ae38a68b92e215b93f98d4c5e9454fa36aae4450f61dd33ff48487"},
{file = "regex-2023.6.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:976d7a304b59ede34ca2921305b57356694f9e6879db323fd90a80f865d355a3"},
{file = "regex-2023.6.3-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:83320a09188e0e6c39088355d423aa9d056ad57a0b6c6381b300ec1a04ec3d16"},
{file = "regex-2023.6.3-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9427a399501818a7564f8c90eced1e9e20709ece36be701f394ada99890ea4b3"},
{file = "regex-2023.6.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7178bbc1b2ec40eaca599d13c092079bf529679bf0371c602edaa555e10b41c3"},
{file = "regex-2023.6.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:837328d14cde912af625d5f303ec29f7e28cdab588674897baafaf505341f2fc"},
{file = "regex-2023.6.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:2d44dc13229905ae96dd2ae2dd7cebf824ee92bc52e8cf03dcead37d926da019"},
{file = "regex-2023.6.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d54af539295392611e7efbe94e827311eb8b29668e2b3f4cadcfe6f46df9c777"},
{file = "regex-2023.6.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:7117d10690c38a622e54c432dfbbd3cbd92f09401d622902c32f6d377e2300ee"},
{file = "regex-2023.6.3-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bb60b503ec8a6e4e3e03a681072fa3a5adcbfa5479fa2d898ae2b4a8e24c4591"},
{file = "regex-2023.6.3-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:65ba8603753cec91c71de423a943ba506363b0e5c3fdb913ef8f9caa14b2c7e0"},
{file = "regex-2023.6.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:271f0bdba3c70b58e6f500b205d10a36fb4b58bd06ac61381b68de66442efddb"},
{file = "regex-2023.6.3-cp37-cp37m-win32.whl", hash = "sha256:9beb322958aaca059f34975b0df135181f2e5d7a13b84d3e0e45434749cb20f7"},
{file = "regex-2023.6.3-cp37-cp37m-win_amd64.whl", hash = "sha256:fea75c3710d4f31389eed3c02f62d0b66a9da282521075061ce875eb5300cf23"},
{file = "regex-2023.6.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8f56fcb7ff7bf7404becdfc60b1e81a6d0561807051fd2f1860b0d0348156a07"},
{file = "regex-2023.6.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d2da3abc88711bce7557412310dfa50327d5769a31d1c894b58eb256459dc289"},
{file = "regex-2023.6.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a99b50300df5add73d307cf66abea093304a07eb017bce94f01e795090dea87c"},
{file = "regex-2023.6.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5708089ed5b40a7b2dc561e0c8baa9535b77771b64a8330b684823cfd5116036"},
{file = "regex-2023.6.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:687ea9d78a4b1cf82f8479cab23678aff723108df3edeac098e5b2498879f4a7"},
{file = "regex-2023.6.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4d3850beab9f527f06ccc94b446c864059c57651b3f911fddb8d9d3ec1d1b25d"},
{file = "regex-2023.6.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e8915cc96abeb8983cea1df3c939e3c6e1ac778340c17732eb63bb96247b91d2"},
{file = "regex-2023.6.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:841d6e0e5663d4c7b4c8099c9997be748677d46cbf43f9f471150e560791f7ff"},
{file = "regex-2023.6.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9edce5281f965cf135e19840f4d93d55b3835122aa76ccacfd389e880ba4cf82"},
{file = "regex-2023.6.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:b956231ebdc45f5b7a2e1f90f66a12be9610ce775fe1b1d50414aac1e9206c06"},
{file = "regex-2023.6.3-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:36efeba71c6539d23c4643be88295ce8c82c88bbd7c65e8a24081d2ca123da3f"},
{file = "regex-2023.6.3-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:cf67ca618b4fd34aee78740bea954d7c69fdda419eb208c2c0c7060bb822d747"},
{file = "regex-2023.6.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b4598b1897837067a57b08147a68ac026c1e73b31ef6e36deeeb1fa60b2933c9"},
{file = "regex-2023.6.3-cp38-cp38-win32.whl", hash = "sha256:f415f802fbcafed5dcc694c13b1292f07fe0befdb94aa8a52905bd115ff41e88"},
{file = "regex-2023.6.3-cp38-cp38-win_amd64.whl", hash = "sha256:d4f03bb71d482f979bda92e1427f3ec9b220e62a7dd337af0aa6b47bf4498f72"},
{file = "regex-2023.6.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ccf91346b7bd20c790310c4147eee6ed495a54ddb6737162a36ce9dbef3e4751"},
{file = "regex-2023.6.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b28f5024a3a041009eb4c333863d7894d191215b39576535c6734cd88b0fcb68"},
{file = "regex-2023.6.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e0bb18053dfcfed432cc3ac632b5e5e5c5b7e55fb3f8090e867bfd9b054dbcbf"},
{file = "regex-2023.6.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a5bfb3004f2144a084a16ce19ca56b8ac46e6fd0651f54269fc9e230edb5e4a"},
{file = "regex-2023.6.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5c6b48d0fa50d8f4df3daf451be7f9689c2bde1a52b1225c5926e3f54b6a9ed1"},
{file = "regex-2023.6.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:051da80e6eeb6e239e394ae60704d2b566aa6a7aed6f2890a7967307267a5dc6"},
{file = "regex-2023.6.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a4c3b7fa4cdaa69268748665a1a6ff70c014d39bb69c50fda64b396c9116cf77"},
{file = "regex-2023.6.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:457b6cce21bee41ac292d6753d5e94dcbc5c9e3e3a834da285b0bde7aa4a11e9"},
{file = "regex-2023.6.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:aad51907d74fc183033ad796dd4c2e080d1adcc4fd3c0fd4fd499f30c03011cd"},
{file = "regex-2023.6.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:0385e73da22363778ef2324950e08b689abdf0b108a7d8decb403ad7f5191938"},
{file = "regex-2023.6.3-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:c6a57b742133830eec44d9b2290daf5cbe0a2f1d6acee1b3c7b1c7b2f3606df7"},
{file = "regex-2023.6.3-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:3e5219bf9e75993d73ab3d25985c857c77e614525fac9ae02b1bebd92f7cecac"},
{file = "regex-2023.6.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e5087a3c59eef624a4591ef9eaa6e9a8d8a94c779dade95d27c0bc24650261cd"},
{file = "regex-2023.6.3-cp39-cp39-win32.whl", hash = "sha256:20326216cc2afe69b6e98528160b225d72f85ab080cbdf0b11528cbbaba2248f"},
{file = "regex-2023.6.3-cp39-cp39-win_amd64.whl", hash = "sha256:bdff5eab10e59cf26bc479f565e25ed71a7d041d1ded04ccf9aee1d9f208487a"},
{file = "regex-2023.6.3.tar.gz", hash = "sha256:72d1a25bf36d2050ceb35b517afe13864865268dfb45910e2e17a84be6cbfeb0"},
]
[[package]]
name = "six"
version = "1.16.0"
description = "Python 2 and 3 compatibility utilities"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
files = [
{file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"},
{file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"},
]
[[package]]
name = "tomli"
version = "2.0.1"
description = "A lil' TOML parser"
optional = false
python-versions = ">=3.7"
files = [
{file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
{file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
]
[[package]]
name = "tqdm"
version = "4.65.0"
description = "Fast, Extensible Progress Meter"
optional = false
python-versions = ">=3.7"
files = [
{file = "tqdm-4.65.0-py3-none-any.whl", hash = "sha256:c4f53a17fe37e132815abceec022631be8ffe1b9381c2e6e30aa70edc99e9671"},
{file = "tqdm-4.65.0.tar.gz", hash = "sha256:1871fb68a86b8fb3b59ca4cdd3dcccbc7e6d613eeed31f4c332531977b89beb5"},
]
[package.dependencies]
colorama = {version = "*", markers = "platform_system == \"Windows\""}
[package.extras]
dev = ["py-make (>=0.1.0)", "twine", "wheel"]
notebook = ["ipywidgets (>=6)"]
slack = ["slack-sdk"]
telegram = ["requests"]
[metadata]
lock-version = "2.0"
python-versions = "^3.8"
content-hash = "22c4af11eadd8784b613951d6160d67be0f33500238a450741c3d75beb218dad"

@ -0,0 +1,4 @@
[virtualenvs]
in-project = true
no-pip = true
no-setuptools = true

@ -0,0 +1,19 @@
[tool.poetry]
name = "gitea"
version = "0.0.0"
description = ""
authors = []
[tool.poetry.dependencies]
python = "^3.8"
[tool.poetry.group.dev.dependencies]
djlint = "1.31.0"
[tool.djlint]
profile="golang"
ignore="H005,H006,H008,H013,H014,H016,H020,H021,H023,H026,H030,H031,T027"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

@ -36,11 +36,11 @@
</div> </div>
<div class="required field"> <div class="required field">
<label for="host">{{.locale.Tr "admin.auths.host"}}</label> <label for="host">{{.locale.Tr "admin.auths.host"}}</label>
<input id="host" name="host" value="{{$cfg.Host}}" placeholder="e.g. mydomain.com" required> <input id="host" name="host" value="{{$cfg.Host}}" placeholder="mydomain.com" required>
</div> </div>
<div class="required field"> <div class="required field">
<label for="port">{{.locale.Tr "admin.auths.port"}}</label> <label for="port">{{.locale.Tr "admin.auths.port"}}</label>
<input id="port" name="port" value="{{$cfg.Port}}" placeholder="e.g. 636" required> <input id="port" name="port" value="{{$cfg.Port}}" placeholder="636" required>
</div> </div>
<div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}"> <div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}">
<div class="ui checkbox"> <div class="ui checkbox">
@ -51,7 +51,7 @@
{{if .Source.IsLDAP}} {{if .Source.IsLDAP}}
<div class="field"> <div class="field">
<label for="bind_dn">{{.locale.Tr "admin.auths.bind_dn"}}</label> <label for="bind_dn">{{.locale.Tr "admin.auths.bind_dn"}}</label>
<input id="bind_dn" name="bind_dn" value="{{$cfg.BindDN}}" placeholder="e.g. cn=Search,dc=mydomain,dc=com"> <input id="bind_dn" name="bind_dn" value="{{$cfg.BindDN}}" placeholder="cn=Search,dc=mydomain,dc=com">
</div> </div>
<div class="field"> <div class="field">
<label for="bind_password">{{.locale.Tr "admin.auths.bind_password"}}</label> <label for="bind_password">{{.locale.Tr "admin.auths.bind_password"}}</label>
@ -60,17 +60,17 @@
{{end}} {{end}}
<div class="{{if .Source.IsLDAP}}required{{end}} field"> <div class="{{if .Source.IsLDAP}}required{{end}} field">
<label for="user_base">{{.locale.Tr "admin.auths.user_base"}}</label> <label for="user_base">{{.locale.Tr "admin.auths.user_base"}}</label>
<input id="user_base" name="user_base" value="{{$cfg.UserBase}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com" {{if .Source.IsLDAP}}required{{end}}> <input id="user_base" name="user_base" value="{{$cfg.UserBase}}" placeholder="ou=Users,dc=mydomain,dc=com" {{if .Source.IsLDAP}}required{{end}}>
</div> </div>
{{if .Source.IsDLDAP}} {{if .Source.IsDLDAP}}
<div class="required field"> <div class="required field">
<label for="user_dn">{{.locale.Tr "admin.auths.user_dn"}}</label> <label for="user_dn">{{.locale.Tr "admin.auths.user_dn"}}</label>
<input id="user_dn" name="user_dn" value="{{$cfg.UserDN}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com" required> <input id="user_dn" name="user_dn" value="{{$cfg.UserDN}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com" required>
</div> </div>
{{end}} {{end}}
<div class="required field"> <div class="required field">
<label for="filter">{{.locale.Tr "admin.auths.filter"}}</label> <label for="filter">{{.locale.Tr "admin.auths.filter"}}</label>
<input id="filter" name="filter" value="{{$cfg.Filter}}" placeholder="e.g. (&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))" required> <input id="filter" name="filter" value="{{$cfg.Filter}}" placeholder="(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))" required>
</div> </div>
<div class="field"> <div class="field">
<label for="admin_filter">{{.locale.Tr "admin.auths.admin_filter"}}</label> <label for="admin_filter">{{.locale.Tr "admin.auths.admin_filter"}}</label>
@ -95,15 +95,15 @@
</div> </div>
<div class="required field"> <div class="required field">
<label for="attribute_mail">{{.locale.Tr "admin.auths.attribute_mail"}}</label> <label for="attribute_mail">{{.locale.Tr "admin.auths.attribute_mail"}}</label>
<input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="e.g. mail" required> <input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="mail" required>
</div> </div>
<div class="field"> <div class="field">
<label for="attribute_ssh_public_key">{{.locale.Tr "admin.auths.attribute_ssh_public_key"}}</label> <label for="attribute_ssh_public_key">{{.locale.Tr "admin.auths.attribute_ssh_public_key"}}</label>
<input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{$cfg.AttributeSSHPublicKey}}" placeholder="e.g. SshPublicKey"> <input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{$cfg.AttributeSSHPublicKey}}" placeholder="SshPublicKey">
</div> </div>
<div class="field"> <div class="field">
<label for="attribute_avatar">{{.locale.Tr "admin.auths.attribute_avatar"}}</label> <label for="attribute_avatar">{{.locale.Tr "admin.auths.attribute_avatar"}}</label>
<input id="attribute_avatar" name="attribute_avatar" value="{{$cfg.AttributeAvatar}}" placeholder="e.g. jpegPhoto"> <input id="attribute_avatar" name="attribute_avatar" value="{{$cfg.AttributeAvatar}}" placeholder="jpegPhoto">
</div> </div>
@ -117,23 +117,23 @@
<div id="ldap-group-options" class="ui segment secondary {{if not $cfg.GroupsEnabled}}gt-hidden{{end}}"> <div id="ldap-group-options" class="ui segment secondary {{if not $cfg.GroupsEnabled}}gt-hidden{{end}}">
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.group_search_base"}}</label> <label>{{.locale.Tr "admin.auths.group_search_base"}}</label>
<input name="group_dn" value="{{$cfg.GroupDN}}" placeholder="e.g. ou=group,dc=mydomain,dc=com"> <input name="group_dn" value="{{$cfg.GroupDN}}" placeholder="ou=group,dc=mydomain,dc=com">
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.group_attribute_list_users"}}</label> <label>{{.locale.Tr "admin.auths.group_attribute_list_users"}}</label>
<input name="group_member_uid" value="{{$cfg.GroupMemberUID}}" placeholder="e.g. memberUid"> <input name="group_member_uid" value="{{$cfg.GroupMemberUID}}" placeholder="memberUid">
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.user_attribute_in_group"}}</label> <label>{{.locale.Tr "admin.auths.user_attribute_in_group"}}</label>
<input name="user_uid" value="{{$cfg.UserUID}}" placeholder="e.g. uid"> <input name="user_uid" value="{{$cfg.UserUID}}" placeholder="uid">
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.verify_group_membership"}}</label> <label>{{.locale.Tr "admin.auths.verify_group_membership"}}</label>
<input name="group_filter" value="{{$cfg.GroupFilter}}" placeholder="e.g. (|(cn=gitea_users)(cn=admins))"> <input name="group_filter" value="{{$cfg.GroupFilter}}" placeholder="(|(cn=gitea_users)(cn=admins))">
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.map_group_to_team"}}</label> <label>{{.locale.Tr "admin.auths.map_group_to_team"}}</label>
<textarea name="group_team_map" rows="5" placeholder='e.g. {"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{$cfg.GroupTeamMap}}</textarea> <textarea name="group_team_map" rows="5" placeholder='{"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{$cfg.GroupTeamMap}}</textarea>
</div> </div>
<div class="ui checkbox"> <div class="ui checkbox">
<label>{{.locale.Tr "admin.auths.map_group_to_team_removal"}}</label> <label>{{.locale.Tr "admin.auths.map_group_to_team_removal"}}</label>
@ -360,7 +360,7 @@
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team"}}</label> <label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team"}}</label>
<textarea name="oauth2_group_team_map" rows="5" placeholder='e.g. {"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{$cfg.GroupTeamMap}}</textarea> <textarea name="oauth2_group_team_map" rows="5" placeholder='{"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{$cfg.GroupTeamMap}}</textarea>
</div> </div>
<div class="ui checkbox"> <div class="ui checkbox">
<label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team_removal"}}</label> <label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team_removal"}}</label>

@ -14,11 +14,11 @@
</div> </div>
<div class="required field"> <div class="required field">
<label for="host">{{.locale.Tr "admin.auths.host"}}</label> <label for="host">{{.locale.Tr "admin.auths.host"}}</label>
<input id="host" name="host" value="{{.host}}" placeholder="e.g. mydomain.com"> <input id="host" name="host" value="{{.host}}" placeholder="mydomain.com">
</div> </div>
<div class="required field"> <div class="required field">
<label for="port">{{.locale.Tr "admin.auths.port"}}</label> <label for="port">{{.locale.Tr "admin.auths.port"}}</label>
<input id="port" name="port" value="{{.port}}" placeholder="e.g. 636"> <input id="port" name="port" value="{{.port}}" placeholder="636">
</div> </div>
<div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}"> <div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}">
<div class="ui checkbox"> <div class="ui checkbox">
@ -28,7 +28,7 @@
</div> </div>
<div class="ldap field {{if not (eq .type 2)}}gt-hidden{{end}}"> <div class="ldap field {{if not (eq .type 2)}}gt-hidden{{end}}">
<label for="bind_dn">{{.locale.Tr "admin.auths.bind_dn"}}</label> <label for="bind_dn">{{.locale.Tr "admin.auths.bind_dn"}}</label>
<input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="e.g. cn=Search,dc=mydomain,dc=com"> <input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="cn=Search,dc=mydomain,dc=com">
</div> </div>
<div class="ldap field {{if not (eq .type 2)}}gt-hidden{{end}}"> <div class="ldap field {{if not (eq .type 2)}}gt-hidden{{end}}">
<label for="bind_password">{{.locale.Tr "admin.auths.bind_password"}}</label> <label for="bind_password">{{.locale.Tr "admin.auths.bind_password"}}</label>
@ -36,15 +36,15 @@
</div> </div>
<div class="binddnrequired {{if (eq .type 2)}}required{{end}} field"> <div class="binddnrequired {{if (eq .type 2)}}required{{end}} field">
<label for="user_base">{{.locale.Tr "admin.auths.user_base"}}</label> <label for="user_base">{{.locale.Tr "admin.auths.user_base"}}</label>
<input id="user_base" name="user_base" value="{{.user_base}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com"> <input id="user_base" name="user_base" value="{{.user_base}}" placeholder="ou=Users,dc=mydomain,dc=com">
</div> </div>
<div class="dldap required field {{if not (eq .type 5)}}gt-hidden{{end}}"> <div class="dldap required field {{if not (eq .type 5)}}gt-hidden{{end}}">
<label for="user_dn">{{.locale.Tr "admin.auths.user_dn"}}</label> <label for="user_dn">{{.locale.Tr "admin.auths.user_dn"}}</label>
<input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com"> <input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com">
</div> </div>
<div class="required field"> <div class="required field">
<label for="filter">{{.locale.Tr "admin.auths.filter"}}</label> <label for="filter">{{.locale.Tr "admin.auths.filter"}}</label>
<input id="filter" name="filter" value="{{.filter}}" placeholder="e.g. (&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))"> <input id="filter" name="filter" value="{{.filter}}" placeholder="(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))">
</div> </div>
<div class="field"> <div class="field">
<label for="admin_filter">{{.locale.Tr "admin.auths.admin_filter"}}</label> <label for="admin_filter">{{.locale.Tr "admin.auths.admin_filter"}}</label>
@ -69,15 +69,15 @@
</div> </div>
<div class="required field"> <div class="required field">
<label for="attribute_mail">{{.locale.Tr "admin.auths.attribute_mail"}}</label> <label for="attribute_mail">{{.locale.Tr "admin.auths.attribute_mail"}}</label>
<input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="e.g. mail"> <input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="mail">
</div> </div>
<div class="field"> <div class="field">
<label for="attribute_ssh_public_key">{{.locale.Tr "admin.auths.attribute_ssh_public_key"}}</label> <label for="attribute_ssh_public_key">{{.locale.Tr "admin.auths.attribute_ssh_public_key"}}</label>
<input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{.attribute_ssh_public_key}}" placeholder="e.g. SshPublicKey"> <input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{.attribute_ssh_public_key}}" placeholder="SshPublicKey">
</div> </div>
<div class="field"> <div class="field">
<label for="attribute_avatar">{{.locale.Tr "admin.auths.attribute_avatar"}}</label> <label for="attribute_avatar">{{.locale.Tr "admin.auths.attribute_avatar"}}</label>
<input id="attribute_avatar" name="attribute_avatar" value="{{.attribute_avatar}}" placeholder="e.g. jpegPhoto"> <input id="attribute_avatar" name="attribute_avatar" value="{{.attribute_avatar}}" placeholder="jpegPhoto">
</div> </div>
<!-- ldap group begin --> <!-- ldap group begin -->
@ -90,23 +90,23 @@
<div id="ldap-group-options" class="ui segment secondary"> <div id="ldap-group-options" class="ui segment secondary">
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.group_search_base"}}</label> <label>{{.locale.Tr "admin.auths.group_search_base"}}</label>
<input name="group_dn" value="{{.group_dn}}" placeholder="e.g. ou=group,dc=mydomain,dc=com"> <input name="group_dn" value="{{.group_dn}}" placeholder="ou=group,dc=mydomain,dc=com">
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.group_attribute_list_users"}}</label> <label>{{.locale.Tr "admin.auths.group_attribute_list_users"}}</label>
<input name="group_member_uid" value="{{.group_member_uid}}" placeholder="e.g. memberUid"> <input name="group_member_uid" value="{{.group_member_uid}}" placeholder="memberUid">
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.user_attribute_in_group"}}</label> <label>{{.locale.Tr "admin.auths.user_attribute_in_group"}}</label>
<input name="user_uid" value="{{.user_uid}}" placeholder="e.g. uid"> <input name="user_uid" value="{{.user_uid}}" placeholder="uid">
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.verify_group_membership"}}</label> <label>{{.locale.Tr "admin.auths.verify_group_membership"}}</label>
<input name="group_filter" value="{{.group_filter}}" placeholder="e.g. (|(cn=gitea_users)(cn=admins))"> <input name="group_filter" value="{{.group_filter}}" placeholder="(|(cn=gitea_users)(cn=admins))">
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.map_group_to_team"}}</label> <label>{{.locale.Tr "admin.auths.map_group_to_team"}}</label>
<textarea name="group_team_map" rows="5" placeholder='e.g. {"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{.group_team_map}}</textarea> <textarea name="group_team_map" rows="5" placeholder='{"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{.group_team_map}}</textarea>
</div> </div>
<div class="ui checkbox"> <div class="ui checkbox">
<label>{{.locale.Tr "admin.auths.map_group_to_team_removal"}}</label> <label>{{.locale.Tr "admin.auths.map_group_to_team_removal"}}</label>

@ -100,7 +100,7 @@
</div> </div>
<div class="field"> <div class="field">
<label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team"}}</label> <label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team"}}</label>
<textarea name="oauth2_group_team_map" rows="5" placeholder='e.g. {"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{.oauth2_group_team_map}}</textarea> <textarea name="oauth2_group_team_map" rows="5" placeholder='{"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{.oauth2_group_team_map}}</textarea>
</div> </div>
<div class="ui checkbox"> <div class="ui checkbox">
<label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team_removal"}}</label> <label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team_removal"}}</label>

@ -23,7 +23,7 @@
<td>{{$q.GetItemTypeName}}</td> <td>{{$q.GetItemTypeName}}</td>
<td>{{$sum := $q.GetWorkerNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td> <td>{{$sum := $q.GetWorkerNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td>
<td>{{$sum = $q.GetQueueItemNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td> <td>{{$sum = $q.GetQueueItemNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td>
<td><a href="{{$.Link}}/{{$qid}}" class="button">{{if lt $sum 0}}{{$.locale.Tr "admin.monitor.queue.review"}}{{else}}{{$.locale.Tr "admin.monitor.queue.review_add"}}{{end}}</a> <td><a href="{{$.Link}}/{{$qid}}" class="button">{{if lt $sum 0}}{{$.locale.Tr "admin.monitor.queue.review"}}{{else}}{{$.locale.Tr "admin.monitor.queue.review_add"}}{{end}}</a></td>
</tr> </tr>
{{end}} {{end}}
</tbody> </tbody>

@ -44,7 +44,7 @@
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<p>{{.locale.Tr "admin.monitor.queue.settings.desc"}}</p> <p>{{.locale.Tr "admin.monitor.queue.settings.desc"}}</p>
<form method="POST" action="{{.Link}}/set"> <form method="post" action="{{.Link}}/set">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<div class="ui form"> <div class="ui form">
<div class="inline field"> <div class="inline field">

@ -31,7 +31,7 @@
<div class="content"> <div class="content">
<p>{{$.locale.Tr "repo.adopt_preexisting_content" $dir}}</p> <p>{{$.locale.Tr "repo.adopt_preexisting_content" $dir}}</p>
</div> </div>
<form class="ui form" method="POST" action="{{AppSubUrl}}/admin/repos/unadopted"> <form class="ui form" method="post" action="{{AppSubUrl}}/admin/repos/unadopted">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="id" value="{{$dir}}"> <input type="hidden" name="id" value="{{$dir}}">
<input type="hidden" name="action" value="adopt"> <input type="hidden" name="action" value="adopt">
@ -48,7 +48,7 @@
<div class="content"> <div class="content">
<p>{{$.locale.Tr "repo.delete_preexisting_content" $dir}}</p> <p>{{$.locale.Tr "repo.delete_preexisting_content" $dir}}</p>
</div> </div>
<form class="ui form" method="POST" action="{{AppSubUrl}}/admin/repos/unadopted"> <form class="ui form" method="post" action="{{AppSubUrl}}/admin/repos/unadopted">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="id" value="{{$dir}}"> <input type="hidden" name="id" value="{{$dir}}">
<input type="hidden" name="action" value="delete"> <input type="hidden" name="action" value="delete">

@ -72,7 +72,7 @@
</div> </div>
<div class="field {{if .Err_Website}}error{{end}}"> <div class="field {{if .Err_Website}}error{{end}}">
<label for="website">{{.locale.Tr "settings.website"}}</label> <label for="website">{{.locale.Tr "settings.website"}}</label>
<input id="website" name="website" type="url" value="{{.User.Website}}" placeholder="e.g. http://mydomain.com or https://mydomain.com" maxlength="255"> <input id="website" name="website" type="url" value="{{.User.Website}}" placeholder="http://mydomain.com or https://mydomain.com" maxlength="255">
</div> </div>
<div class="field {{if .Err_Location}}error{{end}}"> <div class="field {{if .Err_Location}}error{{end}}">
<label for="location">{{.locale.Tr "settings.location"}}</label> <label for="location">{{.locale.Tr "settings.location"}}</label>
@ -197,7 +197,7 @@
{{svg "octicon-trash"}} {{svg "octicon-trash"}}
{{.locale.Tr "settings.delete_account_title"}} {{.locale.Tr "settings.delete_account_title"}}
</div> </div>
<form class="ui form" method="POST" action="{{.Link}}/delete"> <form class="ui form" method="post" action="{{.Link}}/delete">
<div class="content"> <div class="content">
<p>{{.locale.Tr "settings.delete_account_desc"}}</p> <p>{{.locale.Tr "settings.delete_account_desc"}}</p>
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}

@ -91,7 +91,7 @@
{{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}} {{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}}
</span> </span>
</a> </a>
<form class="stopwatch-commit" method="POST" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle"> <form class="stopwatch-commit" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<button <button
type="submit" type="submit"
@ -99,7 +99,7 @@
data-tooltip-content="{{.locale.Tr "repo.issues.stop_tracking"}}" data-tooltip-content="{{.locale.Tr "repo.issues.stop_tracking"}}"
>{{svg "octicon-square-fill"}}</button> >{{svg "octicon-square-fill"}}</button>
</form> </form>
<form class="stopwatch-cancel" method="POST" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel"> <form class="stopwatch-cancel" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<button <button
type="submit" type="submit"

@ -139,7 +139,7 @@
</div> </div>
<div class="inline required field"> <div class="inline required field">
<label for="domain">{{.locale.Tr "install.domain"}}</label> <label for="domain">{{.locale.Tr "install.domain"}}</label>
<input id="domain" name="domain" value="{{.domain}}" placeholder="e.g. try.gitea.io" required> <input id="domain" name="domain" value="{{.domain}}" placeholder="try.gitea.io" required>
<span class="help">{{.locale.Tr "install.domain_helper"}}</span> <span class="help">{{.locale.Tr "install.domain_helper"}}</span>
</div> </div>
<div class="inline field"> <div class="inline field">
@ -154,7 +154,7 @@
</div> </div>
<div class="inline required field"> <div class="inline required field">
<label for="app_url">{{.locale.Tr "install.app_url"}}</label> <label for="app_url">{{.locale.Tr "install.app_url"}}</label>
<input id="app_url" name="app_url" value="{{.app_url}}" placeholder="e.g. https://try.gitea.io" required> <input id="app_url" name="app_url" value="{{.app_url}}" placeholder="https://try.gitea.io" required>
<span class="help">{{.locale.Tr "install.app_url_helper"}}</span> <span class="help">{{.locale.Tr "install.app_url_helper"}}</span>
</div> </div>
<div class="inline required field"> <div class="inline required field">

@ -9,6 +9,7 @@
<body> <body>
<p>{{.Subject}}. <p>{{.Subject}}.
{{.locale.Tr "mail.repo.transfer.body" $url | Str2html}} {{.locale.Tr "mail.repo.transfer.body" $url | Str2html}}
</p>
<p> <p>
--- ---
<br> <br>

@ -34,12 +34,12 @@
<h3>{{.locale.Tr "org.team_access_desc"}}</h3> <h3>{{.locale.Tr "org.team_access_desc"}}</h3>
<ul> <ul>
{{if .Team.IncludesAllRepositories}} {{if .Team.IncludesAllRepositories}}
<li>{{.locale.Tr "org.teams.all_repositories" | Str2html}} <li>{{.locale.Tr "org.teams.all_repositories" | Str2html}}</li>
{{else}} {{else}}
<li>{{.locale.Tr "org.teams.specific_repositories" | Str2html}} <li>{{.locale.Tr "org.teams.specific_repositories" | Str2html}}</li>
{{end}} {{end}}
{{if .Team.CanCreateOrgRepo}} {{if .Team.CanCreateOrgRepo}}
<li>{{.locale.Tr "org.teams.can_create_org_repo"}} <li>{{.locale.Tr "org.teams.can_create_org_repo"}}</li>
{{end}} {{end}}
</ul> </ul>
{{if (eq .Team.AccessMode 2)}} {{if (eq .Team.AccessMode 2)}}

@ -56,7 +56,7 @@
{{end}} {{end}}
</td> </td>
{{end}} {{end}}
<td rel="L{{$row.RowNumber}}" rel="L{{$row.RowNumber}}" class="lines-code blame-code chroma"> <td rel="L{{$row.RowNumber}}" class="lines-code blame-code chroma">
<code class="code-inner gt-pl-3">{{$row.Code}}</code> <code class="code-inner gt-pl-3">{{$row.Code}}</code>
</td> </td>
</tr> </tr>

@ -70,7 +70,7 @@
"branchForm" "branch-dropdown-form" "branchForm" "branch-dropdown-form"
"branchURLPrefix" (printf "%s/_cherrypick/%s/" $.RepoLink .CommitID) "branchURLSuffix" "" "branchURLPrefix" (printf "%s/_cherrypick/%s/" $.RepoLink .CommitID) "branchURLSuffix" ""
"setAction" true "submitForm" true}} "setAction" true "submitForm" true}}
<form method="GET" action="{{$.RepoLink}}/_cherrypick/{{.CommitID}}/{{if $.BranchName}}{{PathEscapeSegments $.BranchName}}{{else}}{{PathEscapeSegments $.Repository.DefaultBranch}}{{end}}" id="branch-dropdown-form"> <form method="get" action="{{$.RepoLink}}/_cherrypick/{{.CommitID}}/{{if $.BranchName}}{{PathEscapeSegments $.BranchName}}{{else}}{{PathEscapeSegments $.Repository.DefaultBranch}}{{end}}" id="branch-dropdown-form">
<input type="hidden" name="ref" value="{{if $.BranchName}}{{$.BranchName}}{{else}}{{$.Repository.DefaultBranch}}{{end}}"> <input type="hidden" name="ref" value="{{if $.BranchName}}{{$.BranchName}}{{else}}{{$.Repository.DefaultBranch}}{{end}}">
<input type="hidden" name="refType" value="branch"> <input type="hidden" name="refType" value="branch">
<input type="hidden" id="cherry-pick-type" name="cherry-pick-type"><br> <input type="hidden" id="cherry-pick-type" name="cherry-pick-type"><br>

@ -52,7 +52,9 @@
{{if .Signature}} {{if .Signature}}
{{template "repo/shabox_badge" dict "root" $ "verification" .Verification}} {{template "repo/shabox_badge" dict "root" $ "verification" .Verification}}
{{end}} {{end}}
{{if $.Reponame}} {{if $.PageIsWiki}}
</a>
{{else if $.Reponame}}
</a> </a>
{{else}} {{else}}
</span> </span>

@ -1,6 +1 @@
<code {{if .diff.EscapeStatus.Escaped}}{{/* <code class="code-inner{{if .diff.EscapeStatus.Escaped}} has-escaped{{end}}"{{if .diff.EscapeStatus.Escaped}} title="{{template "repo/diff/escape_title" .}}"{{end}}>{{.diff.Content}}</code>
*/}}class="code-inner has-escaped" {{/*
*/}}title="{{template "repo/diff/escape_title" .}}"{{/*
*/}}{{else}}{{/*
*/}}class="code-inner"{{/*
*/}}{{end}}>{{.diff.Content}}</code>

@ -43,7 +43,7 @@
{{- $leftDiff := ""}}{{if $line.LeftIdx}}{{$leftDiff = $section.GetComputedInlineDiffFor $line $.root.locale}}{{end}} {{- $leftDiff := ""}}{{if $line.LeftIdx}}{{$leftDiff = $section.GetComputedInlineDiffFor $line $.root.locale}}{{end}}
{{- $rightDiff := ""}}{{if $match.RightIdx}}{{$rightDiff = $section.GetComputedInlineDiffFor $match $.root.locale}}{{end}} {{- $rightDiff := ""}}{{if $match.RightIdx}}{{$rightDiff = $section.GetComputedInlineDiffFor $match $.root.locale}}{{end}}
<td class="lines-num lines-num-old del-code" data-line-num="{{$line.LeftIdx}}"><span rel="diff-{{$file.NameHash}}L{{$line.LeftIdx}}"></span></td> <td class="lines-num lines-num-old del-code" data-line-num="{{$line.LeftIdx}}"><span rel="diff-{{$file.NameHash}}L{{$line.LeftIdx}}"></span></td>
<td class="lines-escape del-code lines-escape-old">{{if $line.LeftIdx}}{{if $leftDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $leftDiff "locale" $.root.locale}}"></a>{{end}}{{end}}</td> <td class="lines-escape del-code lines-escape-old">{{if $line.LeftIdx}}{{if $leftDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $leftDiff "locale" $.root.locale}}"></button>{{end}}{{end}}</td>
<td class="lines-type-marker lines-type-marker-old del-code"><span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td> <td class="lines-type-marker lines-type-marker-old del-code"><span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td>
<td class="lines-code lines-code-old del-code">{{/* <td class="lines-code lines-code-old del-code">{{/*
*/}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/* */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/*

@ -12,7 +12,7 @@
<label class="gt-pointer-events-none"> <label class="gt-pointer-events-none">
<input class="gt-mr-3 gt-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "ignore-all"}} checked{{end}}> <input class="gt-mr-3 gt-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "ignore-all"}} checked{{end}}>
{{.locale.Tr "repo.diff.whitespace_ignore_all_whitespace"}} {{.locale.Tr "repo.diff.whitespace_ignore_all_whitespace"}}
<label> </label>
</a> </a>
<a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=ignore-change"> <a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=ignore-change">
<label class="gt-pointer-events-none"> <label class="gt-pointer-events-none">

@ -11,7 +11,7 @@
<div class="repo-editor-header"> <div class="repo-editor-header">
<div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}"> <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
{{$shaurl := printf "%s/commit/%s" $.RepoLink (PathEscape .SHA)}} {{$shaurl := printf "%s/commit/%s" $.RepoLink (PathEscape .SHA)}}
{{$shalink := printf "<a class=\"ui primary sha label\" href=\"%s\">%s</a>" (Escape $shaurl) (ShortSha .SHA)}} {{$shalink := printf `<a class="ui primary sha label" href="%s">%s</a>` (Escape $shaurl) (ShortSha .SHA)}}
{{if eq .CherryPickType "revert"}} {{if eq .CherryPickType "revert"}}
{{.locale.Tr "repo.editor.revert" $shalink | Str2html}} {{.locale.Tr "repo.editor.revert" $shalink | Str2html}}
{{else}} {{else}}

@ -169,7 +169,7 @@
{{if .Permission.CanRead $.UnitTypeExternalTracker}} {{if .Permission.CanRead $.UnitTypeExternalTracker}}
<a class="{{if .PageIsIssueList}}active {{end}}item" href="{{.RepoExternalIssuesLink}}" target="_blank" rel="noopener noreferrer"> <a class="{{if .PageIsIssueList}}active {{end}}item" href="{{.RepoExternalIssuesLink}}" target="_blank" rel="noopener noreferrer">
{{svg "octicon-link-external"}} {{.locale.Tr "repo.issues"}} </span> {{svg "octicon-link-external"}} {{.locale.Tr "repo.issues"}}
</a> </a>
{{end}} {{end}}

@ -1,7 +1,7 @@
{{if and (not .Issue.IsPull) (not .PageIsComparePull)}} {{if and (not .Issue.IsPull) (not .PageIsComparePull)}}
<input id="ref_selector" name="ref" type="hidden" value="{{.Reference}}"> <input id="ref_selector" name="ref" type="hidden" value="{{.Reference}}">
<input id="editing_mode" name="edit_mode" type="hidden" value="{{(or .IsIssueWriter .HasIssuesOrPullsWritePermission)}}"> <input id="editing_mode" name="edit_mode" type="hidden" value="{{(or .IsIssueWriter .HasIssuesOrPullsWritePermission)}}">
<form method="POST" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/ref" id="update_issueref_form"> <form method="post" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/ref" id="update_issueref_form">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
</form> </form>

@ -50,7 +50,7 @@
<div class="ui warning message"> <div class="ui warning message">
<div class="text left"> <div class="text left">
<div>{{.locale.Tr "repo.issues.choose.invalid_config"}}</div> <div>{{.locale.Tr "repo.issues.choose.invalid_config"}}</div>
<diy>{{.IssueConfigError}}</div> <div>{{.IssueConfigError}}</div>
</div> </div>
</div> </div>
{{end}} {{end}}

@ -19,7 +19,6 @@
</div> </div>
{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}} {{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}
{{template "repo/issue/labels/edit_delete_label" .}} {{template "repo/issue/labels/edit_delete_label" .}}
{{end}} {{end}}
</div>
{{template "base/footer" .}} {{template "base/footer" .}}

@ -3,7 +3,7 @@
{{if (or .ctxData.IsAdmin (and .ctxData.IsSigned (eq .ctxData.SignedUserID .comment.PosterID)))}} {{if (or .ctxData.IsAdmin (and .ctxData.IsSigned (eq .ctxData.SignedUserID .comment.PosterID)))}}
<span class="ui float right"> <span class="ui float right">
<div class="ui mini modal issue-delete-time-modal" data-id="{{.comment.Time.ID}}"> <div class="ui mini modal issue-delete-time-modal" data-id="{{.comment.Time.ID}}">
<form method="POST" class="delete-time-form" action="{{.ctxData.RepoLink}}/issues/{{.ctxData.Issue.Index}}/times/{{.comment.TimeID}}/delete"> <form method="post" class="delete-time-form" action="{{.ctxData.RepoLink}}/issues/{{.ctxData.Issue.Index}}/times/{{.comment.TimeID}}/delete">
{{.ctxData.CsrfTokenHtml}} {{.ctxData.CsrfTokenHtml}}
</form> </form>
<div class="header">{{.ctxData.locale.Tr "repo.issues.del_time"}}</div> <div class="header">{{.ctxData.locale.Tr "repo.issues.del_time"}}</div>

@ -270,7 +270,7 @@
<div class="ui watching"> <div class="ui watching">
<span class="text"><strong>{{.locale.Tr "notification.notifications"}}</strong></span> <span class="text"><strong>{{.locale.Tr "notification.notifications"}}</strong></span>
<div class="gt-mt-3"> <div class="gt-mt-3">
<form method="POST" action="{{.Issue.Link}}/watch"> <form method="post" action="{{.Issue.Link}}/watch">
<input type="hidden" name="watch" value="{{if $.IssueWatch.IsWatching}}0{{else}}1{{end}}"> <input type="hidden" name="watch" value="{{if $.IssueWatch.IsWatching}}0{{else}}1{{end}}">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<button class="fluid ui button"> <button class="fluid ui button">
@ -292,10 +292,10 @@
<div class="ui timetrack"> <div class="ui timetrack">
<span class="text"><strong>{{.locale.Tr "repo.issues.tracker"}}</strong></span> <span class="text"><strong>{{.locale.Tr "repo.issues.tracker"}}</strong></span>
<div class="gt-mt-3"> <div class="gt-mt-3">
<form method="POST" action="{{.Issue.Link}}/times/stopwatch/toggle" id="toggle_stopwatch_form"> <form method="post" action="{{.Issue.Link}}/times/stopwatch/toggle" id="toggle_stopwatch_form">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
</form> </form>
<form method="POST" action="{{.Issue.Link}}/times/stopwatch/cancel" id="cancel_stopwatch_form"> <form method="post" action="{{.Issue.Link}}/times/stopwatch/cancel" id="cancel_stopwatch_form">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
</form> </form>
{{if $.IsStopwatchRunning}} {{if $.IsStopwatchRunning}}
@ -311,7 +311,7 @@
<div class="ui mini modal issue-start-time-modal"> <div class="ui mini modal issue-start-time-modal">
<div class="header">{{.locale.Tr "repo.issues.add_time"}}</div> <div class="header">{{.locale.Tr "repo.issues.add_time"}}</div>
<div class="content"> <div class="content">
<form method="POST" id="add_time_manual_form" action="{{.Issue.Link}}/times/add" class="ui action input fluid"> <form method="post" id="add_time_manual_form" action="{{.Issue.Link}}/times/add" class="ui action input fluid">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input placeholder='{{.locale.Tr "repo.issues.add_time_hours"}}' type="number" name="hours"> <input placeholder='{{.locale.Tr "repo.issues.add_time_hours"}}' type="number" name="hours">
<input placeholder='{{.locale.Tr "repo.issues.add_time_minutes"}}' type="number" name="minutes" class="ui compact"> <input placeholder='{{.locale.Tr "repo.issues.add_time_minutes"}}' type="number" name="minutes" class="ui compact">
@ -498,7 +498,7 @@
{{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}} {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}}
<div> <div>
<form method="POST" action="{{.Issue.Link}}/dependency/add" id="addDependencyForm"> <form method="post" action="{{.Issue.Link}}/dependency/add" id="addDependencyForm">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<div class="ui fluid action input"> <div class="ui fluid action input">
<div class="ui search selection dropdown" id="new-dependency-drop-list" data-issue-id="{{.Issue.ID}}"> <div class="ui search selection dropdown" id="new-dependency-drop-list" data-issue-id="{{.Issue.ID}}">
@ -525,7 +525,7 @@
{{.locale.Tr "repo.issues.dependency.remove_header"}} {{.locale.Tr "repo.issues.dependency.remove_header"}}
</div> </div>
<div class="content"> <div class="content">
<form method="POST" action="{{.Issue.Link}}/dependency/delete" id="removeDependencyForm"> <form method="post" action="{{.Issue.Link}}/dependency/delete" id="removeDependencyForm">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" value="" name="removeDependencyID" id="removeDependencyID"> <input type="hidden" value="" name="removeDependencyID" id="removeDependencyID">
<input type="hidden" value="" name="dependencyType" id="dependencyType"> <input type="hidden" value="" name="dependencyType" id="dependencyType">
@ -556,7 +556,7 @@
<div class="ui divider"></div> <div class="ui divider"></div>
{{if or .PinEnabled .Issue.IsPinned}} {{if or .PinEnabled .Issue.IsPinned}}
<form class="gt-mt-2" method="POST" {{if $.NewPinAllowed}}action="{{.Issue.Link}}/pin"{{else}}data-tooltip-content="{{.locale.Tr "repo.issues.max_pinned"}}"{{end}}> <form class="gt-mt-2" method="post" {{if $.NewPinAllowed}}action="{{.Issue.Link}}/pin"{{else}}data-tooltip-content="{{.locale.Tr "repo.issues.max_pinned"}}"{{end}}>
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<button class="fluid ui button {{if not $.NewPinAllowed}}disabled{{end}}"> <button class="fluid ui button {{if not $.NewPinAllowed}}disabled{{end}}">
{{if not .Issue.IsPinned}} {{if not .Issue.IsPinned}}

@ -5,7 +5,7 @@
<a href="{{.LFSFilesLink}}">{{.locale.Tr "repo.settings.lfs"}}</a> / {{.locale.Tr "repo.settings.lfs_locks"}} ({{.locale.Tr "admin.total" .Total}}) <a href="{{.LFSFilesLink}}">{{.locale.Tr "repo.settings.lfs"}}</a> / {{.locale.Tr "repo.settings.lfs_locks"}} ({{.locale.Tr "admin.total" .Total}})
</h4> </h4>
<div class="ui attached segment"> <div class="ui attached segment">
<form class="ui form ignore-dirty" method="POST"> <form class="ui form ignore-dirty" method="post">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<div class="ui fluid action input"> <div class="ui fluid action input">
<input name="path" value="" placeholder="{{.locale.Tr "repo.settings.lfs_lock_path"}}" autofocus> <input name="path" value="" placeholder="{{.locale.Tr "repo.settings.lfs_lock_path"}}" autofocus>
@ -37,7 +37,7 @@
</td> </td>
<td>{{TimeSince .Created $.locale}}</td> <td>{{TimeSince .Created $.locale}}</td>
<td class="right aligned"> <td class="right aligned">
<form action="{{$.LFSFilesLink}}/locks/{{$lock.ID}}/unlock" method="POST"> <form action="{{$.LFSFilesLink}}/locks/{{$lock.ID}}/unlock" method="post">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<button class="ui primary button"><span class="btn-octicon">{{svg "octicon-lock"}}</span>{{$.locale.Tr "repo.settings.lfs_force_unlock"}}</button> <button class="ui primary button"><span class="btn-octicon">{{svg "octicon-lock"}}</span>{{$.locale.Tr "repo.settings.lfs_force_unlock"}}</button>
</form> </form>

@ -285,47 +285,35 @@
<input type="hidden" name="action" value="advanced"> <input type="hidden" name="action" value="advanced">
{{$isCodeEnabled := .Repository.UnitEnabled $.Context $.UnitTypeCode}} {{$isCodeEnabled := .Repository.UnitEnabled $.Context $.UnitTypeCode}}
{{$isCodeGlobalDisabled := .UnitTypeCode.UnitGlobalDisabled}}
<div class="inline field"> <div class="inline field">
<label>{{.locale.Tr "repo.code"}}</label> <label>{{.locale.Tr "repo.code"}}</label>
{{if .UnitTypeCode.UnitGlobalDisabled}} <div class="ui checkbox{{if $isCodeGlobalDisabled}} disabled{{end}}"{{if $isCodeGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}>
<div class="ui checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}">
{{else}}
<div class="ui checkbox">
{{end}}
<input class="enable-system" name="enable_code" type="checkbox"{{if $isCodeEnabled}} checked{{end}}> <input class="enable-system" name="enable_code" type="checkbox"{{if $isCodeEnabled}} checked{{end}}>
<label>{{.locale.Tr "repo.code.desc"}}</label> <label>{{.locale.Tr "repo.code.desc"}}</label>
</div> </div>
</div> </div>
{{$isWikiEnabled := or (.Repository.UnitEnabled $.Context $.UnitTypeWiki) (.Repository.UnitEnabled $.Context $.UnitTypeExternalWiki)}} {{$isWikiEnabled := or (.Repository.UnitEnabled $.Context $.UnitTypeWiki) (.Repository.UnitEnabled $.Context $.UnitTypeExternalWiki)}}
{{$isWikiGlobalDisabled := .UnitTypeWiki.UnitGlobalDisabled}}
{{$isExternalWikiGlobalDisabled := .UnitTypeExternalWiki.UnitGlobalDisabled}}
{{$isBothWikiGlobalDisabled := and $isWikiGlobalDisabled $isBothWikiGlobalDisabled}}
<div class="inline field"> <div class="inline field">
<label>{{.locale.Tr "repo.wiki"}}</label> <label>{{.locale.Tr "repo.wiki"}}</label>
{{if and (.UnitTypeWiki.UnitGlobalDisabled) (.UnitTypeExternalWiki.UnitGlobalDisabled)}} <div class="ui checkbox{{if $isBothWikiGlobalDisabled}} disabled{{end}}"{{if $isBothWikiGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}>
<div class="ui checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}">
{{else}}
<div class="ui checkbox">
{{end}}
<input class="enable-system" name="enable_wiki" type="checkbox" data-target="#wiki_box" {{if $isWikiEnabled}}checked{{end}}> <input class="enable-system" name="enable_wiki" type="checkbox" data-target="#wiki_box" {{if $isWikiEnabled}}checked{{end}}>
<label>{{.locale.Tr "repo.settings.wiki_desc"}}</label> <label>{{.locale.Tr "repo.settings.wiki_desc"}}</label>
</div> </div>
</div> </div>
<div class="field {{if not $isWikiEnabled}}disabled{{end}}" id="wiki_box"> <div class="field{{if not $isWikiEnabled}} disabled{{end}}" id="wiki_box">
<div class="field"> <div class="field">
{{if .UnitTypeWiki.UnitGlobalDisabled}} <div class="ui radio checkbox{{if $isWikiGlobalDisabled}} disabled{{end}}"{{if $isWikiGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}>
<div class="ui radio checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}">
{{else}}
<div class="ui radio checkbox">
{{end}}
<input class="enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="false" data-target="#external_wiki_box" {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalWiki)}}checked{{end}}> <input class="enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="false" data-target="#external_wiki_box" {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalWiki)}}checked{{end}}>
<label>{{.locale.Tr "repo.settings.use_internal_wiki"}}</label> <label>{{.locale.Tr "repo.settings.use_internal_wiki"}}</label>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
{{if .UnitTypeExternalWiki.UnitGlobalDisabled}} <div class="ui radio checkbox{{if $isExternalWikiGlobalDisabled}} disabled{{end}}"{{if $isExternalWikiGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}>
<div class="ui radio checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}">
{{else}}
<div class="ui radio checkbox">
{{end}}
<input class="enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="true" data-target="#external_wiki_box" {{if .Repository.UnitEnabled $.Context $.UnitTypeExternalWiki}}checked{{end}}> <input class="enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="true" data-target="#external_wiki_box" {{if .Repository.UnitEnabled $.Context $.UnitTypeExternalWiki}}checked{{end}}>
<label>{{.locale.Tr "repo.settings.use_external_wiki"}}</label> <label>{{.locale.Tr "repo.settings.use_external_wiki"}}</label>
</div> </div>
@ -340,24 +328,19 @@
<div class="ui divider"></div> <div class="ui divider"></div>
{{$isIssuesEnabled := or (.Repository.UnitEnabled $.Context $.UnitTypeIssues) (.Repository.UnitEnabled $.Context $.UnitTypeExternalTracker)}} {{$isIssuesEnabled := or (.Repository.UnitEnabled $.Context $.UnitTypeIssues) (.Repository.UnitEnabled $.Context $.UnitTypeExternalTracker)}}
{{$isIssuesGlobalDisabled := .UnitTypeIssues.UnitGlobalDisabled}}
{{$isExternalTrackerGlobalDisabled := .UnitTypeExternalTracker.UnitGlobalDisabled}}
{{$isIssuesAndExternalGlobalDisabled := and $isIssuesGlobalDisabled $isExternalTrackerGlobalDisabled}}
<div class="inline field"> <div class="inline field">
<label>{{.locale.Tr "repo.issues"}}</label> <label>{{.locale.Tr "repo.issues"}}</label>
{{if and (.UnitTypeIssues.UnitGlobalDisabled) (.UnitTypeExternalTracker.UnitGlobalDisabled)}} <div class="ui checkbox{{if $isIssuesAndExternalGlobalDisabled}} disabled{{end}}"{{if $isIssuesAndExternalGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}>
<div class="ui checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}">
{{else}}
<div class="ui checkbox">
{{end}}
<input class="enable-system" name="enable_issues" type="checkbox" data-target="#issue_box" {{if $isIssuesEnabled}}checked{{end}}> <input class="enable-system" name="enable_issues" type="checkbox" data-target="#issue_box" {{if $isIssuesEnabled}}checked{{end}}>
<label>{{.locale.Tr "repo.settings.issues_desc"}}</label> <label>{{.locale.Tr "repo.settings.issues_desc"}}</label>
</div> </div>
</div> </div>
<div class="field {{if not $isIssuesEnabled}}disabled{{end}}" id="issue_box"> <div class="field {{if not $isIssuesEnabled}}disabled{{end}}" id="issue_box">
<div class="field"> <div class="field">
{{if .UnitTypeIssues.UnitGlobalDisabled}} <div class="ui radio checkbox{{if $isIssuesGlobalDisabled}} disabled{{end}}"{{if $isIssuesGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}>
<div class="ui radio checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}">
{{else}}
<div class="ui radio checkbox">
{{end}}
<input class="enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="false" data-context="#internal_issue_box" data-target="#external_issue_box" {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalTracker)}}checked{{end}}> <input class="enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="false" data-context="#internal_issue_box" data-target="#external_issue_box" {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalTracker)}}checked{{end}}>
<label>{{.locale.Tr "repo.settings.use_internal_issue_tracker"}}</label> <label>{{.locale.Tr "repo.settings.use_internal_issue_tracker"}}</label>
</div> </div>
@ -389,11 +372,7 @@
</div> </div>
</div> </div>
<div class="field"> <div class="field">
{{if .UnitTypeExternalTracker.UnitGlobalDisabled}} <div class="ui radio checkbox{{if $isExternalTrackerGlobalDisabled}} disabled{{end}}"{{if $isExternalTrackerGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}>
<div class="ui radio checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}">
{{else}}
<div class="ui radio checkbox">
{{end}}
<input class="enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="true" data-context="#internal_issue_box" data-target="#external_issue_box" {{if .Repository.UnitEnabled $.Context $.UnitTypeExternalTracker}}checked{{end}}> <input class="enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="true" data-context="#internal_issue_box" data-target="#external_issue_box" {{if .Repository.UnitEnabled $.Context $.UnitTypeExternalTracker}}checked{{end}}>
<label>{{.locale.Tr "repo.settings.use_external_issue_tracker"}}</label> <label>{{.locale.Tr "repo.settings.use_external_issue_tracker"}}</label>
</div> </div>
@ -406,7 +385,7 @@
</div> </div>
<div class="field"> <div class="field">
<label for="tracker_url_format">{{.locale.Tr "repo.settings.tracker_url_format"}}</label> <label for="tracker_url_format">{{.locale.Tr "repo.settings.tracker_url_format"}}</label>
<input id="tracker_url_format" name="tracker_url_format" type="url" value="{{(.Repository.MustGetUnit $.Context $.UnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerFormat}}" placeholder="e.g. https://github.com/{user}/{repo}/issues/{index}"> <input id="tracker_url_format" name="tracker_url_format" type="url" value="{{(.Repository.MustGetUnit $.Context $.UnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerFormat}}" placeholder="https://github.com/{user}/{repo}/issues/{index}">
<p class="help">{{.locale.Tr "repo.settings.tracker_url_format_desc" | Str2html}}</p> <p class="help">{{.locale.Tr "repo.settings.tracker_url_format_desc" | Str2html}}</p>
</div> </div>
<div class="inline fields"> <div class="inline fields">
@ -443,39 +422,30 @@
<div class="ui divider"></div> <div class="ui divider"></div>
{{$isProjectsEnabled := .Repository.UnitEnabled $.Context $.UnitTypeProjects}} {{$isProjectsEnabled := .Repository.UnitEnabled $.Context $.UnitTypeProjects}}
{{$isProjectsGlobalDisabled := .UnitTypeProjects.UnitGlobalDisabled}}
<div class="inline field"> <div class="inline field">
<label>{{.locale.Tr "repo.project_board"}}</label> <label>{{.locale.Tr "repo.project_board"}}</label>
{{if .UnitTypeProjects.UnitGlobalDisabled}} <div class="ui checkbox{{if $isProjectsGlobalDisabled}} disabled{{end}}"{{if $isProjectsGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}>
<div class="ui checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}">
{{else}}
<div class="ui checkbox">
{{end}}
<input class="enable-system" name="enable_projects" type="checkbox" {{if $isProjectsEnabled}}checked{{end}}> <input class="enable-system" name="enable_projects" type="checkbox" {{if $isProjectsEnabled}}checked{{end}}>
<label>{{.locale.Tr "repo.settings.projects_desc"}}</label> <label>{{.locale.Tr "repo.settings.projects_desc"}}</label>
</div> </div>
</div> </div>
{{$isReleasesEnabled := .Repository.UnitEnabled $.Context $.UnitTypeReleases}} {{$isReleasesEnabled := .Repository.UnitEnabled $.Context $.UnitTypeReleases}}
{{$isReleasesGlobalDisabled := .UnitTypeReleases.UnitGlobalDisabled}}
<div class="inline field"> <div class="inline field">
<label>{{.locale.Tr "repo.releases"}}</label> <label>{{.locale.Tr "repo.releases"}}</label>
{{if .UnitTypeReleases.UnitGlobalDisabled}} <div class="ui checkbox{{if $isReleasesGlobalDisabled}} disabled{{end}}"{{if $isReleasesGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}>
<div class="ui checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}">
{{else}}
<div class="ui checkbox">
{{end}}
<input class="enable-system" name="enable_releases" type="checkbox" {{if $isReleasesEnabled}}checked{{end}}> <input class="enable-system" name="enable_releases" type="checkbox" {{if $isReleasesEnabled}}checked{{end}}>
<label>{{.locale.Tr "repo.settings.releases_desc"}}</label> <label>{{.locale.Tr "repo.settings.releases_desc"}}</label>
</div> </div>
</div> </div>
{{$isPackagesEnabled := .Repository.UnitEnabled $.Context $.UnitTypePackages}} {{$isPackagesEnabled := .Repository.UnitEnabled $.Context $.UnitTypePackages}}
{{$isPackagesGlobalDisabled := .UnitTypePackages.UnitGlobalDisabled}}
<div class="inline field"> <div class="inline field">
<label>{{.locale.Tr "repo.packages"}}</label> <label>{{.locale.Tr "repo.packages"}}</label>
{{if .UnitTypePackages.UnitGlobalDisabled}} <div class="ui checkbox{{if $isPackagesGlobalDisabled}} disabled{{end}}"{{if $isPackagesGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}>
<div class="ui checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}">
{{else}}
<div class="ui checkbox">
{{end}}
<input class="enable-system" name="enable_packages" type="checkbox" {{if $isPackagesEnabled}}checked{{end}}> <input class="enable-system" name="enable_packages" type="checkbox" {{if $isPackagesEnabled}}checked{{end}}>
<label>{{.locale.Tr "repo.settings.packages_desc"}}</label> <label>{{.locale.Tr "repo.settings.packages_desc"}}</label>
</div> </div>
@ -483,13 +453,10 @@
{{if .EnableActions}} {{if .EnableActions}}
{{$isActionsEnabled := .Repository.UnitEnabled $.Context $.UnitTypeActions}} {{$isActionsEnabled := .Repository.UnitEnabled $.Context $.UnitTypeActions}}
{{$isActionsGlobalDisabled := .UnitTypeActions.UnitGlobalDisabled}}
<div class="inline field"> <div class="inline field">
<label>{{.locale.Tr "actions.actions"}}</label> <label>{{.locale.Tr "actions.actions"}}</label>
{{if .UnitTypeActions.UnitGlobalDisabled}} <div class="ui checkbox{{if $isActionsGlobalDisabled}} disabled{{end}}"{{if $isActionsGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}>
<div class="ui checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}">
{{else}}
<div class="ui checkbox">
{{end}}
<input class="enable-system" name="enable_actions" type="checkbox" {{if $isActionsEnabled}}checked{{end}}> <input class="enable-system" name="enable_actions" type="checkbox" {{if $isActionsEnabled}}checked{{end}}>
<label>{{.locale.Tr "repo.settings.actions_desc"}}</label> <label>{{.locale.Tr "repo.settings.actions_desc"}}</label>
</div> </div>
@ -499,14 +466,11 @@
{{if not .IsMirror}} {{if not .IsMirror}}
<div class="ui divider"></div> <div class="ui divider"></div>
{{$pullRequestEnabled := .Repository.UnitEnabled $.Context $.UnitTypePullRequests}} {{$pullRequestEnabled := .Repository.UnitEnabled $.Context $.UnitTypePullRequests}}
{{$pullRequestGlobalDisabled := .UnitTypePullRequests.UnitGlobalDisabled}}
{{$prUnit := .Repository.MustGetUnit $.Context $.UnitTypePullRequests}} {{$prUnit := .Repository.MustGetUnit $.Context $.UnitTypePullRequests}}
<div class="inline field"> <div class="inline field">
<label>{{.locale.Tr "repo.pulls"}}</label> <label>{{.locale.Tr "repo.pulls"}}</label>
{{if .UnitTypePullRequests.UnitGlobalDisabled}} <div class="ui checkbox{{if $pullRequestGlobalDisabled}} disabled{{end}}"{{if $pullRequestGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}>
<div class="ui checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}">
{{else}}
<div class="ui checkbox">
{{end}}
<input class="enable-system" name="enable_pulls" type="checkbox" data-target="#pull_box" {{if $pullRequestEnabled}}checked{{end}}> <input class="enable-system" name="enable_pulls" type="checkbox" data-target="#pull_box" {{if $pullRequestEnabled}}checked{{end}}>
<label>{{.locale.Tr "repo.settings.pulls_desc"}}</label> <label>{{.locale.Tr "repo.settings.pulls_desc"}}</label>
</div> </div>

@ -50,7 +50,7 @@
<div class="item truncated-item-container"> <div class="item truncated-item-container">
<span class="text {{if eq .LastStatus 1}}green{{else if eq .LastStatus 2}}red{{else}}grey{{end}} gt-mr-3">{{svg "octicon-dot-fill" 22}}</span> <span class="text {{if eq .LastStatus 1}}green{{else if eq .LastStatus 2}}red{{else}}grey{{end}} gt-mr-3">{{svg "octicon-dot-fill" 22}}</span>
<a class="text truncate gt-f1 gt-mr-3" title="{{.URL}}" href="{{$.BaseLink}}/{{.ID}}">{{.URL}}</a> <a class="text truncate gt-f1 gt-mr-3" title="{{.URL}}" href="{{$.BaseLink}}/{{.ID}}">{{.URL}}</a>
<a class="muted gt-p-3" href="{{$.BaseLink}}/{{.ID}}">{{svg "octicon-pencil"}}</a></span> <a class="muted gt-p-3" href="{{$.BaseLink}}/{{.ID}}">{{svg "octicon-pencil"}}</a>
<a class="delete-button gt-p-3" data-url="{{$.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}}</a> <a class="delete-button gt-p-3" data-url="{{$.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}}</a>
</div> </div>
{{end}} {{end}}

@ -8,11 +8,11 @@
</div> </div>
<div class="field"> <div class="field">
<label for="username">{{.locale.Tr "repo.settings.discord_username"}}</label> <label for="username">{{.locale.Tr "repo.settings.discord_username"}}</label>
<input id="username" name="username" value="{{.DiscordHook.Username}}" placeholder="e.g. Gitea"> <input id="username" name="username" value="{{.DiscordHook.Username}}" placeholder="Gitea">
</div> </div>
<div class="field"> <div class="field">
<label for="icon_url">{{.locale.Tr "repo.settings.discord_icon_url"}}</label> <label for="icon_url">{{.locale.Tr "repo.settings.discord_icon_url"}}</label>
<input id="icon_url" name="icon_url" value="{{.DiscordHook.IconURL}}" placeholder="e.g. https://example.com/assets/img/logo.svg"> <input id="icon_url" name="icon_url" value="{{.DiscordHook.IconURL}}" placeholder="https://example.com/assets/img/logo.svg">
</div> </div>
{{template "repo/settings/webhook/settings" .}} {{template "repo/settings/webhook/settings" .}}
</form> </form>

@ -3,8 +3,7 @@
{{.locale.Tr "repo.settings.recent_deliveries"}} {{.locale.Tr "repo.settings.recent_deliveries"}}
{{if .Permission.IsAdmin}} {{if .Permission.IsAdmin}}
<div class="ui right"> <div class="ui right">
<button class="ui teal tiny button" id="test-delivery" data-tooltip-content= <button class="ui teal tiny button" id="test-delivery" data-tooltip-content="{{.locale.Tr "repo.settings.webhook.test_delivery_desc"}}" data-link="{{.Link}}/test" data-redirect="{{.Link}}">{{.locale.Tr "repo.settings.webhook.test_delivery"}}</button>
"{{.locale.Tr "repo.settings.webhook.test_delivery_desc"}}" data-link="{{.Link}}/test" data-redirect="{{.Link}}">{{.locale.Tr "repo.settings.webhook.test_delivery"}}</button>
</div> </div>
{{end}} {{end}}
</h4> </h4>

@ -4,15 +4,15 @@
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<div class="required field {{if .Err_Username}}error{{end}}"> <div class="required field {{if .Err_Username}}error{{end}}">
<label for="username">{{.locale.Tr "repo.settings.packagist_username"}}</label> <label for="username">{{.locale.Tr "repo.settings.packagist_username"}}</label>
<input id="username" name="username" value="{{.PackagistHook.Username}}" placeholder="e.g. Gitea" autofocus required> <input id="username" name="username" value="{{.PackagistHook.Username}}" placeholder="Gitea" autofocus required>
</div> </div>
<div class="required field {{if .Err_APIToken}}error{{end}}"> <div class="required field {{if .Err_APIToken}}error{{end}}">
<label for="api_token">{{.locale.Tr "repo.settings.packagist_api_token"}}</label> <label for="api_token">{{.locale.Tr "repo.settings.packagist_api_token"}}</label>
<input id="api_token" name="api_token" value="{{.PackagistHook.APIToken}}" placeholder="e.g. X5F_tZ-Wj3c1vqaU2Rky" required> <input id="api_token" name="api_token" value="{{.PackagistHook.APIToken}}" placeholder="X5F_tZ-Wj3c1vqaU2Rky" required>
</div> </div>
<div class="required field {{if .Err_PackageURL}}error{{end}}"> <div class="required field {{if .Err_PackageURL}}error{{end}}">
<label for="package_url">{{.locale.Tr "repo.settings.packagist_package_url"}}</label> <label for="package_url">{{.locale.Tr "repo.settings.packagist_package_url"}}</label>
<input id="package_url" name="package_url" value="{{.PackagistHook.PackageURL}}" placeholder="e.g. https://packagist.org/packages/laravel/framework" required> <input id="package_url" name="package_url" value="{{.PackagistHook.PackageURL}}" placeholder="https://packagist.org/packages/laravel/framework" required>
</div> </div>
{{template "repo/settings/webhook/settings" .}} {{template "repo/settings/webhook/settings" .}}
</form> </form>

@ -8,20 +8,20 @@
</div> </div>
<div class="required field {{if .Err_Channel}}error{{end}}"> <div class="required field {{if .Err_Channel}}error{{end}}">
<label for="channel">{{.locale.Tr "repo.settings.slack_channel"}}</label> <label for="channel">{{.locale.Tr "repo.settings.slack_channel"}}</label>
<input id="channel" name="channel" value="{{.SlackHook.Channel}}" placeholder="e.g. #general" required> <input id="channel" name="channel" value="{{.SlackHook.Channel}}" placeholder="#general" required>
</div> </div>
<div class="field"> <div class="field">
<label for="username">{{.locale.Tr "repo.settings.slack_username"}}</label> <label for="username">{{.locale.Tr "repo.settings.slack_username"}}</label>
<input id="username" name="username" value="{{.SlackHook.Username}}" placeholder="e.g. Gitea"> <input id="username" name="username" value="{{.SlackHook.Username}}" placeholder="Gitea">
</div> </div>
<div class="field"> <div class="field">
<label for="icon_url">{{.locale.Tr "repo.settings.slack_icon_url"}}</label> <label for="icon_url">{{.locale.Tr "repo.settings.slack_icon_url"}}</label>
<input id="icon_url" name="icon_url" value="{{.SlackHook.IconURL}}" placeholder="e.g. https://example.com/img/favicon.png"> <input id="icon_url" name="icon_url" value="{{.SlackHook.IconURL}}" placeholder="https://example.com/img/favicon.png">
</div> </div>
<div class="field"> <div class="field">
<label for="color">{{.locale.Tr "repo.settings.slack_color"}}</label> <label for="color">{{.locale.Tr "repo.settings.slack_color"}}</label>
<input id="color" name="color" value="{{.SlackHook.Color}}" placeholder="e.g. #dd4b39, good, warning, danger"> <input id="color" name="color" value="{{.SlackHook.Color}}" placeholder="#dd4b39, good, warning, danger">
</div> </div>
{{template "repo/settings/webhook/settings" .}} {{template "repo/settings/webhook/settings" .}}
</form> </form>

@ -65,7 +65,7 @@
<td>{{.ID}}</td> <td>{{.ID}}</td>
<td><p data-tooltip-content="{{.Description}}">{{.Name}}</p></td> <td><p data-tooltip-content="{{.Description}}">{{.Name}}</p></td>
<td>{{if .Version}}{{.Version}}{{else}}{{$.locale.Tr "unknown"}}{{end}}</td> <td>{{if .Version}}{{.Version}}{{else}}{{$.locale.Tr "unknown"}}{{end}}</td>
<td><span data-tooltip-content="{{.BelongsToOwnerName}}">{{.BelongsToOwnerType.LocaleString $.locale}}<span></td> <td><span data-tooltip-content="{{.BelongsToOwnerName}}">{{.BelongsToOwnerType.LocaleString $.locale}}</span></td>
<td class="runner-tags"> <td class="runner-tags">
{{range .AgentLabels}}<span class="ui label">{{.}}</span>{{end}} {{range .AgentLabels}}<span class="ui label">{{.}}</span>{{end}}
</td> </td>

@ -5,7 +5,7 @@
<p style="margin-top: 100px"><img src="{{AssetUrlPrefix}}/img/404.png" alt="404"></p> <p style="margin-top: 100px"><img src="{{AssetUrlPrefix}}/img/404.png" alt="404"></p>
<div class="ui divider"></div> <div class="ui divider"></div>
<br> <br>
<p>{{.locale.Tr "error404" | Safe}} <p>{{.locale.Tr "error404" | Safe}}</p>
{{if .ShowFooterVersion}}<p>{{.locale.Tr "admin.config.app_ver"}}: {{AppVer}}</p>{{end}} {{if .ShowFooterVersion}}<p>{{.locale.Tr "admin.config.app_ver"}}: {{AppVer}}</p>{{end}}
</div> </div>
</div> </div>

@ -12,7 +12,7 @@
</a> </a>
</div> </div>
{{if and (eq .Status 1)}} {{if and (eq .Status 1)}}
<form action="{{AppSubUrl}}/notifications/purge" method="POST"> <form action="{{AppSubUrl}}/notifications/purge" method="post">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<div class="{{if not $notificationUnreadCount}}gt-hidden{{end}}"> <div class="{{if not $notificationUnreadCount}}gt-hidden{{end}}">
<button class="ui mini button primary gt-mr-0" title='{{$.locale.Tr "notification.mark_all_as_read"}}'> <button class="ui mini button primary gt-mr-0" title='{{$.locale.Tr "notification.mark_all_as_read"}}'>
@ -70,7 +70,7 @@
</div> </div>
<div class="notifications-buttons gt-ac gt-je gt-gap-2 gt-px-2"> <div class="notifications-buttons gt-ac gt-je gt-gap-2 gt-px-2">
{{if ne .Status 3}} {{if ne .Status 3}}
<form action="{{AppSubUrl}}/notifications/status" method="POST"> <form action="{{AppSubUrl}}/notifications/status" method="post">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="notification_id" value="{{.ID}}"> <input type="hidden" name="notification_id" value="{{.ID}}">
<input type="hidden" name="status" value="pinned"> <input type="hidden" name="status" value="pinned">
@ -85,7 +85,7 @@
</form> </form>
{{end}} {{end}}
{{if or (eq .Status 1) (eq .Status 3)}} {{if or (eq .Status 1) (eq .Status 3)}}
<form action="{{AppSubUrl}}/notifications/status" method="POST"> <form action="{{AppSubUrl}}/notifications/status" method="post">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="notification_id" value="{{.ID}}"> <input type="hidden" name="notification_id" value="{{.ID}}">
<input type="hidden" name="status" value="read"> <input type="hidden" name="status" value="read">
@ -100,7 +100,7 @@
</button> </button>
</form> </form>
{{else if eq .Status 2}} {{else if eq .Status 2}}
<form action="{{AppSubUrl}}/notifications/status" method="POST"> <form action="{{AppSubUrl}}/notifications/status" method="post">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="notification_id" value="{{.ID}}"> <input type="hidden" name="notification_id" value="{{.ID}}">
<input type="hidden" name="status" value="unread"> <input type="hidden" name="status" value="unread">

@ -18,7 +18,7 @@
<p>{{.locale.Tr "settings.gpg_token_required"}}</p> <p>{{.locale.Tr "settings.gpg_token_required"}}</p>
</div> </div>
<div class="field"> <div class="field">
<label for="token">{{.locale.Tr "settings.gpg_token"}} <label for="token">{{.locale.Tr "settings.gpg_token"}}</label>
<input readonly="" value="{{.TokenToSign}}"> <input readonly="" value="{{.TokenToSign}}">
<div class="help"> <div class="help">
<p>{{.locale.Tr "settings.gpg_token_help"}}</p> <p>{{.locale.Tr "settings.gpg_token_help"}}</p>

@ -21,5 +21,4 @@
</div> </div>
</div> </div>
</div> </div>
</div>
{{template "user/settings/layout_footer" .}} {{template "user/settings/layout_footer" .}}

@ -42,7 +42,7 @@
<div class="content"> <div class="content">
<p>{{$.locale.Tr "repo.adopt_preexisting_content" $dir}}</p> <p>{{$.locale.Tr "repo.adopt_preexisting_content" $dir}}</p>
</div> </div>
<form class="ui form" method="POST" action="{{AppSubUrl}}/user/settings/repos/unadopted"> <form class="ui form" method="post" action="{{AppSubUrl}}/user/settings/repos/unadopted">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="id" value="{{$dir}}"> <input type="hidden" name="id" value="{{$dir}}">
<input type="hidden" name="action" value="adopt"> <input type="hidden" name="action" value="adopt">
@ -59,7 +59,7 @@
<div class="content"> <div class="content">
<p>{{$.locale.Tr "repo.delete_preexisting_content" $dir}}</p> <p>{{$.locale.Tr "repo.delete_preexisting_content" $dir}}</p>
</div> </div>
<form class="ui form" method="POST" action="{{AppSubUrl}}/user/settings/repos/unadopted"> <form class="ui form" method="post" action="{{AppSubUrl}}/user/settings/repos/unadopted">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="id" value="{{$dir}}"> <input type="hidden" name="id" value="{{$dir}}">
<input type="hidden" name="action" value="delete"> <input type="hidden" name="action" value="delete">

@ -28,7 +28,6 @@
{{$.locale.Tr "settings.show_openid"}} {{$.locale.Tr "settings.show_openid"}}
</button> </button>
{{end}} {{end}}
</button>
</form> </form>
</div> </div>
<div class="content"> <div class="content">

@ -6,8 +6,8 @@
<div class="ui attached segment"> <div class="ui attached segment">
<p>{{.locale.Tr "settings.scan_this_image"}}</p> <p>{{.locale.Tr "settings.scan_this_image"}}</p>
<img src="{{.QrUri}}" alt="{{.TwofaSecret}}"> <img src="{{.QrUri}}" alt="{{.TwofaSecret}}">
<p>{{.locale.Tr "settings.or_enter_secret" .TwofaSecret}} <p>{{.locale.Tr "settings.or_enter_secret" .TwofaSecret}}</p>
<p>{{.locale.Tr "settings.then_enter_passcode"}} <p>{{.locale.Tr "settings.then_enter_passcode"}}</p>
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<div class="inline required field {{if .Err_Passcode}}error{{end}}"> <div class="inline required field {{if .Err_Passcode}}error{{end}}">

Loading…
Cancel
Save