Disable direction select if 1 option

This commit is contained in:
Luke Bennett 2018-08-02 00:17:26 +01:00
parent 94dfd15e47
commit 493b225b97
No known key found for this signature in database
GPG key ID: A738E9C68D3BF31A

View file

@ -31,7 +31,7 @@
.form-group
= label_tag :mirror_direction, _('Mirror direction'), class: 'label-light'
= select_tag :mirror_direction, options_for_select(options), class: 'form-control js-mirror-direction'
= select_tag :mirror_direction, options_for_select(options), class: 'form-control js-mirror-direction', disabled: "#{'disabled' if options.count == 1}"
= render 'projects/mirrors/mirror_repos_form', can_push: can_push, can_pull: can_pull, f: f