mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-15 09:47:39 +08:00
68ec9b4859
This will conclude the refactor of 1:1 class replacements to tailwind, except `gt-hidden`. Commands ran: ```bash perl -p -i -e 's#gt-(p|m)([lrtbxy])?-0#tw-$1$2-0#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-1#tw-$1$2-0.5#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-2#tw-$1$2-1#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-3#tw-$1$2-2#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-4#tw-$1$2-4#g' {web_src/js,templates,routers,services}/**/* perl -p -i -e 's#gt-(p|m)([lrtbxy])?-5#tw-$1$2-8#g' {web_src/js,templates,routers,services}/**/* ```
25 lines
1007 B
Handlebars
25 lines
1007 B
Handlebars
{{$useMarkdownEditor := not .item.Attributes.render}}
|
|
<div class="field {{if not .item.VisibleOnForm}}gt-hidden{{end}} {{if $useMarkdownEditor}}combo-editor-dropzone{{end}}">
|
|
{{template "repo/issue/fields/header" .}}
|
|
|
|
{{/* the real form element to provide the value */}}
|
|
<textarea class="form-field-real" name="form-field-{{.item.ID}}" placeholder="{{.item.Attributes.placeholder}}" {{if and .item.Validations.required}}required{{end}}>{{.item.Attributes.value}}</textarea>
|
|
|
|
{{if $useMarkdownEditor}}
|
|
{{template "shared/combomarkdowneditor" (dict
|
|
"ContainerClasses" "gt-hidden"
|
|
"MarkdownPreviewUrl" (print .root.RepoLink "/markup")
|
|
"MarkdownPreviewContext" .root.RepoLink
|
|
"TextareaContent" .item.Attributes.value
|
|
"TextareaPlaceholder" .item.Attributes.placeholder
|
|
"DropzoneParentContainer" ".combo-editor-dropzone"
|
|
)}}
|
|
|
|
{{if .root.IsAttachmentEnabled}}
|
|
<div class="tw-mt-4 form-field-dropzone gt-hidden">
|
|
{{template "repo/upload" .root}}
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|