loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

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).

authored by

silverwind and committed by
GitHub
e24f651c a0eaf088

+520 -171
+8 -1
.github/workflows/files-changed.yml
··· 15 15 actions: 16 16 description: "whether actions files changed" 17 17 value: ${{ jobs.detect.outputs.actions }} 18 + templates: 19 + description: "whether templates files changed" 20 + value: ${{ jobs.detect.outputs.templates }} 18 21 19 22 jobs: 20 23 detect: ··· 27 30 frontend: ${{ steps.changes.outputs.frontend }} 28 31 docs: ${{ steps.changes.outputs.docs }} 29 32 actions: ${{ steps.changes.outputs.actions }} 33 + templates: ${{ steps.changes.outputs.templates }} 30 34 steps: 31 35 - uses: actions/checkout@v3 32 36 - uses: dorny/paths-filter@v2 ··· 35 39 filters: | 36 40 backend: 37 41 - "**/*.go" 38 - - "**/*.tmpl" 42 + - "templates/**/*.tmpl" 39 43 - "go.mod" 40 44 - "go.sum" 41 45 ··· 51 55 52 56 actions: 53 57 - ".github/workflows/*" 58 + 59 + templates: 60 + - "templates/**/*.tmpl"
+13
.github/workflows/pull-compliance.yml
··· 26 26 env: 27 27 TAGS: bindata sqlite sqlite_unlock_notify 28 28 29 + lint-templates: 30 + if: needs.files-changed.outputs.templates == 'true' 31 + needs: files-changed 32 + runs-on: ubuntu-latest 33 + steps: 34 + - uses: actions/checkout@v3 35 + - uses: actions/setup-python@v4 36 + with: 37 + python-version: "3.11" 38 + - run: pip install poetry 39 + - run: make deps-py 40 + - run: make lint-templates 41 + 29 42 lint-go-windows: 30 43 if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true' 31 44 needs: files-changed
+1
.gitignore
··· 70 70 /tests/*.ini 71 71 /tests/**/*.git/**/*.sample 72 72 /node_modules 73 + /.venv 73 74 /yarn.lock 74 75 /yarn-error.log 75 76 /npm-debug.log*
+14 -1
Makefile
··· 198 198 @echo " - deps-frontend install frontend dependencies" 199 199 @echo " - deps-backend install backend dependencies" 200 200 @echo " - deps-tools install tool dependencies" 201 + @echo " - deps-py install python dependencies" 201 202 @echo " - lint lint everything" 202 203 @echo " - lint-fix lint everything and fix issues" 203 204 @echo " - lint-actions lint action workflow files" ··· 214 215 @echo " - lint-css-fix lint css files and fix issues" 215 216 @echo " - lint-md lint markdown files" 216 217 @echo " - lint-swagger lint swagger files" 218 + @echo " - lint-templates lint template files" 217 219 @echo " - checks run various consistency checks" 218 220 @echo " - checks-frontend check frontend files" 219 221 @echo " - checks-backend check backend files" ··· 416 418 .PHONY: lint-actions 417 419 lint-actions: 418 420 $(GO) run $(ACTIONLINT_PACKAGE) 421 + 422 + .PHONY: lint-templates 423 + lint-templates: .venv 424 + @poetry run djlint $(shell find templates -type f -iname '*.tmpl') 419 425 420 426 .PHONY: watch 421 427 watch: ··· 893 899 fi 894 900 895 901 .PHONY: deps 896 - deps: deps-frontend deps-backend deps-tools deps-docs 902 + deps: deps-frontend deps-backend deps-tools deps-docs deps-py 903 + 904 + .PHONY: deps-py 905 + deps-py: .venv 897 906 898 907 .PHONY: deps-frontend 899 908 deps-frontend: node_modules ··· 919 928 node_modules: package-lock.json 920 929 npm install --no-save 921 930 @touch node_modules 931 + 932 + .venv: poetry.lock 933 + poetry install 934 + @touch .venv 922 935 923 936 .PHONY: npm-update 924 937 npm-update: node-check | node_modules
+3
docs/content/doc/development/hacking-on-gitea.en-us.md
··· 48 48 recommended to install the version of Go that our continuous integration is 49 49 running. As of last update, the Go version should be {{< go-version >}}. 50 50 51 + To lint the template files, ensure [Python](https://www.python.org/) and 52 + [Poetry](https://python-poetry.org/) are installed. 53 + 51 54 ## Installing Make 52 55 53 56 Gitea makes heavy use of Make to automate tasks and improve development. This
+331
poetry.lock
··· 1 + # This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. 2 + 3 + [[package]] 4 + name = "click" 5 + version = "8.1.3" 6 + description = "Composable command line interface toolkit" 7 + optional = false 8 + python-versions = ">=3.7" 9 + files = [ 10 + {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, 11 + {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, 12 + ] 13 + 14 + [package.dependencies] 15 + colorama = {version = "*", markers = "platform_system == \"Windows\""} 16 + 17 + [[package]] 18 + name = "colorama" 19 + version = "0.4.6" 20 + description = "Cross-platform colored terminal text." 21 + optional = false 22 + python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" 23 + files = [ 24 + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, 25 + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, 26 + ] 27 + 28 + [[package]] 29 + name = "cssbeautifier" 30 + version = "1.14.8" 31 + description = "CSS unobfuscator and beautifier." 32 + optional = false 33 + python-versions = "*" 34 + files = [ 35 + {file = "cssbeautifier-1.14.8.tar.gz", hash = "sha256:9ad4c5b2ffe0b439a4bed278bc440b6a89c40823c3f19db38f808d256216a592"}, 36 + ] 37 + 38 + [package.dependencies] 39 + editorconfig = ">=0.12.2" 40 + jsbeautifier = "*" 41 + six = ">=1.13.0" 42 + 43 + [[package]] 44 + name = "djlint" 45 + version = "1.31.0" 46 + description = "HTML Template Linter and Formatter" 47 + optional = false 48 + python-versions = ">=3.8.0,<4.0.0" 49 + files = [ 50 + {file = "djlint-1.31.0-py3-none-any.whl", hash = "sha256:2b9200c67103b79835b7547ff732e910888d1f0ef684f5b329eb64b14d09c046"}, 51 + {file = "djlint-1.31.0.tar.gz", hash = "sha256:8acb4b751b429c5aabb1aef5b6007bdf53224eceda25c5fbe04c42cc57c0a7ba"}, 52 + ] 53 + 54 + [package.dependencies] 55 + click = ">=8.0.1,<9.0.0" 56 + colorama = ">=0.4.4,<0.5.0" 57 + cssbeautifier = ">=1.14.4,<2.0.0" 58 + html-tag-names = ">=0.1.2,<0.2.0" 59 + html-void-elements = ">=0.1.0,<0.2.0" 60 + jsbeautifier = ">=1.14.4,<2.0.0" 61 + json5 = ">=0.9.11,<0.10.0" 62 + pathspec = ">=0.11.0,<0.12.0" 63 + PyYAML = ">=6.0,<7.0" 64 + regex = ">=2023.0.0,<2024.0.0" 65 + tomli = {version = ">=2.0.1,<3.0.0", markers = "python_version < \"3.11\""} 66 + tqdm = ">=4.62.2,<5.0.0" 67 + 68 + [[package]] 69 + name = "editorconfig" 70 + version = "0.12.3" 71 + description = "EditorConfig File Locator and Interpreter for Python" 72 + optional = false 73 + python-versions = "*" 74 + files = [ 75 + {file = "EditorConfig-0.12.3-py3-none-any.whl", hash = "sha256:6b0851425aa875b08b16789ee0eeadbd4ab59666e9ebe728e526314c4a2e52c1"}, 76 + {file = "EditorConfig-0.12.3.tar.gz", hash = "sha256:57f8ce78afcba15c8b18d46b5170848c88d56fd38f05c2ec60dbbfcb8996e89e"}, 77 + ] 78 + 79 + [[package]] 80 + name = "html-tag-names" 81 + version = "0.1.2" 82 + description = "List of known HTML tag names" 83 + optional = false 84 + python-versions = ">=3.7,<4.0" 85 + files = [ 86 + {file = "html-tag-names-0.1.2.tar.gz", hash = "sha256:04924aca48770f36b5a41c27e4d917062507be05118acb0ba869c97389084297"}, 87 + {file = "html_tag_names-0.1.2-py3-none-any.whl", hash = "sha256:eeb69ef21078486b615241f0393a72b41352c5219ee648e7c61f5632d26f0420"}, 88 + ] 89 + 90 + [[package]] 91 + name = "html-void-elements" 92 + version = "0.1.0" 93 + description = "List of HTML void tag names." 94 + optional = false 95 + python-versions = ">=3.7,<4.0" 96 + files = [ 97 + {file = "html-void-elements-0.1.0.tar.gz", hash = "sha256:931b88f84cd606fee0b582c28fcd00e41d7149421fb673e1e1abd2f0c4f231f0"}, 98 + {file = "html_void_elements-0.1.0-py3-none-any.whl", hash = "sha256:784cf39db03cdeb017320d9301009f8f3480f9d7b254d0974272e80e0cb5e0d2"}, 99 + ] 100 + 101 + [[package]] 102 + name = "jsbeautifier" 103 + version = "1.14.8" 104 + description = "JavaScript unobfuscator and beautifier." 105 + optional = false 106 + python-versions = "*" 107 + files = [ 108 + {file = "jsbeautifier-1.14.8.tar.gz", hash = "sha256:d4c4e263a42dd6194afb9dbe54710be3c5604492cbec3e89c92dd98513f98b9f"}, 109 + ] 110 + 111 + [package.dependencies] 112 + editorconfig = ">=0.12.2" 113 + six = ">=1.13.0" 114 + 115 + [[package]] 116 + name = "json5" 117 + version = "0.9.14" 118 + description = "A Python implementation of the JSON5 data format." 119 + optional = false 120 + python-versions = "*" 121 + files = [ 122 + {file = "json5-0.9.14-py2.py3-none-any.whl", hash = "sha256:740c7f1b9e584a468dbb2939d8d458db3427f2c93ae2139d05f47e453eae964f"}, 123 + {file = "json5-0.9.14.tar.gz", hash = "sha256:9ed66c3a6ca3510a976a9ef9b8c0787de24802724ab1860bc0153c7fdd589b02"}, 124 + ] 125 + 126 + [package.extras] 127 + dev = ["hypothesis"] 128 + 129 + [[package]] 130 + name = "pathspec" 131 + version = "0.11.1" 132 + description = "Utility library for gitignore style pattern matching of file paths." 133 + optional = false 134 + python-versions = ">=3.7" 135 + files = [ 136 + {file = "pathspec-0.11.1-py3-none-any.whl", hash = "sha256:d8af70af76652554bd134c22b3e8a1cc46ed7d91edcdd721ef1a0c51a84a5293"}, 137 + {file = "pathspec-0.11.1.tar.gz", hash = "sha256:2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687"}, 138 + ] 139 + 140 + [[package]] 141 + name = "pyyaml" 142 + version = "6.0" 143 + description = "YAML parser and emitter for Python" 144 + optional = false 145 + python-versions = ">=3.6" 146 + files = [ 147 + {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, 148 + {file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"}, 149 + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"}, 150 + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"}, 151 + {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"}, 152 + {file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"}, 153 + {file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"}, 154 + {file = "PyYAML-6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358"}, 155 + {file = "PyYAML-6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1"}, 156 + {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d"}, 157 + {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f"}, 158 + {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782"}, 159 + {file = "PyYAML-6.0-cp311-cp311-win32.whl", hash = "sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7"}, 160 + {file = "PyYAML-6.0-cp311-cp311-win_amd64.whl", hash = "sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf"}, 161 + {file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"}, 162 + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"}, 163 + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"}, 164 + {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"}, 165 + {file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"}, 166 + {file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"}, 167 + {file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"}, 168 + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"}, 169 + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"}, 170 + {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"}, 171 + {file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"}, 172 + {file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"}, 173 + {file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"}, 174 + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"}, 175 + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"}, 176 + {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"}, 177 + {file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"}, 178 + {file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"}, 179 + {file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"}, 180 + {file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"}, 181 + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"}, 182 + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"}, 183 + {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"}, 184 + {file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"}, 185 + {file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"}, 186 + {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, 187 + ] 188 + 189 + [[package]] 190 + name = "regex" 191 + version = "2023.6.3" 192 + description = "Alternative regular expression module, to replace re." 193 + optional = false 194 + python-versions = ">=3.6" 195 + files = [ 196 + {file = "regex-2023.6.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:824bf3ac11001849aec3fa1d69abcb67aac3e150a933963fb12bda5151fe1bfd"}, 197 + {file = "regex-2023.6.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:05ed27acdf4465c95826962528f9e8d41dbf9b1aa8531a387dee6ed215a3e9ef"}, 198 + {file = "regex-2023.6.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b49c764f88a79160fa64f9a7b425620e87c9f46095ef9c9920542ab2495c8bc"}, 199 + {file = "regex-2023.6.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8e3f1316c2293e5469f8f09dc2d76efb6c3982d3da91ba95061a7e69489a14ef"}, 200 + {file = "regex-2023.6.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:43e1dd9d12df9004246bacb79a0e5886b3b6071b32e41f83b0acbf293f820ee8"}, 201 + {file = "regex-2023.6.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4959e8bcbfda5146477d21c3a8ad81b185cd252f3d0d6e4724a5ef11c012fb06"}, 202 + {file = "regex-2023.6.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:af4dd387354dc83a3bff67127a124c21116feb0d2ef536805c454721c5d7993d"}, 203 + {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"}, 204 + {file = "regex-2023.6.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:890e5a11c97cf0d0c550eb661b937a1e45431ffa79803b942a057c4fb12a2da2"}, 205 + {file = "regex-2023.6.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:a8105e9af3b029f243ab11ad47c19b566482c150c754e4c717900a798806b222"}, 206 + {file = "regex-2023.6.3-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:25be746a8ec7bc7b082783216de8e9473803706723b3f6bef34b3d0ed03d57e2"}, 207 + {file = "regex-2023.6.3-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:3676f1dd082be28b1266c93f618ee07741b704ab7b68501a173ce7d8d0d0ca18"}, 208 + {file = "regex-2023.6.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:10cb847aeb1728412c666ab2e2000ba6f174f25b2bdc7292e7dd71b16db07568"}, 209 + {file = "regex-2023.6.3-cp310-cp310-win32.whl", hash = "sha256:dbbbfce33cd98f97f6bffb17801b0576e653f4fdb1d399b2ea89638bc8d08ae1"}, 210 + {file = "regex-2023.6.3-cp310-cp310-win_amd64.whl", hash = "sha256:c5f8037000eb21e4823aa485149f2299eb589f8d1fe4b448036d230c3f4e68e0"}, 211 + {file = "regex-2023.6.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c123f662be8ec5ab4ea72ea300359023a5d1df095b7ead76fedcd8babbedf969"}, 212 + {file = "regex-2023.6.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9edcbad1f8a407e450fbac88d89e04e0b99a08473f666a3f3de0fd292badb6aa"}, 213 + {file = "regex-2023.6.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcba6dae7de533c876255317c11f3abe4907ba7d9aa15d13e3d9710d4315ec0e"}, 214 + {file = "regex-2023.6.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:29cdd471ebf9e0f2fb3cac165efedc3c58db841d83a518b082077e612d3ee5df"}, 215 + {file = "regex-2023.6.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:12b74fbbf6cbbf9dbce20eb9b5879469e97aeeaa874145517563cca4029db65c"}, 216 + {file = "regex-2023.6.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c29ca1bd61b16b67be247be87390ef1d1ef702800f91fbd1991f5c4421ebae8"}, 217 + {file = "regex-2023.6.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d77f09bc4b55d4bf7cc5eba785d87001d6757b7c9eec237fe2af57aba1a071d9"}, 218 + {file = "regex-2023.6.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ea353ecb6ab5f7e7d2f4372b1e779796ebd7b37352d290096978fea83c4dba0c"}, 219 + {file = "regex-2023.6.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:10590510780b7541969287512d1b43f19f965c2ece6c9b1c00fc367b29d8dce7"}, 220 + {file = "regex-2023.6.3-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:e2fbd6236aae3b7f9d514312cdb58e6494ee1c76a9948adde6eba33eb1c4264f"}, 221 + {file = "regex-2023.6.3-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:6b2675068c8b56f6bfd5a2bda55b8accbb96c02fd563704732fd1c95e2083461"}, 222 + {file = "regex-2023.6.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:74419d2b50ecb98360cfaa2974da8689cb3b45b9deff0dcf489c0d333bcc1477"}, 223 + {file = "regex-2023.6.3-cp311-cp311-win32.whl", hash = "sha256:fb5ec16523dc573a4b277663a2b5a364e2099902d3944c9419a40ebd56a118f9"}, 224 + {file = "regex-2023.6.3-cp311-cp311-win_amd64.whl", hash = "sha256:09e4a1a6acc39294a36b7338819b10baceb227f7f7dbbea0506d419b5a1dd8af"}, 225 + {file = "regex-2023.6.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:0654bca0cdf28a5956c83839162692725159f4cda8d63e0911a2c0dc76166525"}, 226 + {file = "regex-2023.6.3-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:463b6a3ceb5ca952e66550a4532cef94c9a0c80dc156c4cc343041951aec1697"}, 227 + {file = "regex-2023.6.3-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:87b2a5bb5e78ee0ad1de71c664d6eb536dc3947a46a69182a90f4410f5e3f7dd"}, 228 + {file = "regex-2023.6.3-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6343c6928282c1f6a9db41f5fd551662310e8774c0e5ebccb767002fcf663ca9"}, 229 + {file = "regex-2023.6.3-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b6192d5af2ccd2a38877bfef086d35e6659566a335b1492786ff254c168b1693"}, 230 + {file = "regex-2023.6.3-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:74390d18c75054947e4194019077e243c06fbb62e541d8817a0fa822ea310c14"}, 231 + {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"}, 232 + {file = "regex-2023.6.3-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:8abbc5d54ea0ee80e37fef009e3cec5dafd722ed3c829126253d3e22f3846f1e"}, 233 + {file = "regex-2023.6.3-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:c2b867c17a7a7ae44c43ebbeb1b5ff406b3e8d5b3e14662683e5e66e6cc868d3"}, 234 + {file = "regex-2023.6.3-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:d831c2f8ff278179705ca59f7e8524069c1a989e716a1874d6d1aab6119d91d1"}, 235 + {file = "regex-2023.6.3-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:ee2d1a9a253b1729bb2de27d41f696ae893507c7db224436abe83ee25356f5c1"}, 236 + {file = "regex-2023.6.3-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:61474f0b41fe1a80e8dfa70f70ea1e047387b7cd01c85ec88fa44f5d7561d787"}, 237 + {file = "regex-2023.6.3-cp36-cp36m-win32.whl", hash = "sha256:0b71e63226e393b534105fcbdd8740410dc6b0854c2bfa39bbda6b0d40e59a54"}, 238 + {file = "regex-2023.6.3-cp36-cp36m-win_amd64.whl", hash = "sha256:bbb02fd4462f37060122e5acacec78e49c0fbb303c30dd49c7f493cf21fc5b27"}, 239 + {file = "regex-2023.6.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b862c2b9d5ae38a68b92e215b93f98d4c5e9454fa36aae4450f61dd33ff48487"}, 240 + {file = "regex-2023.6.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:976d7a304b59ede34ca2921305b57356694f9e6879db323fd90a80f865d355a3"}, 241 + {file = "regex-2023.6.3-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:83320a09188e0e6c39088355d423aa9d056ad57a0b6c6381b300ec1a04ec3d16"}, 242 + {file = "regex-2023.6.3-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9427a399501818a7564f8c90eced1e9e20709ece36be701f394ada99890ea4b3"}, 243 + {file = "regex-2023.6.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7178bbc1b2ec40eaca599d13c092079bf529679bf0371c602edaa555e10b41c3"}, 244 + {file = "regex-2023.6.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:837328d14cde912af625d5f303ec29f7e28cdab588674897baafaf505341f2fc"}, 245 + {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"}, 246 + {file = "regex-2023.6.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d54af539295392611e7efbe94e827311eb8b29668e2b3f4cadcfe6f46df9c777"}, 247 + {file = "regex-2023.6.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:7117d10690c38a622e54c432dfbbd3cbd92f09401d622902c32f6d377e2300ee"}, 248 + {file = "regex-2023.6.3-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bb60b503ec8a6e4e3e03a681072fa3a5adcbfa5479fa2d898ae2b4a8e24c4591"}, 249 + {file = "regex-2023.6.3-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:65ba8603753cec91c71de423a943ba506363b0e5c3fdb913ef8f9caa14b2c7e0"}, 250 + {file = "regex-2023.6.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:271f0bdba3c70b58e6f500b205d10a36fb4b58bd06ac61381b68de66442efddb"}, 251 + {file = "regex-2023.6.3-cp37-cp37m-win32.whl", hash = "sha256:9beb322958aaca059f34975b0df135181f2e5d7a13b84d3e0e45434749cb20f7"}, 252 + {file = "regex-2023.6.3-cp37-cp37m-win_amd64.whl", hash = "sha256:fea75c3710d4f31389eed3c02f62d0b66a9da282521075061ce875eb5300cf23"}, 253 + {file = "regex-2023.6.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8f56fcb7ff7bf7404becdfc60b1e81a6d0561807051fd2f1860b0d0348156a07"}, 254 + {file = "regex-2023.6.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d2da3abc88711bce7557412310dfa50327d5769a31d1c894b58eb256459dc289"}, 255 + {file = "regex-2023.6.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a99b50300df5add73d307cf66abea093304a07eb017bce94f01e795090dea87c"}, 256 + {file = "regex-2023.6.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5708089ed5b40a7b2dc561e0c8baa9535b77771b64a8330b684823cfd5116036"}, 257 + {file = "regex-2023.6.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:687ea9d78a4b1cf82f8479cab23678aff723108df3edeac098e5b2498879f4a7"}, 258 + {file = "regex-2023.6.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4d3850beab9f527f06ccc94b446c864059c57651b3f911fddb8d9d3ec1d1b25d"}, 259 + {file = "regex-2023.6.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e8915cc96abeb8983cea1df3c939e3c6e1ac778340c17732eb63bb96247b91d2"}, 260 + {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"}, 261 + {file = "regex-2023.6.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9edce5281f965cf135e19840f4d93d55b3835122aa76ccacfd389e880ba4cf82"}, 262 + {file = "regex-2023.6.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:b956231ebdc45f5b7a2e1f90f66a12be9610ce775fe1b1d50414aac1e9206c06"}, 263 + {file = "regex-2023.6.3-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:36efeba71c6539d23c4643be88295ce8c82c88bbd7c65e8a24081d2ca123da3f"}, 264 + {file = "regex-2023.6.3-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:cf67ca618b4fd34aee78740bea954d7c69fdda419eb208c2c0c7060bb822d747"}, 265 + {file = "regex-2023.6.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b4598b1897837067a57b08147a68ac026c1e73b31ef6e36deeeb1fa60b2933c9"}, 266 + {file = "regex-2023.6.3-cp38-cp38-win32.whl", hash = "sha256:f415f802fbcafed5dcc694c13b1292f07fe0befdb94aa8a52905bd115ff41e88"}, 267 + {file = "regex-2023.6.3-cp38-cp38-win_amd64.whl", hash = "sha256:d4f03bb71d482f979bda92e1427f3ec9b220e62a7dd337af0aa6b47bf4498f72"}, 268 + {file = "regex-2023.6.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ccf91346b7bd20c790310c4147eee6ed495a54ddb6737162a36ce9dbef3e4751"}, 269 + {file = "regex-2023.6.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b28f5024a3a041009eb4c333863d7894d191215b39576535c6734cd88b0fcb68"}, 270 + {file = "regex-2023.6.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e0bb18053dfcfed432cc3ac632b5e5e5c5b7e55fb3f8090e867bfd9b054dbcbf"}, 271 + {file = "regex-2023.6.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a5bfb3004f2144a084a16ce19ca56b8ac46e6fd0651f54269fc9e230edb5e4a"}, 272 + {file = "regex-2023.6.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5c6b48d0fa50d8f4df3daf451be7f9689c2bde1a52b1225c5926e3f54b6a9ed1"}, 273 + {file = "regex-2023.6.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:051da80e6eeb6e239e394ae60704d2b566aa6a7aed6f2890a7967307267a5dc6"}, 274 + {file = "regex-2023.6.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a4c3b7fa4cdaa69268748665a1a6ff70c014d39bb69c50fda64b396c9116cf77"}, 275 + {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"}, 276 + {file = "regex-2023.6.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:aad51907d74fc183033ad796dd4c2e080d1adcc4fd3c0fd4fd499f30c03011cd"}, 277 + {file = "regex-2023.6.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:0385e73da22363778ef2324950e08b689abdf0b108a7d8decb403ad7f5191938"}, 278 + {file = "regex-2023.6.3-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:c6a57b742133830eec44d9b2290daf5cbe0a2f1d6acee1b3c7b1c7b2f3606df7"}, 279 + {file = "regex-2023.6.3-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:3e5219bf9e75993d73ab3d25985c857c77e614525fac9ae02b1bebd92f7cecac"}, 280 + {file = "regex-2023.6.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e5087a3c59eef624a4591ef9eaa6e9a8d8a94c779dade95d27c0bc24650261cd"}, 281 + {file = "regex-2023.6.3-cp39-cp39-win32.whl", hash = "sha256:20326216cc2afe69b6e98528160b225d72f85ab080cbdf0b11528cbbaba2248f"}, 282 + {file = "regex-2023.6.3-cp39-cp39-win_amd64.whl", hash = "sha256:bdff5eab10e59cf26bc479f565e25ed71a7d041d1ded04ccf9aee1d9f208487a"}, 283 + {file = "regex-2023.6.3.tar.gz", hash = "sha256:72d1a25bf36d2050ceb35b517afe13864865268dfb45910e2e17a84be6cbfeb0"}, 284 + ] 285 + 286 + [[package]] 287 + name = "six" 288 + version = "1.16.0" 289 + description = "Python 2 and 3 compatibility utilities" 290 + optional = false 291 + python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" 292 + files = [ 293 + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, 294 + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, 295 + ] 296 + 297 + [[package]] 298 + name = "tomli" 299 + version = "2.0.1" 300 + description = "A lil' TOML parser" 301 + optional = false 302 + python-versions = ">=3.7" 303 + files = [ 304 + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, 305 + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, 306 + ] 307 + 308 + [[package]] 309 + name = "tqdm" 310 + version = "4.65.0" 311 + description = "Fast, Extensible Progress Meter" 312 + optional = false 313 + python-versions = ">=3.7" 314 + files = [ 315 + {file = "tqdm-4.65.0-py3-none-any.whl", hash = "sha256:c4f53a17fe37e132815abceec022631be8ffe1b9381c2e6e30aa70edc99e9671"}, 316 + {file = "tqdm-4.65.0.tar.gz", hash = "sha256:1871fb68a86b8fb3b59ca4cdd3dcccbc7e6d613eeed31f4c332531977b89beb5"}, 317 + ] 318 + 319 + [package.dependencies] 320 + colorama = {version = "*", markers = "platform_system == \"Windows\""} 321 + 322 + [package.extras] 323 + dev = ["py-make (>=0.1.0)", "twine", "wheel"] 324 + notebook = ["ipywidgets (>=6)"] 325 + slack = ["slack-sdk"] 326 + telegram = ["requests"] 327 + 328 + [metadata] 329 + lock-version = "2.0" 330 + python-versions = "^3.8" 331 + content-hash = "22c4af11eadd8784b613951d6160d67be0f33500238a450741c3d75beb218dad"
+4
poetry.toml
··· 1 + [virtualenvs] 2 + in-project = true 3 + no-pip = true 4 + no-setuptools = true
+19
pyproject.toml
··· 1 + [tool.poetry] 2 + name = "gitea" 3 + version = "0.0.0" 4 + description = "" 5 + authors = [] 6 + 7 + [tool.poetry.dependencies] 8 + python = "^3.8" 9 + 10 + [tool.poetry.group.dev.dependencies] 11 + djlint = "1.31.0" 12 + 13 + [tool.djlint] 14 + profile="golang" 15 + ignore="H005,H006,H008,H013,H014,H016,H020,H021,H023,H026,H030,H031,T027" 16 + 17 + [build-system] 18 + requires = ["poetry-core"] 19 + build-backend = "poetry.core.masonry.api"
+15 -15
templates/admin/auth/edit.tmpl
··· 36 36 </div> 37 37 <div class="required field"> 38 38 <label for="host">{{.locale.Tr "admin.auths.host"}}</label> 39 - <input id="host" name="host" value="{{$cfg.Host}}" placeholder="e.g. mydomain.com" required> 39 + <input id="host" name="host" value="{{$cfg.Host}}" placeholder="mydomain.com" required> 40 40 </div> 41 41 <div class="required field"> 42 42 <label for="port">{{.locale.Tr "admin.auths.port"}}</label> 43 - <input id="port" name="port" value="{{$cfg.Port}}" placeholder="e.g. 636" required> 43 + <input id="port" name="port" value="{{$cfg.Port}}" placeholder="636" required> 44 44 </div> 45 45 <div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}"> 46 46 <div class="ui checkbox"> ··· 51 51 {{if .Source.IsLDAP}} 52 52 <div class="field"> 53 53 <label for="bind_dn">{{.locale.Tr "admin.auths.bind_dn"}}</label> 54 - <input id="bind_dn" name="bind_dn" value="{{$cfg.BindDN}}" placeholder="e.g. cn=Search,dc=mydomain,dc=com"> 54 + <input id="bind_dn" name="bind_dn" value="{{$cfg.BindDN}}" placeholder="cn=Search,dc=mydomain,dc=com"> 55 55 </div> 56 56 <div class="field"> 57 57 <label for="bind_password">{{.locale.Tr "admin.auths.bind_password"}}</label> ··· 60 60 {{end}} 61 61 <div class="{{if .Source.IsLDAP}}required{{end}} field"> 62 62 <label for="user_base">{{.locale.Tr "admin.auths.user_base"}}</label> 63 - <input id="user_base" name="user_base" value="{{$cfg.UserBase}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com" {{if .Source.IsLDAP}}required{{end}}> 63 + <input id="user_base" name="user_base" value="{{$cfg.UserBase}}" placeholder="ou=Users,dc=mydomain,dc=com" {{if .Source.IsLDAP}}required{{end}}> 64 64 </div> 65 65 {{if .Source.IsDLDAP}} 66 66 <div class="required field"> 67 67 <label for="user_dn">{{.locale.Tr "admin.auths.user_dn"}}</label> 68 - <input id="user_dn" name="user_dn" value="{{$cfg.UserDN}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com" required> 68 + <input id="user_dn" name="user_dn" value="{{$cfg.UserDN}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com" required> 69 69 </div> 70 70 {{end}} 71 71 <div class="required field"> 72 72 <label for="filter">{{.locale.Tr "admin.auths.filter"}}</label> 73 - <input id="filter" name="filter" value="{{$cfg.Filter}}" placeholder="e.g. (&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))" required> 73 + <input id="filter" name="filter" value="{{$cfg.Filter}}" placeholder="(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))" required> 74 74 </div> 75 75 <div class="field"> 76 76 <label for="admin_filter">{{.locale.Tr "admin.auths.admin_filter"}}</label> ··· 95 95 </div> 96 96 <div class="required field"> 97 97 <label for="attribute_mail">{{.locale.Tr "admin.auths.attribute_mail"}}</label> 98 - <input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="e.g. mail" required> 98 + <input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="mail" required> 99 99 </div> 100 100 <div class="field"> 101 101 <label for="attribute_ssh_public_key">{{.locale.Tr "admin.auths.attribute_ssh_public_key"}}</label> 102 - <input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{$cfg.AttributeSSHPublicKey}}" placeholder="e.g. SshPublicKey"> 102 + <input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{$cfg.AttributeSSHPublicKey}}" placeholder="SshPublicKey"> 103 103 </div> 104 104 <div class="field"> 105 105 <label for="attribute_avatar">{{.locale.Tr "admin.auths.attribute_avatar"}}</label> 106 - <input id="attribute_avatar" name="attribute_avatar" value="{{$cfg.AttributeAvatar}}" placeholder="e.g. jpegPhoto"> 106 + <input id="attribute_avatar" name="attribute_avatar" value="{{$cfg.AttributeAvatar}}" placeholder="jpegPhoto"> 107 107 </div> 108 108 109 109 ··· 117 117 <div id="ldap-group-options" class="ui segment secondary {{if not $cfg.GroupsEnabled}}gt-hidden{{end}}"> 118 118 <div class="field"> 119 119 <label>{{.locale.Tr "admin.auths.group_search_base"}}</label> 120 - <input name="group_dn" value="{{$cfg.GroupDN}}" placeholder="e.g. ou=group,dc=mydomain,dc=com"> 120 + <input name="group_dn" value="{{$cfg.GroupDN}}" placeholder="ou=group,dc=mydomain,dc=com"> 121 121 </div> 122 122 <div class="field"> 123 123 <label>{{.locale.Tr "admin.auths.group_attribute_list_users"}}</label> 124 - <input name="group_member_uid" value="{{$cfg.GroupMemberUID}}" placeholder="e.g. memberUid"> 124 + <input name="group_member_uid" value="{{$cfg.GroupMemberUID}}" placeholder="memberUid"> 125 125 </div> 126 126 <div class="field"> 127 127 <label>{{.locale.Tr "admin.auths.user_attribute_in_group"}}</label> 128 - <input name="user_uid" value="{{$cfg.UserUID}}" placeholder="e.g. uid"> 128 + <input name="user_uid" value="{{$cfg.UserUID}}" placeholder="uid"> 129 129 </div> 130 130 <div class="field"> 131 131 <label>{{.locale.Tr "admin.auths.verify_group_membership"}}</label> 132 - <input name="group_filter" value="{{$cfg.GroupFilter}}" placeholder="e.g. (|(cn=gitea_users)(cn=admins))"> 132 + <input name="group_filter" value="{{$cfg.GroupFilter}}" placeholder="(|(cn=gitea_users)(cn=admins))"> 133 133 </div> 134 134 <div class="field"> 135 135 <label>{{.locale.Tr "admin.auths.map_group_to_team"}}</label> 136 - <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> 136 + <textarea name="group_team_map" rows="5" placeholder='{"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{$cfg.GroupTeamMap}}</textarea> 137 137 </div> 138 138 <div class="ui checkbox"> 139 139 <label>{{.locale.Tr "admin.auths.map_group_to_team_removal"}}</label> ··· 360 360 </div> 361 361 <div class="field"> 362 362 <label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team"}}</label> 363 - <textarea name="oauth2_group_team_map" rows="5" placeholder='e.g. {"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{$cfg.GroupTeamMap}}</textarea> 363 + <textarea name="oauth2_group_team_map" rows="5" placeholder='{"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{$cfg.GroupTeamMap}}</textarea> 364 364 </div> 365 365 <div class="ui checkbox"> 366 366 <label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team_removal"}}</label>
+14 -14
templates/admin/auth/source/ldap.tmpl
··· 14 14 </div> 15 15 <div class="required field"> 16 16 <label for="host">{{.locale.Tr "admin.auths.host"}}</label> 17 - <input id="host" name="host" value="{{.host}}" placeholder="e.g. mydomain.com"> 17 + <input id="host" name="host" value="{{.host}}" placeholder="mydomain.com"> 18 18 </div> 19 19 <div class="required field"> 20 20 <label for="port">{{.locale.Tr "admin.auths.port"}}</label> 21 - <input id="port" name="port" value="{{.port}}" placeholder="e.g. 636"> 21 + <input id="port" name="port" value="{{.port}}" placeholder="636"> 22 22 </div> 23 23 <div class="has-tls inline field {{if not .HasTLS}}gt-hidden{{end}}"> 24 24 <div class="ui checkbox"> ··· 28 28 </div> 29 29 <div class="ldap field {{if not (eq .type 2)}}gt-hidden{{end}}"> 30 30 <label for="bind_dn">{{.locale.Tr "admin.auths.bind_dn"}}</label> 31 - <input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="e.g. cn=Search,dc=mydomain,dc=com"> 31 + <input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="cn=Search,dc=mydomain,dc=com"> 32 32 </div> 33 33 <div class="ldap field {{if not (eq .type 2)}}gt-hidden{{end}}"> 34 34 <label for="bind_password">{{.locale.Tr "admin.auths.bind_password"}}</label> ··· 36 36 </div> 37 37 <div class="binddnrequired {{if (eq .type 2)}}required{{end}} field"> 38 38 <label for="user_base">{{.locale.Tr "admin.auths.user_base"}}</label> 39 - <input id="user_base" name="user_base" value="{{.user_base}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com"> 39 + <input id="user_base" name="user_base" value="{{.user_base}}" placeholder="ou=Users,dc=mydomain,dc=com"> 40 40 </div> 41 41 <div class="dldap required field {{if not (eq .type 5)}}gt-hidden{{end}}"> 42 42 <label for="user_dn">{{.locale.Tr "admin.auths.user_dn"}}</label> 43 - <input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com"> 43 + <input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="uid=%s,ou=Users,dc=mydomain,dc=com"> 44 44 </div> 45 45 <div class="required field"> 46 46 <label for="filter">{{.locale.Tr "admin.auths.filter"}}</label> 47 - <input id="filter" name="filter" value="{{.filter}}" placeholder="e.g. (&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))"> 47 + <input id="filter" name="filter" value="{{.filter}}" placeholder="(&(objectClass=posixAccount)(|(uid=%[1]s)(mail=%[1]s)))"> 48 48 </div> 49 49 <div class="field"> 50 50 <label for="admin_filter">{{.locale.Tr "admin.auths.admin_filter"}}</label> ··· 69 69 </div> 70 70 <div class="required field"> 71 71 <label for="attribute_mail">{{.locale.Tr "admin.auths.attribute_mail"}}</label> 72 - <input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="e.g. mail"> 72 + <input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="mail"> 73 73 </div> 74 74 <div class="field"> 75 75 <label for="attribute_ssh_public_key">{{.locale.Tr "admin.auths.attribute_ssh_public_key"}}</label> 76 - <input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{.attribute_ssh_public_key}}" placeholder="e.g. SshPublicKey"> 76 + <input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{.attribute_ssh_public_key}}" placeholder="SshPublicKey"> 77 77 </div> 78 78 <div class="field"> 79 79 <label for="attribute_avatar">{{.locale.Tr "admin.auths.attribute_avatar"}}</label> 80 - <input id="attribute_avatar" name="attribute_avatar" value="{{.attribute_avatar}}" placeholder="e.g. jpegPhoto"> 80 + <input id="attribute_avatar" name="attribute_avatar" value="{{.attribute_avatar}}" placeholder="jpegPhoto"> 81 81 </div> 82 82 83 83 <!-- ldap group begin --> ··· 90 90 <div id="ldap-group-options" class="ui segment secondary"> 91 91 <div class="field"> 92 92 <label>{{.locale.Tr "admin.auths.group_search_base"}}</label> 93 - <input name="group_dn" value="{{.group_dn}}" placeholder="e.g. ou=group,dc=mydomain,dc=com"> 93 + <input name="group_dn" value="{{.group_dn}}" placeholder="ou=group,dc=mydomain,dc=com"> 94 94 </div> 95 95 <div class="field"> 96 96 <label>{{.locale.Tr "admin.auths.group_attribute_list_users"}}</label> 97 - <input name="group_member_uid" value="{{.group_member_uid}}" placeholder="e.g. memberUid"> 97 + <input name="group_member_uid" value="{{.group_member_uid}}" placeholder="memberUid"> 98 98 </div> 99 99 <div class="field"> 100 100 <label>{{.locale.Tr "admin.auths.user_attribute_in_group"}}</label> 101 - <input name="user_uid" value="{{.user_uid}}" placeholder="e.g. uid"> 101 + <input name="user_uid" value="{{.user_uid}}" placeholder="uid"> 102 102 </div> 103 103 <div class="field"> 104 104 <label>{{.locale.Tr "admin.auths.verify_group_membership"}}</label> 105 - <input name="group_filter" value="{{.group_filter}}" placeholder="e.g. (|(cn=gitea_users)(cn=admins))"> 105 + <input name="group_filter" value="{{.group_filter}}" placeholder="(|(cn=gitea_users)(cn=admins))"> 106 106 </div> 107 107 <div class="field"> 108 108 <label>{{.locale.Tr "admin.auths.map_group_to_team"}}</label> 109 - <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> 109 + <textarea name="group_team_map" rows="5" placeholder='{"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{.group_team_map}}</textarea> 110 110 </div> 111 111 <div class="ui checkbox"> 112 112 <label>{{.locale.Tr "admin.auths.map_group_to_team_removal"}}</label>
+1 -1
templates/admin/auth/source/oauth.tmpl
··· 100 100 </div> 101 101 <div class="field"> 102 102 <label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team"}}</label> 103 - <textarea name="oauth2_group_team_map" rows="5" placeholder='e.g. {"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{.oauth2_group_team_map}}</textarea> 103 + <textarea name="oauth2_group_team_map" rows="5" placeholder='{"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>{{.oauth2_group_team_map}}</textarea> 104 104 </div> 105 105 <div class="ui checkbox"> 106 106 <label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team_removal"}}</label>
+1 -1
templates/admin/queue.tmpl
··· 23 23 <td>{{$q.GetItemTypeName}}</td> 24 24 <td>{{$sum := $q.GetWorkerNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td> 25 25 <td>{{$sum = $q.GetQueueItemNumber}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td> 26 - <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> 26 + <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> 27 27 </tr> 28 28 {{end}} 29 29 </tbody>
+1 -1
templates/admin/queue_manage.tmpl
··· 44 44 </h4> 45 45 <div class="ui attached segment"> 46 46 <p>{{.locale.Tr "admin.monitor.queue.settings.desc"}}</p> 47 - <form method="POST" action="{{.Link}}/set"> 47 + <form method="post" action="{{.Link}}/set"> 48 48 {{$.CsrfTokenHtml}} 49 49 <div class="ui form"> 50 50 <div class="inline field">
+2 -2
templates/admin/repo/unadopted.tmpl
··· 31 31 <div class="content"> 32 32 <p>{{$.locale.Tr "repo.adopt_preexisting_content" $dir}}</p> 33 33 </div> 34 - <form class="ui form" method="POST" action="{{AppSubUrl}}/admin/repos/unadopted"> 34 + <form class="ui form" method="post" action="{{AppSubUrl}}/admin/repos/unadopted"> 35 35 {{$.CsrfTokenHtml}} 36 36 <input type="hidden" name="id" value="{{$dir}}"> 37 37 <input type="hidden" name="action" value="adopt"> ··· 48 48 <div class="content"> 49 49 <p>{{$.locale.Tr "repo.delete_preexisting_content" $dir}}</p> 50 50 </div> 51 - <form class="ui form" method="POST" action="{{AppSubUrl}}/admin/repos/unadopted"> 51 + <form class="ui form" method="post" action="{{AppSubUrl}}/admin/repos/unadopted"> 52 52 {{$.CsrfTokenHtml}} 53 53 <input type="hidden" name="id" value="{{$dir}}"> 54 54 <input type="hidden" name="action" value="delete">
+2 -2
templates/admin/user/edit.tmpl
··· 72 72 </div> 73 73 <div class="field {{if .Err_Website}}error{{end}}"> 74 74 <label for="website">{{.locale.Tr "settings.website"}}</label> 75 - <input id="website" name="website" type="url" value="{{.User.Website}}" placeholder="e.g. http://mydomain.com or https://mydomain.com" maxlength="255"> 75 + <input id="website" name="website" type="url" value="{{.User.Website}}" placeholder="http://mydomain.com or https://mydomain.com" maxlength="255"> 76 76 </div> 77 77 <div class="field {{if .Err_Location}}error{{end}}"> 78 78 <label for="location">{{.locale.Tr "settings.location"}}</label> ··· 197 197 {{svg "octicon-trash"}} 198 198 {{.locale.Tr "settings.delete_account_title"}} 199 199 </div> 200 - <form class="ui form" method="POST" action="{{.Link}}/delete"> 200 + <form class="ui form" method="post" action="{{.Link}}/delete"> 201 201 <div class="content"> 202 202 <p>{{.locale.Tr "settings.delete_account_desc"}}</p> 203 203 {{$.CsrfTokenHtml}}
+2 -2
templates/base/head_navbar.tmpl
··· 91 91 {{if .ActiveStopwatch}}{{Sec2Time .ActiveStopwatch.Seconds}}{{end}} 92 92 </span> 93 93 </a> 94 - <form class="stopwatch-commit" method="POST" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle"> 94 + <form class="stopwatch-commit" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/toggle"> 95 95 {{.CsrfTokenHtml}} 96 96 <button 97 97 type="submit" ··· 99 99 data-tooltip-content="{{.locale.Tr "repo.issues.stop_tracking"}}" 100 100 >{{svg "octicon-square-fill"}}</button> 101 101 </form> 102 - <form class="stopwatch-cancel" method="POST" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel"> 102 + <form class="stopwatch-cancel" method="post" action="{{.ActiveStopwatch.IssueLink}}/times/stopwatch/cancel"> 103 103 {{.CsrfTokenHtml}} 104 104 <button 105 105 type="submit"
+2 -2
templates/install.tmpl
··· 139 139 </div> 140 140 <div class="inline required field"> 141 141 <label for="domain">{{.locale.Tr "install.domain"}}</label> 142 - <input id="domain" name="domain" value="{{.domain}}" placeholder="e.g. try.gitea.io" required> 142 + <input id="domain" name="domain" value="{{.domain}}" placeholder="try.gitea.io" required> 143 143 <span class="help">{{.locale.Tr "install.domain_helper"}}</span> 144 144 </div> 145 145 <div class="inline field"> ··· 154 154 </div> 155 155 <div class="inline required field"> 156 156 <label for="app_url">{{.locale.Tr "install.app_url"}}</label> 157 - <input id="app_url" name="app_url" value="{{.app_url}}" placeholder="e.g. https://try.gitea.io" required> 157 + <input id="app_url" name="app_url" value="{{.app_url}}" placeholder="https://try.gitea.io" required> 158 158 <span class="help">{{.locale.Tr "install.app_url_helper"}}</span> 159 159 </div> 160 160 <div class="inline required field">
+1
templates/mail/notify/repo_transfer.tmpl
··· 9 9 <body> 10 10 <p>{{.Subject}}. 11 11 {{.locale.Tr "mail.repo.transfer.body" $url | Str2html}} 12 + </p> 12 13 <p> 13 14 --- 14 15 <br>
+3 -3
templates/org/team/sidebar.tmpl
··· 34 34 <h3>{{.locale.Tr "org.team_access_desc"}}</h3> 35 35 <ul> 36 36 {{if .Team.IncludesAllRepositories}} 37 - <li>{{.locale.Tr "org.teams.all_repositories" | Str2html}} 37 + <li>{{.locale.Tr "org.teams.all_repositories" | Str2html}}</li> 38 38 {{else}} 39 - <li>{{.locale.Tr "org.teams.specific_repositories" | Str2html}} 39 + <li>{{.locale.Tr "org.teams.specific_repositories" | Str2html}}</li> 40 40 {{end}} 41 41 {{if .Team.CanCreateOrgRepo}} 42 - <li>{{.locale.Tr "org.teams.can_create_org_repo"}} 42 + <li>{{.locale.Tr "org.teams.can_create_org_repo"}}</li> 43 43 {{end}} 44 44 </ul> 45 45 {{if (eq .Team.AccessMode 2)}}
+1 -1
templates/repo/blame.tmpl
··· 56 56 {{end}} 57 57 </td> 58 58 {{end}} 59 - <td rel="L{{$row.RowNumber}}" rel="L{{$row.RowNumber}}" class="lines-code blame-code chroma"> 59 + <td rel="L{{$row.RowNumber}}" class="lines-code blame-code chroma"> 60 60 <code class="code-inner gt-pl-3">{{$row.Code}}</code> 61 61 </td> 62 62 </tr>
+2 -2
templates/repo/commit_page.tmpl
··· 19 19 {{end}} 20 20 <div class="ui top attached header clearing segment gt-relative commit-header {{$class}}"> 21 21 <div class="gt-df gt-mb-4 gt-fw"> 22 - <h3 class="gt-mb-0 gt-f1"><span class="commit-summary" title="{{.Commit.Summary}}">{{RenderCommitMessage $.Context .Commit.Message $.RepoLink $.Repository.ComposeMetas}}</span>{{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses "root" $}}</h3> 22 + <h3 class="gt-mb-0 gt-f1"><span class="commit-summary" title="{{.Commit.Summary}}">{{RenderCommitMessage $.Context .Commit.Message $.RepoLink $.Repository.ComposeMetas}}</span>{{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses "root" $}}</h3> 23 23 {{if not $.PageIsWiki}} 24 24 <div> 25 25 <a class="ui primary tiny button" href="{{.SourcePath}}"> ··· 70 70 "branchForm" "branch-dropdown-form" 71 71 "branchURLPrefix" (printf "%s/_cherrypick/%s/" $.RepoLink .CommitID) "branchURLSuffix" "" 72 72 "setAction" true "submitForm" true}} 73 - <form method="GET" action="{{$.RepoLink}}/_cherrypick/{{.CommitID}}/{{if $.BranchName}}{{PathEscapeSegments $.BranchName}}{{else}}{{PathEscapeSegments $.Repository.DefaultBranch}}{{end}}" id="branch-dropdown-form"> 73 + <form method="get" action="{{$.RepoLink}}/_cherrypick/{{.CommitID}}/{{if $.BranchName}}{{PathEscapeSegments $.BranchName}}{{else}}{{PathEscapeSegments $.Repository.DefaultBranch}}{{end}}" id="branch-dropdown-form"> 74 74 <input type="hidden" name="ref" value="{{if $.BranchName}}{{$.BranchName}}{{else}}{{$.Repository.DefaultBranch}}{{end}}"> 75 75 <input type="hidden" name="refType" value="branch"> 76 76 <input type="hidden" id="cherry-pick-type" name="cherry-pick-type"><br>
+3 -1
templates/repo/commits_list.tmpl
··· 52 52 {{if .Signature}} 53 53 {{template "repo/shabox_badge" dict "root" $ "verification" .Verification}} 54 54 {{end}} 55 - {{if $.Reponame}} 55 + {{if $.PageIsWiki}} 56 + </a> 57 + {{else if $.Reponame}} 56 58 </a> 57 59 {{else}} 58 60 </span>
+1 -6
templates/repo/diff/section_code.tmpl
··· 1 - <code {{if .diff.EscapeStatus.Escaped}}{{/* 2 - */}}class="code-inner has-escaped" {{/* 3 - */}}title="{{template "repo/diff/escape_title" .}}"{{/* 4 - */}}{{else}}{{/* 5 - */}}class="code-inner"{{/* 6 - */}}{{end}}>{{.diff.Content}}</code> 1 + <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>
+1 -1
templates/repo/diff/section_split.tmpl
··· 43 43 {{- $leftDiff := ""}}{{if $line.LeftIdx}}{{$leftDiff = $section.GetComputedInlineDiffFor $line $.root.locale}}{{end}} 44 44 {{- $rightDiff := ""}}{{if $match.RightIdx}}{{$rightDiff = $section.GetComputedInlineDiffFor $match $.root.locale}}{{end}} 45 45 <td class="lines-num lines-num-old del-code" data-line-num="{{$line.LeftIdx}}"><span rel="diff-{{$file.NameHash}}L{{$line.LeftIdx}}"></span></td> 46 - <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> 46 + <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> 47 47 <td class="lines-type-marker lines-type-marker-old del-code"><span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td> 48 48 <td class="lines-code lines-code-old del-code">{{/* 49 49 */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/*
+1 -1
templates/repo/diff/whitespace_dropdown.tmpl
··· 12 12 <label class="gt-pointer-events-none"> 13 13 <input class="gt-mr-3 gt-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "ignore-all"}} checked{{end}}> 14 14 {{.locale.Tr "repo.diff.whitespace_ignore_all_whitespace"}} 15 - <label> 15 + </label> 16 16 </a> 17 17 <a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=ignore-change"> 18 18 <label class="gt-pointer-events-none">
+2 -2
templates/repo/editor/cherry_pick.tmpl
··· 3 3 {{template "repo/header" .}} 4 4 <div class="ui container"> 5 5 {{template "base/alert" .}} 6 - <form class="ui edit form" method="post" action="{{.RepoLink}}/_cherrypick/{{.SHA}}/{{.BranchName | PathEscapeSegments}}"> 6 + <form class="ui edit form" method="post" action="{{.RepoLink}}/_cherrypick/{{.SHA}}/{{.BranchName | PathEscapeSegments}}"> 7 7 {{.CsrfTokenHtml}} 8 8 <input type="hidden" name="last_commit" value="{{.last_commit}}"> 9 9 <input type="hidden" name="page_has_posted" value="true"> ··· 11 11 <div class="repo-editor-header"> 12 12 <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}"> 13 13 {{$shaurl := printf "%s/commit/%s" $.RepoLink (PathEscape .SHA)}} 14 - {{$shalink := printf "<a class=\"ui primary sha label\" href=\"%s\">%s</a>" (Escape $shaurl) (ShortSha .SHA)}} 14 + {{$shalink := printf `<a class="ui primary sha label" href="%s">%s</a>` (Escape $shaurl) (ShortSha .SHA)}} 15 15 {{if eq .CherryPickType "revert"}} 16 16 {{.locale.Tr "repo.editor.revert" $shalink | Str2html}} 17 17 {{else}}
+1 -1
templates/repo/editor/patch.tmpl
··· 3 3 {{template "repo/header" .}} 4 4 <div class="ui container"> 5 5 {{template "base/alert" .}} 6 - <form class="ui edit form" method="post" action="{{.RepoLink}}/_diffpatch/{{.BranchName | PathEscapeSegments}}"> 6 + <form class="ui edit form" method="post" action="{{.RepoLink}}/_diffpatch/{{.BranchName | PathEscapeSegments}}"> 7 7 {{.CsrfTokenHtml}} 8 8 <input type="hidden" name="last_commit" value="{{.last_commit}}"> 9 9 <input type="hidden" name="page_has_posted" value="{{.PageHasPosted}}">
+1 -1
templates/repo/header.tmpl
··· 169 169 170 170 {{if .Permission.CanRead $.UnitTypeExternalTracker}} 171 171 <a class="{{if .PageIsIssueList}}active {{end}}item" href="{{.RepoExternalIssuesLink}}" target="_blank" rel="noopener noreferrer"> 172 - {{svg "octicon-link-external"}} {{.locale.Tr "repo.issues"}} </span> 172 + {{svg "octicon-link-external"}} {{.locale.Tr "repo.issues"}} 173 173 </a> 174 174 {{end}} 175 175
+1 -1
templates/repo/issue/branch_selector_field.tmpl
··· 1 1 {{if and (not .Issue.IsPull) (not .PageIsComparePull)}} 2 2 <input id="ref_selector" name="ref" type="hidden" value="{{.Reference}}"> 3 3 <input id="editing_mode" name="edit_mode" type="hidden" value="{{(or .IsIssueWriter .HasIssuesOrPullsWritePermission)}}"> 4 - <form method="POST" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/ref" id="update_issueref_form"> 4 + <form method="post" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/ref" id="update_issueref_form"> 5 5 {{$.CsrfTokenHtml}} 6 6 </form> 7 7
+1 -1
templates/repo/issue/choose.tmpl
··· 50 50 <div class="ui warning message"> 51 51 <div class="text left"> 52 52 <div>{{.locale.Tr "repo.issues.choose.invalid_config"}}</div> 53 - <diy>{{.IssueConfigError}}</div> 53 + <div>{{.IssueConfigError}}</div> 54 54 </div> 55 55 </div> 56 56 {{end}}
+1 -2
templates/repo/issue/labels.tmpl
··· 19 19 </div> 20 20 21 21 {{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}} 22 - {{template "repo/issue/labels/edit_delete_label" .}} 22 + {{template "repo/issue/labels/edit_delete_label" .}} 23 23 {{end}} 24 - </div> 25 24 {{template "base/footer" .}}
+6 -6
templates/repo/issue/view_content/comments.tmpl
··· 249 249 {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}} 250 250 <span class="text grey muted-links"> 251 251 {{template "shared/user/authorlink" .Poster}} 252 - {{$.locale.Tr "repo.issues.start_tracking_history" $createdStr | Safe}} 252 + {{$.locale.Tr "repo.issues.start_tracking_history" $createdStr | Safe}} 253 253 </span> 254 254 </div> 255 255 {{else if eq .Type 13}} ··· 258 258 {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}} 259 259 <span class="text grey muted-links"> 260 260 {{template "shared/user/authorlink" .Poster}} 261 - {{$.locale.Tr "repo.issues.stop_tracking_history" $createdStr | Safe}} 261 + {{$.locale.Tr "repo.issues.stop_tracking_history" $createdStr | Safe}} 262 262 </span> 263 263 {{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}} 264 264 <div class="detail"> ··· 272 272 {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}} 273 273 <span class="text grey muted-links"> 274 274 {{template "shared/user/authorlink" .Poster}} 275 - {{$.locale.Tr "repo.issues.add_time_history" $createdStr | Safe}} 275 + {{$.locale.Tr "repo.issues.add_time_history" $createdStr | Safe}} 276 276 </span> 277 277 {{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}} 278 278 <div class="detail"> ··· 286 286 {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}} 287 287 <span class="text grey muted-links"> 288 288 {{template "shared/user/authorlink" .Poster}} 289 - {{$.locale.Tr "repo.issues.cancel_tracking_history" $createdStr | Safe}} 289 + {{$.locale.Tr "repo.issues.cancel_tracking_history" $createdStr | Safe}} 290 290 </span> 291 291 </div> 292 292 {{else if eq .Type 16}} ··· 672 672 <span class="text grey muted-links"> 673 673 {{template "shared/user/authorlink" .Poster}} 674 674 675 - {{$.locale.Tr "repo.issues.del_time_history" $createdStr | Safe}} 675 + {{$.locale.Tr "repo.issues.del_time_history" $createdStr | Safe}} 676 676 </span> 677 677 <div class="detail"> 678 678 {{svg "octicon-clock"}} ··· 719 719 <span class="text grey muted-links"> 720 720 {{template "shared/user/authorlink" .Poster}} 721 721 {{if .IsForcePush}} 722 - {{$.locale.Tr "repo.issues.force_push_codes" ($.Issue.PullRequest.HeadBranch|Escape) (ShortSha .OldCommit) (($.Issue.Repo.CommitLink .OldCommit)|Escape) (ShortSha .NewCommit) (($.Issue.Repo.CommitLink .NewCommit)|Escape) $createdStr | Safe}} 722 + {{$.locale.Tr "repo.issues.force_push_codes" ($.Issue.PullRequest.HeadBranch|Escape) (ShortSha .OldCommit) (($.Issue.Repo.CommitLink .OldCommit)|Escape) (ShortSha .NewCommit) (($.Issue.Repo.CommitLink .NewCommit)|Escape) $createdStr | Safe}} 723 723 {{else}} 724 724 {{$.locale.TrN (len .Commits) "repo.issues.push_commit_1" "repo.issues.push_commits_n" (len .Commits) $createdStr | Safe}} 725 725 {{end}}
+1 -1
templates/repo/issue/view_content/comments_delete_time.tmpl
··· 3 3 {{if (or .ctxData.IsAdmin (and .ctxData.IsSigned (eq .ctxData.SignedUserID .comment.PosterID)))}} 4 4 <span class="ui float right"> 5 5 <div class="ui mini modal issue-delete-time-modal" data-id="{{.comment.Time.ID}}"> 6 - <form method="POST" class="delete-time-form" action="{{.ctxData.RepoLink}}/issues/{{.ctxData.Issue.Index}}/times/{{.comment.TimeID}}/delete"> 6 + <form method="post" class="delete-time-form" action="{{.ctxData.RepoLink}}/issues/{{.ctxData.Issue.Index}}/times/{{.comment.TimeID}}/delete"> 7 7 {{.ctxData.CsrfTokenHtml}} 8 8 </form> 9 9 <div class="header">{{.ctxData.locale.Tr "repo.issues.del_time"}}</div>
+9 -9
templates/repo/issue/view_content/sidebar.tmpl
··· 270 270 <div class="ui watching"> 271 271 <span class="text"><strong>{{.locale.Tr "notification.notifications"}}</strong></span> 272 272 <div class="gt-mt-3"> 273 - <form method="POST" action="{{.Issue.Link}}/watch"> 273 + <form method="post" action="{{.Issue.Link}}/watch"> 274 274 <input type="hidden" name="watch" value="{{if $.IssueWatch.IsWatching}}0{{else}}1{{end}}"> 275 275 {{$.CsrfTokenHtml}} 276 276 <button class="fluid ui button"> ··· 292 292 <div class="ui timetrack"> 293 293 <span class="text"><strong>{{.locale.Tr "repo.issues.tracker"}}</strong></span> 294 294 <div class="gt-mt-3"> 295 - <form method="POST" action="{{.Issue.Link}}/times/stopwatch/toggle" id="toggle_stopwatch_form"> 295 + <form method="post" action="{{.Issue.Link}}/times/stopwatch/toggle" id="toggle_stopwatch_form"> 296 296 {{$.CsrfTokenHtml}} 297 297 </form> 298 - <form method="POST" action="{{.Issue.Link}}/times/stopwatch/cancel" id="cancel_stopwatch_form"> 298 + <form method="post" action="{{.Issue.Link}}/times/stopwatch/cancel" id="cancel_stopwatch_form"> 299 299 {{$.CsrfTokenHtml}} 300 300 </form> 301 - {{if $.IsStopwatchRunning}} 301 + {{if $.IsStopwatchRunning}} 302 302 <button class="ui fluid button issue-stop-time">{{.locale.Tr "repo.issues.stop_tracking"}}</button> 303 303 <button class="ui fluid negative button issue-cancel-time gt-mt-3">{{.locale.Tr "repo.issues.cancel_tracking"}}</button> 304 304 {{else}} ··· 311 311 <div class="ui mini modal issue-start-time-modal"> 312 312 <div class="header">{{.locale.Tr "repo.issues.add_time"}}</div> 313 313 <div class="content"> 314 - <form method="POST" id="add_time_manual_form" action="{{.Issue.Link}}/times/add" class="ui action input fluid"> 314 + <form method="post" id="add_time_manual_form" action="{{.Issue.Link}}/times/add" class="ui action input fluid"> 315 315 {{$.CsrfTokenHtml}} 316 316 <input placeholder='{{.locale.Tr "repo.issues.add_time_hours"}}' type="number" name="hours"> 317 317 <input placeholder='{{.locale.Tr "repo.issues.add_time_minutes"}}' type="number" name="minutes" class="ui compact"> ··· 330 330 {{if gt (len .WorkingUsers) 0}} 331 331 <div class="ui divider"></div> 332 332 <div class="ui comments"> 333 - <span class="text"><strong>{{.locale.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time) | Safe}}</strong></span> 333 + <span class="text"><strong>{{.locale.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time) | Safe}}</strong></span> 334 334 <div> 335 335 {{range $user, $trackedtime := .WorkingUsers}} 336 336 <div class="comment gt-mt-3"> ··· 498 498 499 499 {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}} 500 500 <div> 501 - <form method="POST" action="{{.Issue.Link}}/dependency/add" id="addDependencyForm"> 501 + <form method="post" action="{{.Issue.Link}}/dependency/add" id="addDependencyForm"> 502 502 {{$.CsrfTokenHtml}} 503 503 <div class="ui fluid action input"> 504 504 <div class="ui search selection dropdown" id="new-dependency-drop-list" data-issue-id="{{.Issue.ID}}"> ··· 525 525 {{.locale.Tr "repo.issues.dependency.remove_header"}} 526 526 </div> 527 527 <div class="content"> 528 - <form method="POST" action="{{.Issue.Link}}/dependency/delete" id="removeDependencyForm"> 528 + <form method="post" action="{{.Issue.Link}}/dependency/delete" id="removeDependencyForm"> 529 529 {{$.CsrfTokenHtml}} 530 530 <input type="hidden" value="" name="removeDependencyID" id="removeDependencyID"> 531 531 <input type="hidden" value="" name="dependencyType" id="dependencyType"> ··· 556 556 <div class="ui divider"></div> 557 557 558 558 {{if or .PinEnabled .Issue.IsPinned}} 559 - <form class="gt-mt-2" method="POST" {{if $.NewPinAllowed}}action="{{.Issue.Link}}/pin"{{else}}data-tooltip-content="{{.locale.Tr "repo.issues.max_pinned"}}"{{end}}> 559 + <form class="gt-mt-2" method="post" {{if $.NewPinAllowed}}action="{{.Issue.Link}}/pin"{{else}}data-tooltip-content="{{.locale.Tr "repo.issues.max_pinned"}}"{{end}}> 560 560 {{$.CsrfTokenHtml}} 561 561 <button class="fluid ui button {{if not $.NewPinAllowed}}disabled{{end}}"> 562 562 {{if not .Issue.IsPinned}}
+2 -2
templates/repo/settings/lfs_locks.tmpl
··· 5 5 <a href="{{.LFSFilesLink}}">{{.locale.Tr "repo.settings.lfs"}}</a> / {{.locale.Tr "repo.settings.lfs_locks"}} ({{.locale.Tr "admin.total" .Total}}) 6 6 </h4> 7 7 <div class="ui attached segment"> 8 - <form class="ui form ignore-dirty" method="POST"> 8 + <form class="ui form ignore-dirty" method="post"> 9 9 {{$.CsrfTokenHtml}} 10 10 <div class="ui fluid action input"> 11 11 <input name="path" value="" placeholder="{{.locale.Tr "repo.settings.lfs_lock_path"}}" autofocus> ··· 37 37 </td> 38 38 <td>{{TimeSince .Created $.locale}}</td> 39 39 <td class="right aligned"> 40 - <form action="{{$.LFSFilesLink}}/locks/{{$lock.ID}}/unlock" method="POST"> 40 + <form action="{{$.LFSFilesLink}}/locks/{{$lock.ID}}/unlock" method="post"> 41 41 {{$.CsrfTokenHtml}} 42 42 <button class="ui primary button"><span class="btn-octicon">{{svg "octicon-lock"}}</span>{{$.locale.Tr "repo.settings.lfs_force_unlock"}}</button> 43 43 </form>
+26 -62
templates/repo/settings/options.tmpl
··· 285 285 <input type="hidden" name="action" value="advanced"> 286 286 287 287 {{$isCodeEnabled := .Repository.UnitEnabled $.Context $.UnitTypeCode}} 288 + {{$isCodeGlobalDisabled := .UnitTypeCode.UnitGlobalDisabled}} 288 289 <div class="inline field"> 289 290 <label>{{.locale.Tr "repo.code"}}</label> 290 - {{if .UnitTypeCode.UnitGlobalDisabled}} 291 - <div class="ui checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"> 292 - {{else}} 293 - <div class="ui checkbox"> 294 - {{end}} 291 + <div class="ui checkbox{{if $isCodeGlobalDisabled}} disabled{{end}}"{{if $isCodeGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}> 295 292 <input class="enable-system" name="enable_code" type="checkbox"{{if $isCodeEnabled}} checked{{end}}> 296 293 <label>{{.locale.Tr "repo.code.desc"}}</label> 297 294 </div> 298 295 </div> 299 296 300 297 {{$isWikiEnabled := or (.Repository.UnitEnabled $.Context $.UnitTypeWiki) (.Repository.UnitEnabled $.Context $.UnitTypeExternalWiki)}} 298 + {{$isWikiGlobalDisabled := .UnitTypeWiki.UnitGlobalDisabled}} 299 + {{$isExternalWikiGlobalDisabled := .UnitTypeExternalWiki.UnitGlobalDisabled}} 300 + {{$isBothWikiGlobalDisabled := and $isWikiGlobalDisabled $isBothWikiGlobalDisabled}} 301 301 <div class="inline field"> 302 302 <label>{{.locale.Tr "repo.wiki"}}</label> 303 - {{if and (.UnitTypeWiki.UnitGlobalDisabled) (.UnitTypeExternalWiki.UnitGlobalDisabled)}} 304 - <div class="ui checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"> 305 - {{else}} 306 - <div class="ui checkbox"> 307 - {{end}} 303 + <div class="ui checkbox{{if $isBothWikiGlobalDisabled}} disabled{{end}}"{{if $isBothWikiGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}> 308 304 <input class="enable-system" name="enable_wiki" type="checkbox" data-target="#wiki_box" {{if $isWikiEnabled}}checked{{end}}> 309 305 <label>{{.locale.Tr "repo.settings.wiki_desc"}}</label> 310 306 </div> 311 307 </div> 312 - <div class="field {{if not $isWikiEnabled}}disabled{{end}}" id="wiki_box"> 308 + <div class="field{{if not $isWikiEnabled}} disabled{{end}}" id="wiki_box"> 313 309 <div class="field"> 314 - {{if .UnitTypeWiki.UnitGlobalDisabled}} 315 - <div class="ui radio checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"> 316 - {{else}} 317 - <div class="ui radio checkbox"> 318 - {{end}} 310 + <div class="ui radio checkbox{{if $isWikiGlobalDisabled}} disabled{{end}}"{{if $isWikiGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}> 319 311 <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}}> 320 312 <label>{{.locale.Tr "repo.settings.use_internal_wiki"}}</label> 321 313 </div> 322 314 </div> 323 315 <div class="field"> 324 - {{if .UnitTypeExternalWiki.UnitGlobalDisabled}} 325 - <div class="ui radio checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"> 326 - {{else}} 327 - <div class="ui radio checkbox"> 328 - {{end}} 316 + <div class="ui radio checkbox{{if $isExternalWikiGlobalDisabled}} disabled{{end}}"{{if $isExternalWikiGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}> 329 317 <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}}> 330 318 <label>{{.locale.Tr "repo.settings.use_external_wiki"}}</label> 331 319 </div> ··· 340 328 <div class="ui divider"></div> 341 329 342 330 {{$isIssuesEnabled := or (.Repository.UnitEnabled $.Context $.UnitTypeIssues) (.Repository.UnitEnabled $.Context $.UnitTypeExternalTracker)}} 331 + {{$isIssuesGlobalDisabled := .UnitTypeIssues.UnitGlobalDisabled}} 332 + {{$isExternalTrackerGlobalDisabled := .UnitTypeExternalTracker.UnitGlobalDisabled}} 333 + {{$isIssuesAndExternalGlobalDisabled := and $isIssuesGlobalDisabled $isExternalTrackerGlobalDisabled}} 343 334 <div class="inline field"> 344 335 <label>{{.locale.Tr "repo.issues"}}</label> 345 - {{if and (.UnitTypeIssues.UnitGlobalDisabled) (.UnitTypeExternalTracker.UnitGlobalDisabled)}} 346 - <div class="ui checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"> 347 - {{else}} 348 - <div class="ui checkbox"> 349 - {{end}} 336 + <div class="ui checkbox{{if $isIssuesAndExternalGlobalDisabled}} disabled{{end}}"{{if $isIssuesAndExternalGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}> 350 337 <input class="enable-system" name="enable_issues" type="checkbox" data-target="#issue_box" {{if $isIssuesEnabled}}checked{{end}}> 351 338 <label>{{.locale.Tr "repo.settings.issues_desc"}}</label> 352 339 </div> 353 340 </div> 354 341 <div class="field {{if not $isIssuesEnabled}}disabled{{end}}" id="issue_box"> 355 342 <div class="field"> 356 - {{if .UnitTypeIssues.UnitGlobalDisabled}} 357 - <div class="ui radio checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"> 358 - {{else}} 359 - <div class="ui radio checkbox"> 360 - {{end}} 343 + <div class="ui radio checkbox{{if $isIssuesGlobalDisabled}} disabled{{end}}"{{if $isIssuesGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}> 361 344 <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}}> 362 345 <label>{{.locale.Tr "repo.settings.use_internal_issue_tracker"}}</label> 363 346 </div> ··· 389 372 </div> 390 373 </div> 391 374 <div class="field"> 392 - {{if .UnitTypeExternalTracker.UnitGlobalDisabled}} 393 - <div class="ui radio checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"> 394 - {{else}} 395 - <div class="ui radio checkbox"> 396 - {{end}} 375 + <div class="ui radio checkbox{{if $isExternalTrackerGlobalDisabled}} disabled{{end}}"{{if $isExternalTrackerGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}> 397 376 <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}}> 398 377 <label>{{.locale.Tr "repo.settings.use_external_issue_tracker"}}</label> 399 378 </div> ··· 406 385 </div> 407 386 <div class="field"> 408 387 <label for="tracker_url_format">{{.locale.Tr "repo.settings.tracker_url_format"}}</label> 409 - <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}"> 388 + <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}"> 410 389 <p class="help">{{.locale.Tr "repo.settings.tracker_url_format_desc" | Str2html}}</p> 411 390 </div> 412 391 <div class="inline fields"> ··· 443 422 <div class="ui divider"></div> 444 423 445 424 {{$isProjectsEnabled := .Repository.UnitEnabled $.Context $.UnitTypeProjects}} 425 + {{$isProjectsGlobalDisabled := .UnitTypeProjects.UnitGlobalDisabled}} 446 426 <div class="inline field"> 447 427 <label>{{.locale.Tr "repo.project_board"}}</label> 448 - {{if .UnitTypeProjects.UnitGlobalDisabled}} 449 - <div class="ui checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"> 450 - {{else}} 451 - <div class="ui checkbox"> 452 - {{end}} 428 + <div class="ui checkbox{{if $isProjectsGlobalDisabled}} disabled{{end}}"{{if $isProjectsGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}> 453 429 <input class="enable-system" name="enable_projects" type="checkbox" {{if $isProjectsEnabled}}checked{{end}}> 454 430 <label>{{.locale.Tr "repo.settings.projects_desc"}}</label> 455 431 </div> 456 432 </div> 457 433 458 434 {{$isReleasesEnabled := .Repository.UnitEnabled $.Context $.UnitTypeReleases}} 435 + {{$isReleasesGlobalDisabled := .UnitTypeReleases.UnitGlobalDisabled}} 459 436 <div class="inline field"> 460 437 <label>{{.locale.Tr "repo.releases"}}</label> 461 - {{if .UnitTypeReleases.UnitGlobalDisabled}} 462 - <div class="ui checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"> 463 - {{else}} 464 - <div class="ui checkbox"> 465 - {{end}} 438 + <div class="ui checkbox{{if $isReleasesGlobalDisabled}} disabled{{end}}"{{if $isReleasesGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}> 466 439 <input class="enable-system" name="enable_releases" type="checkbox" {{if $isReleasesEnabled}}checked{{end}}> 467 440 <label>{{.locale.Tr "repo.settings.releases_desc"}}</label> 468 441 </div> 469 442 </div> 470 443 471 444 {{$isPackagesEnabled := .Repository.UnitEnabled $.Context $.UnitTypePackages}} 445 + {{$isPackagesGlobalDisabled := .UnitTypePackages.UnitGlobalDisabled}} 472 446 <div class="inline field"> 473 447 <label>{{.locale.Tr "repo.packages"}}</label> 474 - {{if .UnitTypePackages.UnitGlobalDisabled}} 475 - <div class="ui checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"> 476 - {{else}} 477 - <div class="ui checkbox"> 478 - {{end}} 448 + <div class="ui checkbox{{if $isPackagesGlobalDisabled}} disabled{{end}}"{{if $isPackagesGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}> 479 449 <input class="enable-system" name="enable_packages" type="checkbox" {{if $isPackagesEnabled}}checked{{end}}> 480 450 <label>{{.locale.Tr "repo.settings.packages_desc"}}</label> 481 451 </div> ··· 483 453 484 454 {{if .EnableActions}} 485 455 {{$isActionsEnabled := .Repository.UnitEnabled $.Context $.UnitTypeActions}} 456 + {{$isActionsGlobalDisabled := .UnitTypeActions.UnitGlobalDisabled}} 486 457 <div class="inline field"> 487 458 <label>{{.locale.Tr "actions.actions"}}</label> 488 - {{if .UnitTypeActions.UnitGlobalDisabled}} 489 - <div class="ui checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"> 490 - {{else}} 491 - <div class="ui checkbox"> 492 - {{end}} 459 + <div class="ui checkbox{{if $isActionsGlobalDisabled}} disabled{{end}}"{{if $isActionsGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}> 493 460 <input class="enable-system" name="enable_actions" type="checkbox" {{if $isActionsEnabled}}checked{{end}}> 494 461 <label>{{.locale.Tr "repo.settings.actions_desc"}}</label> 495 462 </div> ··· 499 466 {{if not .IsMirror}} 500 467 <div class="ui divider"></div> 501 468 {{$pullRequestEnabled := .Repository.UnitEnabled $.Context $.UnitTypePullRequests}} 469 + {{$pullRequestGlobalDisabled := .UnitTypePullRequests.UnitGlobalDisabled}} 502 470 {{$prUnit := .Repository.MustGetUnit $.Context $.UnitTypePullRequests}} 503 471 <div class="inline field"> 504 472 <label>{{.locale.Tr "repo.pulls"}}</label> 505 - {{if .UnitTypePullRequests.UnitGlobalDisabled}} 506 - <div class="ui checkbox disabled" data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"> 507 - {{else}} 508 - <div class="ui checkbox"> 509 - {{end}} 473 + <div class="ui checkbox{{if $pullRequestGlobalDisabled}} disabled{{end}}"{{if $pullRequestGlobalDisabled}} data-tooltip-content="{{.locale.Tr "repo.unit_disabled"}}"{{end}}> 510 474 <input class="enable-system" name="enable_pulls" type="checkbox" data-target="#pull_box" {{if $pullRequestEnabled}}checked{{end}}> 511 475 <label>{{.locale.Tr "repo.settings.pulls_desc"}}</label> 512 476 </div>
+1 -1
templates/repo/settings/webhook/base_list.tmpl
··· 50 50 <div class="item truncated-item-container"> 51 51 <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> 52 52 <a class="text truncate gt-f1 gt-mr-3" title="{{.URL}}" href="{{$.BaseLink}}/{{.ID}}">{{.URL}}</a> 53 - <a class="muted gt-p-3" href="{{$.BaseLink}}/{{.ID}}">{{svg "octicon-pencil"}}</a></span> 53 + <a class="muted gt-p-3" href="{{$.BaseLink}}/{{.ID}}">{{svg "octicon-pencil"}}</a> 54 54 <a class="delete-button gt-p-3" data-url="{{$.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}}</a> 55 55 </div> 56 56 {{end}}
+2 -2
templates/repo/settings/webhook/discord.tmpl
··· 8 8 </div> 9 9 <div class="field"> 10 10 <label for="username">{{.locale.Tr "repo.settings.discord_username"}}</label> 11 - <input id="username" name="username" value="{{.DiscordHook.Username}}" placeholder="e.g. Gitea"> 11 + <input id="username" name="username" value="{{.DiscordHook.Username}}" placeholder="Gitea"> 12 12 </div> 13 13 <div class="field"> 14 14 <label for="icon_url">{{.locale.Tr "repo.settings.discord_icon_url"}}</label> 15 - <input id="icon_url" name="icon_url" value="{{.DiscordHook.IconURL}}" placeholder="e.g. https://example.com/assets/img/logo.svg"> 15 + <input id="icon_url" name="icon_url" value="{{.DiscordHook.IconURL}}" placeholder="https://example.com/assets/img/logo.svg"> 16 16 </div> 17 17 {{template "repo/settings/webhook/settings" .}} 18 18 </form>
+1 -2
templates/repo/settings/webhook/history.tmpl
··· 3 3 {{.locale.Tr "repo.settings.recent_deliveries"}} 4 4 {{if .Permission.IsAdmin}} 5 5 <div class="ui right"> 6 - <button class="ui teal tiny button" id="test-delivery" data-tooltip-content= 7 - "{{.locale.Tr "repo.settings.webhook.test_delivery_desc"}}" data-link="{{.Link}}/test" data-redirect="{{.Link}}">{{.locale.Tr "repo.settings.webhook.test_delivery"}}</button> 6 + <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> 8 7 </div> 9 8 {{end}} 10 9 </h4>
+3 -3
templates/repo/settings/webhook/packagist.tmpl
··· 4 4 {{.CsrfTokenHtml}} 5 5 <div class="required field {{if .Err_Username}}error{{end}}"> 6 6 <label for="username">{{.locale.Tr "repo.settings.packagist_username"}}</label> 7 - <input id="username" name="username" value="{{.PackagistHook.Username}}" placeholder="e.g. Gitea" autofocus required> 7 + <input id="username" name="username" value="{{.PackagistHook.Username}}" placeholder="Gitea" autofocus required> 8 8 </div> 9 9 <div class="required field {{if .Err_APIToken}}error{{end}}"> 10 10 <label for="api_token">{{.locale.Tr "repo.settings.packagist_api_token"}}</label> 11 - <input id="api_token" name="api_token" value="{{.PackagistHook.APIToken}}" placeholder="e.g. X5F_tZ-Wj3c1vqaU2Rky" required> 11 + <input id="api_token" name="api_token" value="{{.PackagistHook.APIToken}}" placeholder="X5F_tZ-Wj3c1vqaU2Rky" required> 12 12 </div> 13 13 <div class="required field {{if .Err_PackageURL}}error{{end}}"> 14 14 <label for="package_url">{{.locale.Tr "repo.settings.packagist_package_url"}}</label> 15 - <input id="package_url" name="package_url" value="{{.PackagistHook.PackageURL}}" placeholder="e.g. https://packagist.org/packages/laravel/framework" required> 15 + <input id="package_url" name="package_url" value="{{.PackagistHook.PackageURL}}" placeholder="https://packagist.org/packages/laravel/framework" required> 16 16 </div> 17 17 {{template "repo/settings/webhook/settings" .}} 18 18 </form>
+4 -4
templates/repo/settings/webhook/slack.tmpl
··· 8 8 </div> 9 9 <div class="required field {{if .Err_Channel}}error{{end}}"> 10 10 <label for="channel">{{.locale.Tr "repo.settings.slack_channel"}}</label> 11 - <input id="channel" name="channel" value="{{.SlackHook.Channel}}" placeholder="e.g. #general" required> 11 + <input id="channel" name="channel" value="{{.SlackHook.Channel}}" placeholder="#general" required> 12 12 </div> 13 13 14 14 <div class="field"> 15 15 <label for="username">{{.locale.Tr "repo.settings.slack_username"}}</label> 16 - <input id="username" name="username" value="{{.SlackHook.Username}}" placeholder="e.g. Gitea"> 16 + <input id="username" name="username" value="{{.SlackHook.Username}}" placeholder="Gitea"> 17 17 </div> 18 18 <div class="field"> 19 19 <label for="icon_url">{{.locale.Tr "repo.settings.slack_icon_url"}}</label> 20 - <input id="icon_url" name="icon_url" value="{{.SlackHook.IconURL}}" placeholder="e.g. https://example.com/img/favicon.png"> 20 + <input id="icon_url" name="icon_url" value="{{.SlackHook.IconURL}}" placeholder="https://example.com/img/favicon.png"> 21 21 </div> 22 22 <div class="field"> 23 23 <label for="color">{{.locale.Tr "repo.settings.slack_color"}}</label> 24 - <input id="color" name="color" value="{{.SlackHook.Color}}" placeholder="e.g. #dd4b39, good, warning, danger"> 24 + <input id="color" name="color" value="{{.SlackHook.Color}}" placeholder="#dd4b39, good, warning, danger"> 25 25 </div> 26 26 {{template "repo/settings/webhook/settings" .}} 27 27 </form>
+1 -1
templates/shared/actions/runner_list.tmpl
··· 65 65 <td>{{.ID}}</td> 66 66 <td><p data-tooltip-content="{{.Description}}">{{.Name}}</p></td> 67 67 <td>{{if .Version}}{{.Version}}{{else}}{{$.locale.Tr "unknown"}}{{end}}</td> 68 - <td><span data-tooltip-content="{{.BelongsToOwnerName}}">{{.BelongsToOwnerType.LocaleString $.locale}}<span></td> 68 + <td><span data-tooltip-content="{{.BelongsToOwnerName}}">{{.BelongsToOwnerType.LocaleString $.locale}}</span></td> 69 69 <td class="runner-tags"> 70 70 {{range .AgentLabels}}<span class="ui label">{{.}}</span>{{end}} 71 71 </td>
+1 -1
templates/status/404.tmpl
··· 5 5 <p style="margin-top: 100px"><img src="{{AssetUrlPrefix}}/img/404.png" alt="404"></p> 6 6 <div class="ui divider"></div> 7 7 <br> 8 - <p>{{.locale.Tr "error404" | Safe}} 8 + <p>{{.locale.Tr "error404" | Safe}}</p> 9 9 {{if .ShowFooterVersion}}<p>{{.locale.Tr "admin.config.app_ver"}}: {{AppVer}}</p>{{end}} 10 10 </div> 11 11 </div>
+1 -1
templates/status/500.tmpl
··· 37 37 {{end}} 38 38 <div class="center gt-mt-5"> 39 39 {{if or .SignedUser.IsAdmin .ShowFooterVersion}}<p>{{.locale.Tr "admin.config.app_ver"}}: {{AppVer}}</p>{{end}} 40 - {{if .SignedUser.IsAdmin}}<p>{{.locale.Tr "error.report_message" | Str2html}}</p>{{end}} 40 + {{if .SignedUser.IsAdmin}}<p>{{.locale.Tr "error.report_message" | Str2html}}</p>{{end}} 41 41 </div> 42 42 </div> 43 43 </div>
+4 -4
templates/user/notification/notification_div.tmpl
··· 12 12 </a> 13 13 </div> 14 14 {{if and (eq .Status 1)}} 15 - <form action="{{AppSubUrl}}/notifications/purge" method="POST"> 15 + <form action="{{AppSubUrl}}/notifications/purge" method="post"> 16 16 {{$.CsrfTokenHtml}} 17 17 <div class="{{if not $notificationUnreadCount}}gt-hidden{{end}}"> 18 18 <button class="ui mini button primary gt-mr-0" title='{{$.locale.Tr "notification.mark_all_as_read"}}'> ··· 70 70 </div> 71 71 <div class="notifications-buttons gt-ac gt-je gt-gap-2 gt-px-2"> 72 72 {{if ne .Status 3}} 73 - <form action="{{AppSubUrl}}/notifications/status" method="POST"> 73 + <form action="{{AppSubUrl}}/notifications/status" method="post"> 74 74 {{$.CsrfTokenHtml}} 75 75 <input type="hidden" name="notification_id" value="{{.ID}}"> 76 76 <input type="hidden" name="status" value="pinned"> ··· 85 85 </form> 86 86 {{end}} 87 87 {{if or (eq .Status 1) (eq .Status 3)}} 88 - <form action="{{AppSubUrl}}/notifications/status" method="POST"> 88 + <form action="{{AppSubUrl}}/notifications/status" method="post"> 89 89 {{$.CsrfTokenHtml}} 90 90 <input type="hidden" name="notification_id" value="{{.ID}}"> 91 91 <input type="hidden" name="status" value="read"> ··· 100 100 </button> 101 101 </form> 102 102 {{else if eq .Status 2}} 103 - <form action="{{AppSubUrl}}/notifications/status" method="POST"> 103 + <form action="{{AppSubUrl}}/notifications/status" method="post"> 104 104 {{$.CsrfTokenHtml}} 105 105 <input type="hidden" name="notification_id" value="{{.ID}}"> 106 106 <input type="hidden" name="status" value="unread">
+1 -1
templates/user/settings/keys_gpg.tmpl
··· 18 18 <p>{{.locale.Tr "settings.gpg_token_required"}}</p> 19 19 </div> 20 20 <div class="field"> 21 - <label for="token">{{.locale.Tr "settings.gpg_token"}} 21 + <label for="token">{{.locale.Tr "settings.gpg_token"}}</label> 22 22 <input readonly="" value="{{.TokenToSign}}"> 23 23 <div class="help"> 24 24 <p>{{.locale.Tr "settings.gpg_token_help"}}</p>
-1
templates/user/settings/packages.tmpl
··· 21 21 </div> 22 22 </div> 23 23 </div> 24 - </div> 25 24 {{template "user/settings/layout_footer" .}}
+2 -2
templates/user/settings/repos.tmpl
··· 42 42 <div class="content"> 43 43 <p>{{$.locale.Tr "repo.adopt_preexisting_content" $dir}}</p> 44 44 </div> 45 - <form class="ui form" method="POST" action="{{AppSubUrl}}/user/settings/repos/unadopted"> 45 + <form class="ui form" method="post" action="{{AppSubUrl}}/user/settings/repos/unadopted"> 46 46 {{$.CsrfTokenHtml}} 47 47 <input type="hidden" name="id" value="{{$dir}}"> 48 48 <input type="hidden" name="action" value="adopt"> ··· 59 59 <div class="content"> 60 60 <p>{{$.locale.Tr "repo.delete_preexisting_content" $dir}}</p> 61 61 </div> 62 - <form class="ui form" method="POST" action="{{AppSubUrl}}/user/settings/repos/unadopted"> 62 + <form class="ui form" method="post" action="{{AppSubUrl}}/user/settings/repos/unadopted"> 63 63 {{$.CsrfTokenHtml}} 64 64 <input type="hidden" name="id" value="{{$dir}}"> 65 65 <input type="hidden" name="action" value="delete">
-1
templates/user/settings/security/openid.tmpl
··· 28 28 {{$.locale.Tr "settings.show_openid"}} 29 29 </button> 30 30 {{end}} 31 - </button> 32 31 </form> 33 32 </div> 34 33 <div class="content">
+2 -2
templates/user/settings/security/twofa_enroll.tmpl
··· 6 6 <div class="ui attached segment"> 7 7 <p>{{.locale.Tr "settings.scan_this_image"}}</p> 8 8 <img src="{{.QrUri}}" alt="{{.TwofaSecret}}"> 9 - <p>{{.locale.Tr "settings.or_enter_secret" .TwofaSecret}} 10 - <p>{{.locale.Tr "settings.then_enter_passcode"}} 9 + <p>{{.locale.Tr "settings.or_enter_secret" .TwofaSecret}}</p> 10 + <p>{{.locale.Tr "settings.then_enter_passcode"}}</p> 11 11 <form class="ui form" action="{{.Link}}" method="post"> 12 12 {{.CsrfTokenHtml}} 13 13 <div class="inline required field {{if .Err_Passcode}}error{{end}}">