<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
?>
<?php $this->headScript()->appendFile($this->layout()->staticBaseUrl . 'externals/jscolor/jscolor.js'); ?>
<?php echo $this->partial('_admin_breadcrumb.tpl', 'core', array('parentMenu' => "core_admin_main_settings", "parentMenuItemName" => "core_admin_main_emailsettings", 'lastMenuItemName' => 'Manage Email Templates')); ?>
<h2 class="page_heading"><?php echo $this->translate('Email Settings') ?></h2>
<div class='tabs'>
	<?php echo $this->navigation()->menu()->setContainer($this->navigation)->render(); ?>
</div>
<div>
	<?php echo $this->htmlLink(array('action' => 'manage', 'reset' => false), $this->translate("Return to manage Templates"), array('class' => 'admin_link_btn mb-3')) ?>
</div>
<div class='clear'>
	<div class='settings'>
		<?php echo $this->form->render($this); ?>
	</div>
</div>
<script type="text/javascript">
	en4.core.runonce.add(function() {
		emailinput(scriptJquery("input[name='test_email_check']:checked").val());
		showemail('<?php echo $this->template->header_emailphone_show ? $this->template->header_emailphone_show : 1; ?>');
	});

	function emailinput(value) {
		
		if (scriptJquery(value).is(":checked")) {
			if (document.getElementById('test_email-wrapper'))
				scriptJquery('#test_email-wrapper').css('display', 'flex');
		} else {
			if (document.getElementById('test_email-wrapper'))
				scriptJquery('#test_email-wrapper').css('display', 'none');
		}
	}

	function showemail(value) {
		if (value == '1') {
			if (document.getElementById('header_mail-wrapper'))
				scriptJquery('#header_mail-wrapper').css('display', 'flex');
			if (document.getElementById('header_phone-wrapper'))
				scriptJquery('#header_phone-wrapper').css('display', 'flex');
			if (document.getElementById('header_emailphone_align-wrapper'))
				scriptJquery('#header_emailphone_align-wrapper').css('display', 'flex');
			if (document.getElementById('font_color_textemailphone-wrapper'))
				scriptJquery('#font_color_textemailphone-wrapper').css('display', 'flex');
		} else {
			if (document.getElementById('header_mail-wrapper'))
				scriptJquery('#header_mail-wrapper').css('display', 'none');
			if (document.getElementById('header_phone-wrapper'))
				scriptJquery('#header_phone-wrapper').css('display', 'none');
			if (document.getElementById('header_emailphone_align-wrapper'))
				scriptJquery('#header_emailphone_align-wrapper').css('display', 'none');
			if (document.getElementById('font_color_textemailphone-wrapper'))
				scriptJquery('#font_color_textemailphone-wrapper').css('display', 'none');
		}
	}
</script>
<script type="application/javascript">
	scriptJquery('.core_admin_main_settings').parent().addClass('active');
	scriptJquery('.core_admin_main_emailsettings').addClass('active');
</script>