debian-mirror-gitlab/app/views/projects/mirrors/_authentication_method.html.haml
2020-04-22 19:07:51 +05:30

16 lines
767 B
Text

- mirror = f.object
- auth_options = [[_('Password'), 'password'], [_('SSH public key'), 'ssh_public_key']]
.form-group
= f.label :auth_method, _('Authentication method'), class: 'label-bold'
.select-wrapper
= f.select :auth_method,
options_for_select(auth_options, mirror.auth_method),
{}, { class: "form-control select-control js-mirror-auth-type qa-authentication-method" }
= icon('chevron-down')
= f.hidden_field :auth_method, value: "password", class: "js-hidden-mirror-auth-type"
.form-group
.well-password-auth.collapse.js-well-password-auth
= f.label :password, _("Password"), class: "label-bold"
= f.password_field :password, value: mirror.password, class: 'form-control qa-password', autocomplete: 'new-password'