Permalink
Browse files

Add a warning about reset passphrase on volume extend

This is of course true only for encrypted volumes
  • Loading branch information...
1 parent 9b4fb61 commit e3d3f9a92cee6a3b1dad0c2d72a32d37370a97c3 @william-gr william-gr committed Jun 10, 2013
@@ -1064,11 +1064,18 @@ define([
enc.set('disabled', true);
encini.set('disabled', true);
okbtn.set('label', me.extend_label);
+ var opt = this.getOptions(val);
+ if(opt.enc) {
+ domStyle.set(me.dapExtendEnc, "display", "");
+ } else {
+ domStyle.set(me.dapExtendEnc, "display", "none");
+ }
} else {
volume_name.set('disabled', false);
enc.set('disabled', false);
encini.set('disabled', false);
okbtn.set('label', me.add_label);
+ domStyle.set(me.dapExtendEnc, "display", "none");
}
}
}, this.dapExtend);
@@ -16,6 +16,7 @@
<tr>
<td colspan="2">
<select data-dojo-attach-point="dapExtend"></select>
+ <p data-dojo-attach-point="dapExtendEnc" style="display: none;">The passphrase and recovery key will be reseted!</p>
</td>
</tr>
<tr>
View
@@ -183,7 +183,11 @@ def volumemanager(request):
'swap_size': swap * 1024 * 1024 * 1024,
'extend': json.dumps(
[{'value': '', 'label': '-----'}] +
- [{'label': x.vol_name, 'value': x.vol_name} for x in qs]
+ [{
+ 'label': x.vol_name,
+ 'value': x.vol_name,
+ 'enc': x.vol_encrypt > 0
+ } for x in qs]
),
})

0 comments on commit e3d3f9a

Please sign in to comment.