<?php
namespace JetApplication\Installer;

use Jet\Form;
use Jet\Mailing;
use Jet\MVC_View;
use Jet\Tr;

/**
 * @var MVC_View $this
 * @var Form $form
 */


$form = $this->getRaw( 'form' );

$config = Mailing::getConfig();
?>
<h3><?= Tr::_( 'Set the mail sender' ) ?></h3>
<?= $form->start() ?>

<div style="display: grid;grid-template-columns: 100px 300px;gap: 10px;">
<?php foreach( $config->getSenders() as $sender_id=>$sender ): ?>
	<?php if($sender_id!=Mailing::DEFAULT_SENDER_ID): ?>
	<div></div>
	<h3><?= $sender_id ?></h3>
	<?php endif; ?>

	<?= $form->field( '/senders/' . $sender_id . '/email' ) ?>
	<?= $form->field( '/senders/' . $sender_id . '/name' ) ?>
<?php endforeach; ?>
	<div></div>
	<div>
		<?= Installer::buttonNextSubmit() ?>
	</div>
</div>



<?= $form->end() ?>
