Fix some bugs with printer profile stuff, per recent rattail changes.
This commit is contained in:
parent
9d2a35c8b1
commit
350c944e91
|
@ -16,7 +16,7 @@
|
||||||
<li>${h.link_to("Back to Label Profiles", url('label_profiles'))}</li>
|
<li>${h.link_to("Back to Label Profiles", url('label_profiles'))}</li>
|
||||||
% if form.updating:
|
% if form.updating:
|
||||||
<% profile = form.fieldset.model %>
|
<% profile = form.fieldset.model %>
|
||||||
<% printer = profile.get_printer() %>
|
<% printer = profile.get_printer(request.rattail_config) %>
|
||||||
% if printer and printer.required_settings:
|
% if printer and printer.required_settings:
|
||||||
<li>${h.link_to("Edit Printer Settings", url('label_profile.printer_settings', uuid=profile.uuid))}</li>
|
<li>${h.link_to("Edit Printer Settings", url('label_profile.printer_settings', uuid=profile.uuid))}</li>
|
||||||
% endif
|
% endif
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<li>${h.link_to("Back to Label Profiles", url('label_profiles'))}</li>
|
<li>${h.link_to("Back to Label Profiles", url('label_profiles'))}</li>
|
||||||
% if form.readonly and request.has_perm('label_profiles.update'):
|
% if form.readonly and request.has_perm('label_profiles.update'):
|
||||||
<% profile = form.fieldset.model %>
|
<% profile = form.fieldset.model %>
|
||||||
<% printer = profile.get_printer() %>
|
<% printer = profile.get_printer(request.rattail_config) %>
|
||||||
<li>${h.link_to("Edit this Label Profile", url('label_profile.update', uuid=form.fieldset.model.uuid))}</li>
|
<li>${h.link_to("Edit this Label Profile", url('label_profile.update', uuid=form.fieldset.model.uuid))}</li>
|
||||||
% if printer and printer.required_settings:
|
% if printer and printer.required_settings:
|
||||||
<li>${h.link_to("Edit Printer Settings", url('label_profile.printer_settings', uuid=profile.uuid))}</li>
|
<li>${h.link_to("Edit Printer Settings", url('label_profile.printer_settings', uuid=profile.uuid))}</li>
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
${parent.body()}
|
${parent.body()}
|
||||||
|
|
||||||
<% profile = form.fieldset.model %>
|
<% profile = form.fieldset.model %>
|
||||||
<% printer = profile.get_printer() %>
|
<% printer = profile.get_printer(request.rattail_config) %>
|
||||||
|
|
||||||
% if printer and printer.required_settings:
|
% if printer and printer.required_settings:
|
||||||
<h2>Printer Settings</h2>
|
<h2>Printer Settings</h2>
|
||||||
|
|
|
@ -141,7 +141,7 @@ def printer_settings(request):
|
||||||
read_profile = HTTPFound(location=request.route_url(
|
read_profile = HTTPFound(location=request.route_url(
|
||||||
'label_profile.read', uuid=profile.uuid))
|
'label_profile.read', uuid=profile.uuid))
|
||||||
|
|
||||||
printer = profile.get_printer()
|
printer = profile.get_printer(request.rattail_config)
|
||||||
if not printer:
|
if not printer:
|
||||||
request.session.flash("Label profile \"%s\" does not have a functional "
|
request.session.flash("Label profile \"%s\" does not have a functional "
|
||||||
"printer spec." % profile)
|
"printer spec." % profile)
|
||||||
|
|
Loading…
Reference in a new issue