Add readonly support for email profile settings.
More to come... Also this required some form tweaking/overhaul(s).
This commit is contained in:
parent
ba6bf87ded
commit
ef40af814a
13 changed files with 453 additions and 48 deletions
tailbone/templates
30
tailbone/templates/email/profiles/view.mako
Normal file
30
tailbone/templates/email/profiles/view.mako
Normal file
|
@ -0,0 +1,30 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%inherit file="/master/view.mako" />
|
||||
|
||||
<%def name="head_tags()">
|
||||
${parent.head_tags()}
|
||||
<script type="text/javascript">
|
||||
% if not email.get_template('html'):
|
||||
$(function() {
|
||||
$('#preview-html').button('disable');
|
||||
$('#preview-html').attr('title', "There is no HTML template on file for this email.");
|
||||
});
|
||||
% endif
|
||||
% if not email.get_template('txt'):
|
||||
$(function() {
|
||||
$('#preview-txt').button('disable');
|
||||
$('#preview-txt').attr('title', "There is no TXT template on file for this email.");
|
||||
});
|
||||
% endif
|
||||
</script>
|
||||
</%def>
|
||||
|
||||
${parent.body()}
|
||||
|
||||
<form action="${url('email.preview')}" name="send-email-preview" method="post">
|
||||
<a id="preview-html" class="button" href="${url('email.preview')}?key=${instance['key']}&type=html" target="_blank">Preview HTML</a>
|
||||
<a id="preview-txt" class="button" href="${url('email.preview')}?key=${instance['key']}&type=txt" target="_blank">Preview TXT</a>
|
||||
or
|
||||
<input type="text" name="recipient" value="${request.user.email_address}" />
|
||||
<input type="submit" name="send_${instance['key']}" value="Send Preview Email" />
|
||||
</form>
|
|
@ -2,7 +2,7 @@
|
|||
<div class="form">
|
||||
${h.form(form.action_url, id=form_id or None, method='post', enctype='multipart/form-data')}
|
||||
|
||||
${form.fieldset.render()|n}
|
||||
${form.render_fields()|n}
|
||||
|
||||
% if buttons:
|
||||
${buttons|n}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<div class="form">
|
||||
${form.fieldset.render()|n}
|
||||
${form.render_fields()|n}
|
||||
% if buttons:
|
||||
${buttons|n}
|
||||
% endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%inherit file="/base.mako" />
|
||||
|
||||
<%def name="title()">${model_title}: ${unicode(instance)}</%def>
|
||||
<%def name="title()">${model_title}: ${instance_title}</%def>
|
||||
|
||||
<%def name="context_menu_items()">
|
||||
<li>${h.link_to("Back to {0}".format(model_title_plural), url(route_prefix))}</li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue