<div class="row-fluid">
	<div class="span1 hidden-phone"></div>
	<div class="span10">
		<ul id="msgops">
			<li>${h.link_to(_('Domain Settings'), url('domain-settings', domainid=c.sign.domain_id))}</li>
			<li>${h.link_to(_('Domain details'), url(controller='domains', action='detail', domainid=c.sign.domain_id))}</li>
		</ul>
	</div>
	<div class="span1 hidden-phone"></div>
</div>
<div class="row-fluid">
	<div class="span1 hidden-phone"></div>
	<div class="span10">
		<h3 class="head smaller lighter blue">${_('Edit email signature')}</h3>
	</div>
	<div class="span1 hidden-phone"></div>
</div>
<div class="row-fluid">
	<div class="span1 hidden-phone"></div>
	<div class="span10">
		${h.form(url('domain-sigs-edit', sigid=c.sign.id), method='post')}
		${h.HTML.div(c.form.csrf_token, style="display: none;")}
		<div class="row-fluid">
			<div class="control-group${' error' if c.form.signature_content.errors else ''}">
				<div class="controls span12">
				    ${c.form.signature_content(class_="span12")}
					% if c.form.signature_content.errors:
					<span class="help-inline">${u', '.join([unicode(ferr) for ferr in c.form.signature_content.errors])}</span>
					% endif
				</div>
			</div>
			<div class="control-group">
				${c.form.enabled.label(class_="control-label span4")}
				<div class="controls span8">
					${c.form.enabled}
					% if c.form.enabled.errors:
					<span class="help-inline">${u', '.join([unicode(ferr) for ferr in c.form.enabled.errors])}</span>
					% endif
				</div>
			</div>
		</div>
		<div class="form-actions">
			<button id="submit-button" class="btn btn-small btn-success"><i class="icon-ok"></i> ${_('Update signature')}</button>
		</div>
		${h.end_form()}\
	</div>
	<div class="span1 hidden-phone"></div>
</div>


<%def name="title()">
${_('Settings :: Edit email signatures')}
</%def>

<%def name="heading()">
${_('Settings :: Edit email signatures')}
</%def>

<%def name="headers()">
% if c.sign.signature_type == 2:
${h.stylesheet_link(h.media_url() + 'css/vendor/jquery.cleditor.css',
h.media_url() + 'css/vendor/jquery.wysiwyg.css',
h.media_url() + 'css/vendor/wysiwyg.fileManager.css')}
<script type="text/javascript">
var fm_url = "${url('fm-domains', domainid=c.sign.domain_id)}";
</script>
% endif
</%def>
<%def name="submenu()"></%def>
<%def name="localscripts()">
% if c.sign.signature_type == 2:
${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.edit.min.js')}
<%include file="../includes/signaturejs.html"/>
% endif
</%def>

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