|
135 | 135 | </form>
|
136 | 136 | </div>
|
137 | 137 |
|
138 |
| - <h4 class="ui top attached error header"> |
139 |
| - {{.locale.Tr "settings.delete_account"}} |
140 |
| - </h4> |
141 |
| - <div class="ui attached error segment"> |
142 |
| - <div class="ui red message"> |
143 |
| - <p class="text left">{{svg "octicon-alert"}} {{.locale.Tr "settings.delete_prompt" | Str2html}}</p> |
144 |
| - {{if .UserDeleteWithComments}} |
145 |
| - <p class="text left" style="font-weight: bold;">{{.locale.Tr "settings.delete_with_all_comments" .UserDeleteWithCommentsMaxTime | Str2html}}</p> |
146 |
| - {{end}} |
147 |
| - </div> |
148 |
| - <form class="ui form ignore-dirty" id="delete-form" action="{{AppSubUrl}}/user/settings/account/delete" method="post"> |
149 |
| - {{template "base/disable_form_autofill"}} |
150 |
| - {{.CsrfTokenHtml}} |
151 |
| - <div class="required field {{if .Err_Password}}error{{end}}"> |
152 |
| - <label for="password-confirmation">{{.locale.Tr "password"}}</label> |
153 |
| - <input id="password-confirmation" name="password" type="password" autocomplete="off" required> |
| 138 | + {{if $.UserModules.Enabled "deletion"}} |
| 139 | + <h4 class="ui top attached error header"> |
| 140 | + {{.locale.Tr "settings.delete_account"}} |
| 141 | + </h4> |
| 142 | + <div class="ui attached error segment"> |
| 143 | + <div class="ui red message"> |
| 144 | + <p class="text left">{{svg "octicon-alert"}} {{.locale.Tr "settings.delete_prompt" | Str2html}}</p> |
| 145 | + {{if .UserDeleteWithComments}} |
| 146 | + <p class="text left" style="font-weight: bold;">{{.locale.Tr "settings.delete_with_all_comments" .UserDeleteWithCommentsMaxTime | Str2html}}</p> |
| 147 | + {{end}} |
154 | 148 | </div>
|
155 |
| - <div class="field"> |
156 |
| - <div class="ui red button delete-button" data-modal-id="delete-account" data-type="form" data-form="#delete-form"> |
157 |
| - {{.locale.Tr "settings.confirm_delete_account"}} |
158 |
| - </div> |
159 |
| - <a href="{{AppSubUrl}}/user/forgot_password?email={{.Email}}">{{.locale.Tr "auth.forgot_password"}}</a> |
| 149 | + <form class="ui form ignore-dirty" id="delete-form" action="{{AppSubUrl}}/user/settings/account/delete" method="post"> |
| 150 | + {{template "base/disable_form_autofill"}} |
| 151 | + {{.CsrfTokenHtml}} |
| 152 | + <div class="required field {{if .Err_Password}}error{{end}}"> |
| 153 | + <label for="password-confirmation">{{.locale.Tr "password"}}</label> |
| 154 | + <input id="password-confirmation" name="password" type="password" autocomplete="off" required> |
160 | 155 | </div>
|
161 |
| - </form> |
162 |
| - </div> |
| 156 | + <form class="ui form ignore-dirty" id="delete-form" action="{{AppSubUrl}}/user/settings/account/delete" method="post"> |
| 157 | + {{template "base/disable_form_autofill"}} |
| 158 | + {{.CsrfTokenHtml}} |
| 159 | + <div class="required field {{if .Err_Password}}error{{end}}"> |
| 160 | + <label for="password-confirmation">{{.locale.Tr "password"}}</label> |
| 161 | + <input id="password-confirmation" name="password" type="password" autocomplete="off" required> |
| 162 | + </div> |
| 163 | + <div class="field"> |
| 164 | + <div class="ui red button delete-button" data-modal-id="delete-account" data-type="form" data-form="#delete-form"> |
| 165 | + {{.locale.Tr "settings.confirm_delete_account"}} |
| 166 | + </div> |
| 167 | + <a href="{{AppSubUrl}}/user/forgot_password?email={{.Email}}">{{.locale.Tr "auth.forgot_password"}}</a> |
| 168 | + </div> |
| 169 | + </form> |
| 170 | + </div> |
| 171 | + {{end}} |
163 | 172 | </div>
|
164 | 173 | </div>
|
165 | 174 |
|
|
174 | 183 | {{template "base/delete_modal_actions" .}}
|
175 | 184 | </div>
|
176 | 185 |
|
177 |
| -{{if $.UserModules.Enabled "deletion"}} |
178 |
| - <div class="ui small basic delete modal" id="delete-account"> |
179 |
| - <div class="ui icon header"> |
180 |
| - {{svg "octicon-trash"}} |
181 |
| - {{.locale.Tr "settings.delete_account_title"}} |
182 |
| - </div> |
183 |
| - <div class="content"> |
184 |
| - <p>{{.locale.Tr "settings.delete_account_desc"}}</p> |
185 |
| - </div> |
186 |
| - {{template "base/delete_modal_actions" .}} |
| 186 | +<div class="ui small basic delete modal" id="delete-account"> |
| 187 | + <div class="ui icon header"> |
| 188 | + {{svg "octicon-trash"}} |
| 189 | + {{.locale.Tr "settings.delete_account_title"}} |
187 | 190 | </div>
|
188 |
| -{{end}} |
| 191 | + <div class="content"> |
| 192 | + <p>{{.locale.Tr "settings.delete_account_desc"}}</p> |
| 193 | + </div> |
| 194 | + {{template "base/delete_modal_actions" .}} |
| 195 | +</div> |
189 | 196 |
|
190 | 197 | {{template "base/footer" .}}
|
0 commit comments