Skip to content

Commit

Permalink
set image attributes not modifiable as read-only
Browse files Browse the repository at this point in the history
 * fixes bug 944509

Change-Id: Ib3319be474d71d6fe8f46263a43330d48180e889
  • Loading branch information
andycjw committed Mar 3, 2012
1 parent eb72487 commit 0860680
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions horizon/dashboards/nova/images_and_snapshots/images/forms.py
Expand Up @@ -40,14 +40,26 @@
class UpdateImageForm(forms.SelfHandlingForm):
image_id = forms.CharField(widget=forms.HiddenInput())
name = forms.CharField(max_length="25", label=_("Name"))
kernel = forms.CharField(max_length="25", label=_("Kernel ID"),
required=False)
ramdisk = forms.CharField(max_length="25", label=_("Ramdisk ID"),
required=False)
architecture = forms.CharField(label=_("Architecture"), required=False)
kernel = forms.CharField(max_length="36", label=_("Kernel ID"),
widget=forms.TextInput(
attrs={'readonly': 'readonly'}
))
ramdisk = forms.CharField(max_length="36", label=_("Ramdisk ID"),
widget=forms.TextInput(
attrs={'readonly': 'readonly'}
))
architecture = forms.CharField(label=_("Architecture"), required=False,
widget=forms.TextInput(
attrs={'readonly': 'readonly'}
))
container_format = forms.CharField(label=_("Container Format"),
required=False)
disk_format = forms.CharField(label=_("Disk Format"))
widget=forms.TextInput(
attrs={'readonly': 'readonly'}
))
disk_format = forms.CharField(label=_("Disk Format"),
widget=forms.TextInput(
attrs={'readonly': 'readonly'}
))

def handle(self, request, data):
# TODO add public flag to image meta properties
Expand Down

0 comments on commit 0860680

Please sign in to comment.