Use <once-button>
where applicable for CRUD forms
This commit is contained in:
parent
5907973d42
commit
6be4964221
2 changed files with 24 additions and 2 deletions
|
@ -88,6 +88,7 @@ class ProfilesView(MasterView):
|
|||
pass
|
||||
|
||||
def make_printer_settings_form(self, profile, printer):
|
||||
use_buefy = self.get_use_buefy()
|
||||
schema = colander.Schema()
|
||||
|
||||
for name, label in printer.required_settings.items():
|
||||
|
@ -98,11 +99,13 @@ class ProfilesView(MasterView):
|
|||
schema.add(node)
|
||||
|
||||
form = forms.Form(schema=schema, request=self.request,
|
||||
use_buefy=use_buefy,
|
||||
model_instance=profile,
|
||||
# TODO: ugh, this is necessary to avoid some logic
|
||||
# which assumes a ColanderAlchemy schema i think?
|
||||
appstruct=None)
|
||||
form.cancel_url = self.get_action_url('view', profile)
|
||||
form.auto_disable_cancel = True
|
||||
|
||||
form.insert_before(schema.children[0].name, 'label_profile')
|
||||
form.set_readonly('label_profile')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue