Files
gitea/templates/devtest/form-fields.tmpl
Giteabot b37e098ff0 Indicate form field readonly via background, fix RunUser config (#37175, #37180) (#37184)
Backport #37175 by @silverwind

The `Run As Username` field on the install page was a `readonly` input
that looked editable but wasn't, confusing users. Style `readonly`
inputs with a subtle background, matching other frameworks.

<img width="735" height="131" alt="image"
src="https://github.com/user-attachments/assets/cb76ce71-faab-4300-811e-e4c503b59f9a"
/>

Backport #37180

The comment "so just use current one if config says default" is not
right anymore: "git" isn't the "default" value of RunUser (Comment out
app.example.ini #15807). The RunUser's value is from current session's
username.

Fixes #37174

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-04-12 18:53:09 -07:00

110 lines
3.2 KiB
Handlebars

{{template "devtest/devtest-header"}}
<div class="page-content devtest ui container">
<form class="ui form left-right-form">
<h4 class="ui dividing header">Input</h4>
<div class="inline field">
<label>Normal</label>
<input type="text" value="value">
</div>
<div class="inline field">
<label>Readonly</label>
<input type="text" value="value" readonly>
</div>
<div class="inline disabled field">
<label>Disabled</label>
<input type="text" value="value" disabled>
</div>
<div class="inline field error">
<label>Error</label>
<input type="text" value="value">
</div>
<h4 class="ui dividing header">Textarea</h4>
<div class="inline field">
<label>Normal</label>
<textarea rows="2">value</textarea>
</div>
<div class="inline field">
<label>Readonly</label>
<textarea rows="2" readonly>value</textarea>
</div>
<div class="inline disabled field">
<label>Disabled</label>
<textarea rows="2" disabled>value</textarea>
</div>
<div class="inline field error">
<label>Error</label>
<textarea rows="2">value</textarea>
</div>
<h4 class="ui dividing header">Dropdown</h4>
<div class="inline field">
<label>Normal</label>
<div class="ui selection dropdown">
<input type="hidden" value="a">
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="text">Option A</div>
<div class="menu">
<div class="item" data-value="a">Option A</div>
<div class="item" data-value="b">Option B</div>
</div>
</div>
</div>
<div class="inline field">
<label>Readonly</label>
<div class="ui selection dropdown" readonly>
<input type="hidden" value="a">
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="text">Option A</div>
<div class="menu">
<div class="item" data-value="a">Option A</div>
<div class="item" data-value="b">Option B</div>
</div>
</div>
</div>
<div class="inline disabled field">
<label>Disabled</label>
<div class="ui selection dropdown">
<input type="hidden" value="a">
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="text">Option A</div>
<div class="menu">
<div class="item" data-value="a">Option A</div>
<div class="item" data-value="b">Option B</div>
</div>
</div>
</div>
<div class="inline field error">
<label>Error</label>
<div class="ui selection dropdown">
<input type="hidden" value="a">
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="text">Option A</div>
<div class="menu">
<div class="item" data-value="a">Option A</div>
<div class="item" data-value="b">Option B</div>
</div>
</div>
</div>
<h4 class="ui dividing header">Required</h4>
<div class="inline required field">
<label>Normal</label>
<input type="text" value="value">
</div>
<div class="inline required field">
<label>Readonly</label>
<input type="text" value="value" readonly>
</div>
<div class="inline required disabled field">
<label>Disabled</label>
<input type="text" value="value" disabled>
</div>
<div class="inline required field error">
<label>Error</label>
<input type="text" value="value">
</div>
</form>
</div>
{{template "devtest/devtest-footer"}}