UX: refactor security modals (#12870)

- better form
- uses d-footer
- ensure buttons have the same height

Note that to achieve same height for btn without text, I made the choice to go for a minimum height which should work in most cases.
This commit is contained in:
Joffrey JAFFEUX 2021-05-03 09:22:33 +02:00 committed by GitHub
parent e7de943b5d
commit 286b6916af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 16 deletions

View File

@ -1,10 +1,13 @@
{{#d-modal-body}}
<div class="form-horizontal">
{{input type="text" value=model.name}}
</div>
<div class="second-factor instructions">
{{i18n "user.second_factor.security_key.edit_description"}}
</div>
<form class="form-horizontal">
<div class="input-group">
<label for="security-key-name">{{i18n "user.second_factor.security_key.edit_description"}}</label>
{{input name="security-key-name" type="text" value=model.name}}
</div>
</form>
{{/d-modal-body}}
<div class="modal-footer">
{{d-button
action=(action "editSecurityKey")
class="btn-primary"
@ -12,9 +15,9 @@
}}
{{d-button
action=(action "disableSecurityKey")
class="btn-danger"
class="btn-danger no-text"
icon="trash-alt"
aria-label="user.second_factor.disable"
title="user.second_factor.disable"
}}
{{/d-modal-body}}
</div>

View File

@ -1,10 +1,13 @@
{{#d-modal-body}}
<div class="form-horizontal">
{{input type="text" value=model.name}}
</div>
<div class="second-factor instructions">
{{i18n "user.second_factor.edit_description"}}
</div>
<form class="form-horizontal">
<div class="input-group">
<label for="authenticator-name">{{i18n "user.second_factor.edit_description"}}</label>
{{input name="authenticator-name" type="text" value=model.name}}
</div>
</form>
{{/d-modal-body}}
<div class="modal-footer">
{{d-button
action=(action "editSecondFactor")
class="btn-primary"
@ -12,9 +15,9 @@
}}
{{d-button
action=(action "disableSecondFactor")
class="btn-danger"
class="btn-danger no-text"
icon="trash-alt"
aria-label="user.second_factor.disable"
title="user.second_factor.disable"
}}
{{/d-modal-body}}
</div>

View File

@ -35,6 +35,7 @@
&.no-text {
.d-icon {
margin-right: 0;
min-height: 17px;
}
}
@include hover {