Skip to content

Commit

Permalink
Make AWS encryption switch read-only when editing
Browse files Browse the repository at this point in the history
The switch should only be editable when creating new volumes as EBS does
not yet support toggling the encryption flag of the cloud volumes.
  • Loading branch information
gberginc committed Apr 13, 2017
1 parent 7e54df7 commit 1089882
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/views/cloud_volume/_common_new_edit.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@
%label.col-md-2.control-label
= _('Encryption')
.col-md-8
%input.form-control{"bs-switch" => "",
:data => {:on_text => _('Yes'), :off_text => _('No'), :size => 'mini'},
:type => "checkbox",
:name => "encryption",
'ng-model' => "vm.cloudVolumeModel.aws_encryption",
'ng-disabled' => "!vm.newRecord",
:checkchange => ""}
%input.form-control{"bs-switch" => "",
:data => {:on_text => _('Yes'), :off_text => _('No'), :size => 'mini'},
:type => "checkbox",
:name => "aws_encryption",
'ng-model' => "vm.cloudVolumeModel.aws_encryption",
'switch-readonly' => "!vm.newRecord",
:checkchange => ""}

0 comments on commit 1089882

Please sign in to comment.