Commit 1e5b9fb3 authored by ibuler's avatar ibuler

[Update] terminal可以更改名称

parent f886e7c2
...@@ -25,18 +25,22 @@ def get_all_replay_storage(): ...@@ -25,18 +25,22 @@ def get_all_replay_storage():
class TerminalForm(forms.ModelForm): class TerminalForm(forms.ModelForm):
command_storage = forms.ChoiceField(choices=get_all_command_storage(), command_storage = forms.ChoiceField(
label=_("Command storage")) choices=get_all_command_storage(),
replay_storage = forms.ChoiceField(choices=get_all_replay_storage(), label=_("Command storage")
label=_("Replay storage")) )
replay_storage = forms.ChoiceField(
choices=get_all_replay_storage(),
label=_("Replay storage")
)
class Meta: class Meta:
model = Terminal model = Terminal
fields = ['name', 'remote_addr', 'ssh_port', 'http_port', 'comment', 'command_storage', 'replay_storage'] fields = [
'name', 'remote_addr', 'ssh_port', 'http_port', 'comment',
'command_storage', 'replay_storage',
]
help_texts = { help_texts = {
'ssh_port': _("Coco ssh listen port"), 'ssh_port': _("Coco ssh listen port"),
'http_port': _("Coco http/ws listen port"), 'http_port': _("Coco http/ws listen port"),
} }
widgets = {
'name': forms.TextInput(attrs={'readonly': 'readonly'})
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment