{import forms.html}
<link rel="stylesheet" type="text/css" href="public/js/markitup/skins/markitup/style.css" />
<link rel="stylesheet" type="text/css" href="public/js/markitup/sets/texy/style.css" />
<script type="text/javascript" src="public/js/jQuery/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="public/js/markitup/jquery.markitup.js"></script>
<script type="text/javascript" src="public/js/markitup/sets/texy/set.js"></script>
<style>
 .markItUp {
   width: 100%;
 }
 .markItUpEditor {
   font: unset;
   font-size: 140%;
   padding: unset;
   width: 100%;
   background: #FFF;
 }
</style>
{ifset $errors}
<div class="w3-panel w3-red" role="alert">
  <p>{reset( $errors )[0]}</p>
</div>
{/ifset}
<form class="w3-container" action="{$action}" method="POST" enctype="multipart/form-data">
  <p>{include input, 'page[title]', $page->title, 'text', class : 'w3-input w3-border', autofocus : ($page->isNewRecord())}</p>
  <p>{include textarea, 'page[content]', $page->content, class : 'w3-input w3-border', autofocus : (!$page->isNewRecord())}</p>
  <p>{include input, 'save', ('save'|translate), 'submit', class : 'w3-btn w3-green'}
    <a class="w3-btn w3-grey" href="{=BASE_URL}/{$originalTitle}">{_}cancel{/_}</a>
    {if (!$page->isNewRecord())}
    {var $confirm = ('confirm_delete_page'|translate:$originalTitle)}
    <a class="w3-btn w3-red" href="{=BASE_URL}/{$originalTitle}/delete" onclick="return confirm('{$confirm|noescape}');">{_}delete{/_}</a>
  {/if}
  </p>
</form>
<script language="javascript">
 $(document).ready(function()	{
   $('#page_content').markItUp(myTexySettings);
 });
</script>
