<div class="alpos">
	<div class="grid_16">
		<ul id="msgops">
			<li>${h.link_to(_('Account details'), url(controller='accounts', action='detail', userid=c.account.id))}</li>
		</ul>
	</div>
</div>
<div class="clear"></div>
<div id="content">
	<div class="grid_16">
		<h3 class="head">${_('Add email signature')}</h3>
	</div>
	${h.form(url('account-sigs-add', userid=c.account.id), method='post')}
	${h.HTML.div(c.form.csrf_token, style="display: none;")}
	<div class="grid_16 drow">
	    <div class="grid_5">${c.form.signature_type.label}</div>
	    <div class="grid_5">${c.form.signature_type}</div>
		<div class="grid_5"></div>
	</div>
	% if c.form.signature_content.errors:
	<div class="grid_16 drow"><div class="formerror">${u', '.join([unicode(e) for e in c.form.signature_content.errors])}</div></div>
	% endif
	<div class="grid_16 drow">
	    ${h.highlight_errors(c.form.signature_content)}
	</div>
	<div class="grid_16 drow">
	    <div class="grid_5">${c.form.enabled.label}</div>
	    <div class="grid_5">${c.form.enabled}</div>
		<div class="grid_5"></div>
	</div>
	<div class="grid_16 drow">
	    <div class="grid_7">&nbsp;</div>
	    <div class="grid_8">
			${h.submit('submit', _('Add signature'))}
	    </div>
	</div>
	${h.end_form()}\
</div>


<%def name="title()">
${_('Settings :: Add email signatures :: %s') % c.account.username}
</%def>

<%def name="heading()">
${_('Settings :: Add email signatures :: %s') % c.account.username}
</%def>

<%def name="headers()">
${h.stylesheet_link(h.media_url() + 'css/jquery.cleditor.css',
h.media_url() + 'css/jquery.wysiwyg.css',
h.media_url() + 'css/wysiwyg.fileManager.css')}
<script type="text/javascript">
var fm_url = "${url('fm-users', userid=c.account.id)}";
</script>
</%def>
<%def name="localscripts()">
${h.javascript_link(h.media_url() + 'js/jquery.cleditor.min.js',
h.media_url() + 'js/jquery.cleditor.imgs.js',
h.media_url() + 'js/baruwa/signatures.js')}
<%include file="/includes/signaturejs.html"/>
</%def>

<%inherit file="/base.html"/>