2017-03-19 07:02:14 +07:00
|
|
|
{include file="sections/header.tpl"}
|
2024-08-17 22:18:15 +07:00
|
|
|
|
|
|
|
<form id="formpages" method="post" role="form" action="{$_url}pages/{$PageFile}-post">
|
2024-08-17 23:07:42 +07:00
|
|
|
<div class="row">
|
|
|
|
<div class="{if $action=='Voucher'}col-md-8{else}col-md-12{/if}">
|
|
|
|
<div class="panel mb20 panel-primary panel-hovered">
|
|
|
|
<div class="panel-heading">
|
|
|
|
{if $action!='Voucher'}
|
|
|
|
<div class="btn-group pull-right">
|
|
|
|
<a class="btn btn-danger btn-xs" title="Reset File" href="{$_url}pages/{$PageFile}-reset"
|
|
|
|
onclick="return confirm('Reset File?')"><span class="glyphicon glyphicon-refresh"
|
|
|
|
aria-hidden="true"></span></a>
|
|
|
|
</div>
|
|
|
|
{/if}
|
|
|
|
{$pageHeader}
|
2023-10-20 10:34:24 +07:00
|
|
|
</div>
|
2024-08-17 23:07:42 +07:00
|
|
|
<textarea name="html" id="summernote">{$htmls}</textarea>
|
|
|
|
{if $writeable}
|
|
|
|
<div class="panel-footer">
|
|
|
|
{if $action=='Voucher'}
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="template_save" value="yes"> {Lang::T('Save as template')}
|
|
|
|
</label>
|
|
|
|
<div class="input-group">
|
|
|
|
<span class="input-group-addon" id="basic-addon3">{Lang::T('Template Name')}</span>
|
|
|
|
<input type="text" class="form-control" id="template_name" name="template_name">
|
|
|
|
</div>
|
|
|
|
<br>
|
|
|
|
{/if}
|
|
|
|
<button type="submit" class="btn btn-primary btn-block">SAVE</button>
|
|
|
|
<br>
|
2024-08-17 23:52:50 +07:00
|
|
|
<p class="help-block">{Lang::T('Sometimes you need to refresh 3 times until content change')}</p>
|
2024-08-17 23:07:42 +07:00
|
|
|
<input type="text" class="form-control" onclick="this.select()" readonly
|
|
|
|
value="{$app_url}/pages/{$PageFile}.html">
|
|
|
|
</div>
|
|
|
|
{else}
|
|
|
|
<div class="panel-footer">
|
|
|
|
{Lang::T("Failed to save page, make sure i can write to folder pages, <i>chmod 664 pages/*.html<i>")}
|
|
|
|
</div>
|
|
|
|
{/if}
|
|
|
|
{if $PageFile=='Voucher'}
|
|
|
|
<div class="panel-footer">
|
|
|
|
<p class="help-block">
|
2024-08-17 23:58:27 +07:00
|
|
|
<b>[[company_name]]</b> {Lang::T('Your Company Name at Settings')}.<br>
|
|
|
|
<b>[[price]]</b> {Lang::T('Plan Price')}.<br>
|
|
|
|
<b>[[voucher_code]]</b> {Lang::T('Voucher Code')}.<br>
|
|
|
|
<b>[[plan]]</b> {Lang::T('Voucher Plan')}.<br>
|
|
|
|
<b>[[counter]]</b> {Lang::T('Counter')}.<br>
|
2024-08-17 23:07:42 +07:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{/if}
|
2023-10-20 10:34:24 +07:00
|
|
|
</div>
|
2022-09-08 10:54:35 +07:00
|
|
|
</div>
|
2024-08-17 23:07:42 +07:00
|
|
|
{if $action=='Voucher'}
|
|
|
|
<div class="col-md-4">
|
|
|
|
{foreach $vouchers as $v}
|
|
|
|
{if is_file("pages/vouchers/$v")}
|
|
|
|
<div class="panel mb20 panel-primary panel-hovered" style="cursor: pointer;" onclick="selectTemplate(this)">
|
|
|
|
<div class="panel-heading">{str_replace(".html", '', $v)}</div>
|
|
|
|
<div class="panel-body">{include file="pages/vouchers/$v"}</div>
|
|
|
|
</div>
|
|
|
|
{/if}
|
|
|
|
{/foreach}
|
|
|
|
</div>
|
|
|
|
{/if}
|
2022-09-08 10:54:35 +07:00
|
|
|
</div>
|
2017-03-19 07:02:14 +07:00
|
|
|
</form>
|
2023-10-18 17:24:00 +07:00
|
|
|
{literal}
|
2023-10-20 10:34:24 +07:00
|
|
|
<script type="text/javascript">
|
2024-08-17 22:18:15 +07:00
|
|
|
document.addEventListener("DOMContentLoaded", function() {
|
|
|
|
$('#summernote').summernote();
|
2023-10-20 10:34:24 +07:00
|
|
|
});
|
2024-08-17 23:07:42 +07:00
|
|
|
|
|
|
|
function selectTemplate(f) {
|
|
|
|
let children = f.children;
|
|
|
|
$('#template_name').val(children[0].innerHTML)
|
|
|
|
$('#summernote').summernote('code', children[1].innerHTML);
|
|
|
|
window.scrollTo(0, 0);
|
|
|
|
}
|
2023-10-20 10:34:24 +07:00
|
|
|
</script>
|
2023-10-18 17:24:00 +07:00
|
|
|
{/literal}
|
2022-09-08 10:54:35 +07:00
|
|
|
|
2024-08-17 23:52:50 +07:00
|
|
|
{include file="sections/footer.tpl"}
|