mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-26 06:16:56 +09:00
Move the remaining legacy init code, which probed page classes with `querySelector`, to `data-global-init`, so each feature initializes from its own element. `hashchange` listeners now go through one module that runs them in priority order, because independent listeners broke when mount order changed. - Convert issue list, diff, repo create, settings and org team inits to `data-global-init` - Run `hashchange` listeners by priority, the diff scroll handler last - Make the devtest mock's failing log requests deterministic - Add e2e tests for diff tree navigation to folded files and job log permalinks --------- Co-authored-by: silverwind <me@silverwind.io>
27 lines
1.2 KiB
Handlebars
27 lines
1.2 KiB
Handlebars
{{template "repo/settings/layout_head" (dict "pageClass" "repository settings edit githook")}}
|
|
<div class="repo-setting-content">
|
|
<form class="ui form" action="{{.Link}}" method="post" data-global-init="initRepoSettingsGitHook">
|
|
<h4 class="ui top attached header flex-left-right">
|
|
{{.Hook.Name}}
|
|
<div class="tw-font-normal tw-font-sans tw-text-base">
|
|
{{template "repo/editor/options" dict "CodeEditorConfig" $.CodeEditorConfig}}
|
|
</div>
|
|
</h4>
|
|
<div class="ui attached segment">
|
|
{{ctx.Locale.Tr "repo.settings.githook_edit_desc"}}
|
|
</div>
|
|
<div class="ui attached fitted segment">
|
|
{{with .Hook}}
|
|
<textarea id="content" name="content" class="tw-hidden"
|
|
data-code-editor-config="{{JsonUtils.EncodeToString $.CodeEditorConfig}}"
|
|
placeholder="{{ctx.Locale.Tr "editor.code_editor.placeholder"}}">{{if .IsActive}}{{.Content}}{{else}}{{.Sample}}{{end}}</textarea>
|
|
<div class="editor-loading is-loading"></div>
|
|
{{end}}
|
|
</div>
|
|
<div class="ui attached segment">
|
|
<button type="submit" class="ui primary button">{{ctx.Locale.Tr "repo.settings.update_githook"}}</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{{template "repo/settings/layout_footer" .}}
|