mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-04 08:17:24 -05:00
Change dropdown menus to radio buttons
Co-authored-by: João Tiago <joao.leal.tintas@tecnico.ulisboa.pt>
This commit is contained in:
parent
fe2d0f8c94
commit
1b3b35def8
@ -1,59 +1,96 @@
|
|||||||
{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings notifications")}}
|
{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings notifications")}}
|
||||||
<div class="user-setting-content">
|
<div class="user-setting-content">
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{ctx.Locale.Tr "settings.manage_notifications"}}
|
{{ctx.Locale.Tr "settings.manage_notifications"}}
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<div class="ui attached segment">
|
<div class="ui attached segment">
|
||||||
<div class="ui list">
|
<div class="ui list">
|
||||||
{{if $.EnableNotifyMail}}
|
{{if $.EnableNotifyMail}}
|
||||||
<div class="item">
|
<h5 class="ui dividing header">{{ctx.Locale.Tr "settings.email_notifications_desc"}}</h5>
|
||||||
<div class="tw-mb-2">{{ctx.Locale.Tr "settings.email_notifications_desc"}}</div>
|
|
||||||
<form action="{{AppSubUrl}}/user/settings/notifications" class="ui form" method="post">
|
<form action="{{AppSubUrl}}/user/settings/notifications" class="ui form" method="post">
|
||||||
{{$.CsrfTokenHtml}}
|
{{$.CsrfTokenHtml}}
|
||||||
<input name="_method" type="hidden" value="EMAIL">
|
<input name="_method" type="hidden" value="EMAIL">
|
||||||
<div class="tw-flex tw-flex-wrap tw-gap-2">
|
|
||||||
<div class="ui selection dropdown">
|
|
||||||
<input name="preference" type="hidden" value="{{.EmailNotificationsPreference}}">
|
<div class="field">
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
<div class="ui radio checkbox">
|
||||||
<div class="text"></div>
|
<input name="preference" type="radio" value="disabled" class="toggle-target-disabled" {{if eq
|
||||||
<div class="menu">
|
.EmailNotificationsPreference "disabled"}}checked{{end}}>
|
||||||
<div data-value="enabled" class="{{if eq .EmailNotificationsPreference "enabled"}}active selected {{end}}item">{{ctx.Locale.Tr "settings.notifications.enable"}}</div>
|
<label>{{ctx.Locale.Tr "settings.notifications.disable"}}</label>
|
||||||
<div data-value="andyourown" class="{{if eq .EmailNotificationsPreference "andyourown"}}active selected {{end}}item">{{ctx.Locale.Tr "settings.notifications.andyourown"}}</div>
|
|
||||||
<div data-value="onmention" class="{{if eq .EmailNotificationsPreference "onmention"}}active selected {{end}}item">{{ctx.Locale.Tr "settings.notifications.onmention"}}</div>
|
|
||||||
<div data-value="disabled" class="{{if eq .EmailNotificationsPreference "disabled"}}active selected {{end}}item">{{ctx.Locale.Tr "settings.notifications.disable"}}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui radio checkbox">
|
||||||
|
<input name="preference" type="radio" value="enabled" class="toggle-target-disabled" {{if eq
|
||||||
|
.EmailNotificationsPreference "enabled"}}checked{{end}}>
|
||||||
|
<label>{{ctx.Locale.Tr "settings.notifications.enable"}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui radio checkbox">
|
||||||
|
<input name="preference" type="radio" value="andyourown" class="toggle-target-disabled" {{if eq
|
||||||
|
.EmailNotificationsPreference "andyourown"}}checked{{end}}>
|
||||||
|
<label>{{ctx.Locale.Tr "settings.notifications.andyourown"}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui radio checkbox">
|
||||||
|
<input name="preference" type="radio" value="onmention" class="toggle-target-disabled" {{if eq
|
||||||
|
.EmailNotificationsPreference "onmention"}}checked{{end}}>
|
||||||
|
<label>{{ctx.Locale.Tr "settings.notifications.onmention"}}</label>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
<button class="ui primary button">{{ctx.Locale.Tr "settings.notifications.submit_email"}}</button>
|
<button class="ui primary button">{{ctx.Locale.Tr "settings.notifications.submit_email"}}</button>
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui attached segment">
|
|
||||||
|
<div class="ui attached segment">
|
||||||
<div class="ui list">
|
<div class="ui list">
|
||||||
<div class="item">
|
<h5 class="ui dividing header">{{ctx.Locale.Tr "settings.ui_notifications_desc"}}</h5>
|
||||||
<div class="tw-mb-2">{{ctx.Locale.Tr "settings.ui_notifications_desc"}}</div>
|
|
||||||
<form action="{{AppSubUrl}}/user/settings/notifications" class="ui form" method="post">
|
<form action="{{AppSubUrl}}/user/settings/notifications" class="ui form" method="post">
|
||||||
{{$.CsrfTokenHtml}}
|
{{$.CsrfTokenHtml}}
|
||||||
<input name="_method" type="hidden" value="UI">
|
<input name="_method" type="hidden" value="UI">
|
||||||
<div class="tw-flex tw-flex-wrap tw-gap-2">
|
|
||||||
<div class="ui selection dropdown">
|
|
||||||
<input name="preference" type="hidden" value="{{.UINotificationsPreference}}">
|
<div class="field">
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
<div class="ui radio checkbox">
|
||||||
<div class="text"></div>
|
<input name="preference" type="radio" value="disabled" class="toggle-target-disabled" {{if eq
|
||||||
<div class="menu">
|
.UINotificationsPreference "disabled"}}checked{{end}}>
|
||||||
<div data-value="enabled" class="{{if eq .UINotificationsPreference "enabled"}}active selected {{end}}item">{{ctx.Locale.Tr "settings.notifications.enable"}}</div>
|
<label>{{ctx.Locale.Tr "settings.notifications.disable"}}</label>
|
||||||
<div data-value="andyourown" class="{{if eq .UINotificationsPreference "andyourown"}}active selected {{end}}item">{{ctx.Locale.Tr "settings.notifications.andyourown"}}</div>
|
|
||||||
<div data-value="onmention" class="{{if eq .UINotificationsPreference "onmention"}}active selected {{end}}item">{{ctx.Locale.Tr "settings.notifications.onmention"}}</div>
|
|
||||||
<div data-value="disabled" class="{{if eq .UINotificationsPreference "disabled"}}active selected {{end}}item">{{ctx.Locale.Tr "settings.notifications.disable"}}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui radio checkbox">
|
||||||
|
<input name="preference" type="radio" value="enabled" class="toggle-target-disabled" {{if eq
|
||||||
|
.UINotificationsPreference "enabled"}}checked{{end}}>
|
||||||
|
<label>{{ctx.Locale.Tr "settings.notifications.enable"}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui radio checkbox">
|
||||||
|
<input name="preference" type="radio" value="andyourown" class="toggle-target-disabled" {{if eq
|
||||||
|
.UINotificationsPreference "andyourown"}}checked{{end}}>
|
||||||
|
<label>{{ctx.Locale.Tr "settings.notifications.andyourown"}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<div class="ui radio checkbox">
|
||||||
|
<input name="preference" type="radio" value="onmention" class="toggle-target-disabled" {{if eq
|
||||||
|
.UINotificationsPreference "onmention"}}checked{{end}}>
|
||||||
|
<label>{{ctx.Locale.Tr "settings.notifications.onmention"}}</label>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
<button class="ui primary button">{{ctx.Locale.Tr "settings.notifications.submit_ui"}}</button>
|
<button class="ui primary button">{{ctx.Locale.Tr "settings.notifications.submit_ui"}}</button>
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{{template "user/settings/layout_footer" .}}
|
{{template "user/settings/layout_footer" .}}
|
||||||
|
Loading…
Reference in New Issue
Block a user