A disabled field is not readonly
Hostname, personality, subfunction fields shall be readonly, not disabled, if such filed has been set. A disabled field only prevents end user from editing it directly from GUI, the server side code still condisder it "writable" Change-Id: I64d63476ecbfc391a4f6194e6b972b4800a82c13 Close-Bug: 1846363 Signed-off-by: Bin Qian <bin.qian@windriver.com>
This commit is contained in:
parent
b057924b79
commit
b82c7a5cd3
@ -320,7 +320,7 @@ class UpdateHostInfoAction(workflows.Action):
|
||||
|
||||
# subfunctions cannot be modified once it is set
|
||||
if self.initial['subfunctions']:
|
||||
self.fields['subfunctions'].widget.attrs['disabled'] = 'disabled'
|
||||
self.fields['subfunctions'].widget.attrs['readonly'] = 'readonly'
|
||||
self.fields['subfunctions'].required = False
|
||||
|
||||
# personality cannot be modified once it is set
|
||||
@ -330,7 +330,7 @@ class UpdateHostInfoAction(workflows.Action):
|
||||
mem_profile_configurable = False
|
||||
|
||||
if personality and self.system_mode != constants.SYSTEM_MODE_SIMPLEX:
|
||||
self.fields['personality'].widget.attrs['disabled'] = 'disabled'
|
||||
self.fields['personality'].widget.attrs['readonly'] = 'readonly'
|
||||
self.fields['personality'].required = False
|
||||
self._personality = personality
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user