Tweak email config view a bit, for clarity
This commit is contained in:
parent
c275071499
commit
a5184e416a
|
@ -150,7 +150,7 @@ class ProfilesView(MasterView):
|
||||||
creating=self.creating,
|
creating=self.creating,
|
||||||
editing=self.editing,
|
editing=self.editing,
|
||||||
action_url=self.request.current_route_url(_query=None),
|
action_url=self.request.current_route_url(_query=None),
|
||||||
cancel_url=self.get_index_url() if self.creating else self.get_action_url('view', email))
|
cancel_url=self.get_action_url('view', email))
|
||||||
form.readonly = self.viewing
|
form.readonly = self.viewing
|
||||||
return form
|
return form
|
||||||
|
|
||||||
|
@ -159,14 +159,15 @@ class ProfilesView(MasterView):
|
||||||
fs.sync()
|
fs.sync()
|
||||||
key = fs.key._value
|
key = fs.key._value
|
||||||
|
|
||||||
api.save_setting(Session(), 'rattail.mail.{}.prefix'.format(key), fs.prefix._value)
|
session = Session()
|
||||||
api.save_setting(Session(), 'rattail.mail.{}.subject'.format(key), fs.subject._value)
|
api.save_setting(session, 'rattail.mail.{}.prefix'.format(key), fs.prefix._value)
|
||||||
api.save_setting(Session(), 'rattail.mail.{}.from'.format(key), fs.sender._value)
|
api.save_setting(session, 'rattail.mail.{}.subject'.format(key), fs.subject._value)
|
||||||
api.save_setting(Session(), 'rattail.mail.{}.replyto'.format(key), fs.replyto._value)
|
api.save_setting(session, 'rattail.mail.{}.from'.format(key), fs.sender._value)
|
||||||
api.save_setting(Session(), 'rattail.mail.{}.to'.format(key), (fs.to._value or '').replace('\n', ', '))
|
api.save_setting(session, 'rattail.mail.{}.replyto'.format(key), fs.replyto._value)
|
||||||
api.save_setting(Session(), 'rattail.mail.{}.cc'.format(key), (fs.cc._value or '').replace('\n', ', '))
|
api.save_setting(session, 'rattail.mail.{}.to'.format(key), (fs.to._value or '').replace('\n', ', '))
|
||||||
api.save_setting(Session(), 'rattail.mail.{}.bcc'.format(key), (fs.bcc._value or '').replace('\n', ', '))
|
api.save_setting(session, 'rattail.mail.{}.cc'.format(key), (fs.cc._value or '').replace('\n', ', '))
|
||||||
api.save_setting(Session(), 'rattail.mail.{}.enabled'.format(key), unicode(fs.enabled._value).lower())
|
api.save_setting(session, 'rattail.mail.{}.bcc'.format(key), (fs.bcc._value or '').replace('\n', ', '))
|
||||||
|
api.save_setting(session, 'rattail.mail.{}.enabled'.format(key), unicode(fs.enabled._value).lower())
|
||||||
|
|
||||||
def template_kwargs_view(self, **kwargs):
|
def template_kwargs_view(self, **kwargs):
|
||||||
key = self.request.matchdict['key']
|
key = self.request.matchdict['key']
|
||||||
|
|
Loading…
Reference in a new issue