Merge pull request #399 from ahmadhusein17/Development

Development
This commit is contained in:
iBNu Maksum 2025-02-17 13:46:03 +07:00 committed by GitHub
commit 69a7d842e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 114 additions and 128 deletions

View File

@ -7,49 +7,45 @@
<div class="panel-heading">{Lang::T('New Field')}</div> <div class="panel-heading">{Lang::T('New Field')}</div>
<div class="panel-body"> <div class="panel-body">
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label">Order</label> <label class="col-md-4 control-label">{Lang::T("Sequence")}</label>
<div class="col-md-8"> <div class="col-md-8">
<input type="number" class="form-control" name="order[]" style="width: 100%" value="99" <input type="number" class="form-control" name="order[]" style="width: 100%" value="99" placeholder="99">
placeholder="99">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label">Name</label> <label class="col-md-4 control-label">{Lang::T("Name")}</label>
<div class="col-md-8"> <div class="col-md-8">
<input type="text" class="form-control" name="name[]" style="width: 100%" <input type="text" class="form-control" name="name[]" style="width: 100%" placeholder="Your Salary">
placeholder="Your Salary">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label">Placeholder</label> <label class="col-md-4 control-label">Placeholder</label>
<div class="col-md-8"> <div class="col-md-8">
<input type="text" class="form-control" name="placeholder[]" style="width: 100%" <input type="text" class="form-control" name="placeholder[]" style="width: 100%" placeholder="this is placeholder">
placeholder="this is placeholder">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label">Type</label> <label class="col-md-4 control-label">{Lang::T("Type")}</label>
<div class="col-md-8"> <div class="col-md-8">
<select class="form-control" name="type[]" style="width: 100%"> <select class="form-control" name="type[]" style="width: 100%">
<option value="text">Text</option> <option value="text">{Lang::T("Text")}</option>
<option value="date">Date</option> <option value="date">{Lang::T("Date")}</option>
<option value="time">Time</option> <option value="time">{Lang::T("Time")}</option>
<option value="number">Number</option> <option value="number">{Lang::T("Number")}</option>
<option value="option">Option</option> <option value="option">{Lang::T("Option")}</option>
{* <option value="image">Image</option> *} <!-- <option value="image">{Lang::T("Image")}</option> -->
</select> </select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label">Option Values</label> <label class="col-md-4 control-label">{Lang::T("Option Values")}</label>
<div class="col-md-8"> <div class="col-md-8">
<input type="text" class="form-control" name="value[]" style="width: 100%" <input type="text" class="form-control" name="value[]" style="width: 100%" placeholder="Male,Female">
placeholder="Male,Female"> <span class="help-block">{Lang::T("Use comma separated values for this option.")}</span>
<span class="help-block">for option using comma separated value.</span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label">Register Page</label> <label class="col-md-4 control-label">{Lang::T("Registration page")}</label>
<div class="col-md-8"> <div class="col-md-8">
<select class="form-control" name="register[]" style="width: 100%"> <select class="form-control" name="register[]" style="width: 100%">
<option value="1">show</option> <option value="1">show</option>
@ -58,18 +54,18 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label">Required</label> <label class="col-md-4 control-label">{Lang::T("Required")}</label>
<div class="col-md-8"> <div class="col-md-8">
<select class="form-control" name="required[]" style="width: 100%"> <select class="form-control" name="required[]" style="width: 100%">
<option value="1">Yes</option> <option value="1">{Lang::T("Yes")}</option>
<option value="0">No</option> <option value="0">{Lang::T("No")}</option>
</select> </select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="col-md-8 col-md-offset-3"> <div class="col-md-8 col-md-offset-3">
<button class="btn btn-success btn-sm btn-block" type="submit">{Lang::T('Add')}</button> <button class="btn btn-success btn-sm btn-block" type="submit">{Lang::T('Add')}</button>
<span class="help-block">To delete, empty the name</span> <span class="help-block">{Lang::T("To delete, empty the name")}</span>
</div> </div>
</div> </div>
</div> </div>
@ -80,49 +76,45 @@
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-body"> <div class="panel-body">
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label">Order</label> <label class="col-md-4 control-label">{Lang::T("Sequence")}</label>
<div class="col-md-8"> <div class="col-md-8">
<input type="number" class="form-control" name="order[]" style="width: 100%" <input type="number" class="form-control" name="order[]" style="width: 100%" value="{$field['order']}" placeholder="99">
value="{$field['order']}" placeholder="99">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label">Name</label> <label class="col-md-4 control-label">{Lang::T("Name")}</label>
<div class="col-md-8"> <div class="col-md-8">
<input type="text" class="form-control" name="name[]" style="width: 100%" <input type="text" class="form-control" name="name[]" style="width: 100%" placeholder="Your Salary" value="{$field['name']}">
placeholder="Your Salary" value="{$field['name']}">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label">Placeholder</label> <label class="col-md-4 control-label">Placeholder</label>
<div class="col-md-8"> <div class="col-md-8">
<input type="text" class="form-control" name="placeholder[]" style="width: 100%" <input type="text" class="form-control" name="placeholder[]" style="width: 100%" placeholder="this is placeholder" value="{$field['placeholder']}">
placeholder="this is placeholder" value="{$field['placeholder']}">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label">Type</label> <label class="col-md-4 control-label">{Lang::T("Type")}</label>
<div class="col-md-8"> <div class="col-md-8">
<select class="form-control" name="type[]" style="width: 100%"> <select class="form-control" name="type[]" style="width: 100%">
<option value="text" {if $field['type'] == 'text'}selected{/if}>Text</option> <option value="text" {if $field['type'] == 'text'}selected{/if}>{Lang::T("Text")}</option>
<option value="date" {if $field['type'] == 'date'}selected{/if}>Date</option> <option value="date" {if $field['type'] == 'date'}selected{/if}>{Lang::T("Date")}</option>
<option value="time" {if $field['type'] == 'time'}selected{/if}>Time</option> <option value="time" {if $field['type'] == 'time'}selected{/if}>{Lang::T("Time")}</option>
<option value="number" {if $field['type'] == 'number'}selected{/if}>Number</option> <option value="number" {if $field['type'] == 'number'}selected{/if}>{Lang::T("Number")}</option>
<option value="option" {if $field['type'] == 'option'}selected{/if}>Option</option> <option value="option" {if $field['type'] == 'option'}selected{/if}>{Lang::T("Option")}</option>
{* <option value="image" {if $field['type'] == 'image'}selected{/if}>Image</option> *} <!-- <option value="image" {if $field['type'] == 'image'}selected{/if}>{Lang::T("Image")}</option> -->
</select> </select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-4 control-label">Option Values</label> <label class="col-md-4 control-label">{Lang::T("Option Values")}</label>
<div class="col-md-8"> <div class="col-md-8">
<input type="text" class="form-control" name="value[]" style="width: 100%" <input type="text" class="form-control" name="value[]" style="width: 100%" placeholder="Male,Female" value="{$field['value']}">
placeholder="Male,Female" value="{$field['value']}"> <span class="help-block">{Lang::T("Use comma separated values for this option.")}</span>
<span class="help-block">for option using comma separated value.</span>
</div> </div>
</div> </div>
<div class="form-group {if $field['register'] == 1}has-success{/if}"> <div class="form-group {if $field['register'] == 1}has-success{/if}">
<label class="col-md-4 control-label">Register Page</label> <label class="col-md-4 control-label">{Lang::T("Registration page")}</label>
<div class="col-md-8"> <div class="col-md-8">
<select class="form-control" name="register[]" style="width: 100%"> <select class="form-control" name="register[]" style="width: 100%">
<option value="1" {if $field['register'] == 1}selected{/if}>show</option> <option value="1" {if $field['register'] == 1}selected{/if}>show</option>
@ -130,22 +122,21 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group {if $field['required'] == 1}has-error{/if}""> <div class="form-group {if $field['required'] == 1}has-error{/if}">
<label class=" col-md-4 control-label">Required</label> <label class="col-md-4 control-label">{Lang::T("Required")}</label>
<div class="col-md-8"> <div class="col-md-8">
<select class="form-control" name="required[]" style="width: 100%"> <select class="form-control" name="required[]" style="width: 100%">
<option value="1" {if $field['required'] == 1}selected{/if}>Yes</option> <option value="1" {if $field['required'] == 1}selected{/if}>{Lang::T("Yes")}</option>
<option value="0" {if $field['required'] != 1}selected{/if}>No</option> <option value="0" {if $field['required'] != 1}selected{/if}>{Lang::T("No")}</option>
</select> </select>
</div>
</div> </div>
</div> </div>
</div> </div>
</div>
{/foreach} {/foreach}
<button class="btn btn-success btn-sm btn-block" type="submit">{Lang::T('Save')}</button> <button class="btn btn-success btn-sm btn-block" type="submit">{Lang::T('Save')}</button>
</div> </div>
</div> </div>
</form> </form>
{include file="sections/footer.tpl"} {include file="sections/footer.tpl"}

View File

@ -27,34 +27,33 @@
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="row"> <div class="row">
<div class="col-md-6">{Lang::T('Dont select logs if it failed')}</div> <div class="col-md-6">{Lang::T('Don\'t select logs if it failed')}</div>
<div class="col-md-4 text-right"> <div class="col-md-4 text-right">
<button type="submit" class="btn btn-primary btn-xs btn-block"><i <button type="submit" class="btn btn-primary btn-xs btn-block" aria-label="Download Backup Database">
class="fa fa-download"></i> <i class="fa fa-download"></i> {Lang::T('Download Backup Database')}
{Lang::T('Download Backup')} Database</button> </button>
</div> </div>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
<div class="col-sm-5"> <div class="col-sm-5">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading">{Lang::T('Restore')} Database</div> <div class="panel-heading">{Lang::T('Restore Database')}</div>
<form method="post" action="{Text::url('')}settings/dbrestore" enctype="multipart/form-data"> <form method="post" action="{Text::url('')}settings/dbrestore" enctype="multipart/form-data">
<div class="panel-body"> <div class="panel-body">
<div class="row"> <div class="row">
<div class="col-md-7"><input type="file" name="json" accept="application/json"></div> <div class="col-md-7"><input type="file" name="json" accept="application/json"></div>
<div class="col-md-5 text-right"> <div class="col-md-5 text-right">
<button type="submit" class="btn btn-primary btn-block btn-xs"><i class="fa fa-upload"></i> <button type="submit" class="btn btn-primary btn-block btn-xs" aria-label="Restore Database">
{Lang::T('Restore')} Database</button> <i class="fa fa-upload"></i> {Lang::T('Restore Database')}
</button>
</div> </div>
</div> </div>
</div> </div>
</form> </form>
<div class="panel-footer">{Lang::T('Restoring database will clean up data and then restore all the data')} <div class="panel-footer">{Lang::T('Restoring the database will clean up data and then restore all the data.')}</div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,32 +1,32 @@
{include file="sections/header.tpl"} {include file="sections/header.tpl"}
{function showWidget pos=0} {function showWidget pos=0}
<form method="post" action="{Text::url('widgets/pos/')}"> <form method="post" action="{Text::url('widgets/pos/')}">
<div class="panel panel-info"> <div class="panel panel-info">
<div class="panel-heading">Area {$pos}</div> <div class="panel-heading">{Lang::T("Area Fields")} {$pos}</div>
<div class="panel-body"> <div class="panel-body">
{foreach $widgets as $w} {foreach $widgets as $w}
{if $w['position'] == $pos} {if $w['position'] == $pos}
<div class="panel panel-{if $w['enabled']}default{else}danger{/if}"> <div class="panel panel-{if $w['enabled']}default{else}danger{/if}">
<div class="panel-heading"><b>{$w['title']}</b></div> <div class="panel-heading"><b>{$w['title']}</b></div>
<div class="panel-body">{ucwords(str_replace('.php', '', str_replace('_', ' ', $w['widget'])))}</div> <div class="panel-body">{ucwords(str_replace('.php', '', str_replace('_', ' ', $w['widget'])))}</div>
<table class="table table-bordered table-condensed"> <table class="table table-bordered table-condensed">
<tr> <tr>
<td> <td>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon">orders</span> <span class="input-group-addon">{Lang::T("Sequence")}</span>
<input type="number" style="width: 100px;" name="orders[]" value="{$w['id']}" <input type="number" style="width: 100px;" name="orders[]" value="{$w['id']}"
class="form-control" placeholder="orders"> class="form-control" placeholder="orders">
</div> </div>
<input type="hidden" name="id" value="{$w['id']}"> <input type="hidden" name="id[]" value="{$w['id']}">
</td> </td>
<td width="130"> <td width="130">
<div class="btn-group btn-group-justified" role="group"> <div class="btn-group btn-group-justified" role="group">
<a href="{Text::url('widgets/edit/', $w['id'])}" class="btn btn-sm btn-success">edit</a> <a href="{Text::url('widgets/edit/', $w['id'])}" class="btn btn-sm btn-success">{Lang::T("Edit")}</a>
<a href="{Text::url('widgets/delete/', $w['id'])}" <a href="{Text::url('widgets/delete/', $w['id'])}"
onclick="return ask(this, 'Delete this widget?')" class="btn btn-sm btn-danger"><i onclick="return ask(this, 'Delete this widget?')" class="btn btn-sm btn-danger">
class="glyphicon glyphicon-trash"></i></a> <i class="glyphicon glyphicon-trash"></i>
</a>
</div> </div>
</td> </td>
</tr> </tr>
@ -38,16 +38,15 @@
<div class="panel-footer"> <div class="panel-footer">
<div class="btn-group btn-group-justified" role="group"> <div class="btn-group btn-group-justified" role="group">
<div class="btn-group" role="group"> <div class="btn-group" role="group">
<button type="submit" class="btn btn-info">Save Orders</button> <button type="submit" class="btn btn-info">Save sequence</button>
</div> </div>
<a href="{Text::url('widgets/add/', $pos)}" class="btn btn-primary">Add new widget</a> <a href="{Text::url('widgets/add/', $pos)}" class="btn btn-primary">{Lang::T("Add new widget")}</a>
</div> </div>
</div> </div>
</div> </div>
</form> </form>
{/function} {/function}
<div class="row"> <div class="row">
<div class="col-md-6 col-md-offset-3"> <div class="col-md-6 col-md-offset-3">
{showWidget widgets=$widgets pos=1} {showWidget widgets=$widgets pos=1}
@ -61,13 +60,10 @@
{showWidget widgets=$widgets pos=3} {showWidget widgets=$widgets pos=3}
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6 col-md-offset-3"> <div class="col-md-6 col-md-offset-3">
{showWidget widgets=$widgets pos=4} {showWidget widgets=$widgets pos=4}
</div> </div>
</div> </div>
{include file="sections/footer.tpl"} {include file="sections/footer.tpl"}

View File

@ -4,7 +4,7 @@
<div class="row"> <div class="row">
<div class="col-md-6 col-md-offset-3"> <div class="col-md-6 col-md-offset-3">
<div class="panel panel-info"> <div class="panel panel-info">
<div class="panel-heading">{if $do == 'add'}{Lang::T('Add')}{else}{Lang::T('Edit')}{/if} Widget</div> <div class="panel-heading">{if $do == 'add'}{Lang::T('Tambah')}{else}{Lang::T('Edit')}{/if} Widget</div>
<div class="panel-body"> <div class="panel-body">
<input type="hidden" class="form-control" required id="id" name="id" value="{$widget['id']}"> <input type="hidden" class="form-control" required id="id" name="id" value="{$widget['id']}">
<div class="form-group"> <div class="form-group">
@ -16,7 +16,7 @@
<span class="help-block col-md-4">&nbsp;</span> <span class="help-block col-md-4">&nbsp;</span>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-3 control-label">{Lang::T('Order')}</label> <label class="col-md-3 control-label">{Lang::T('Sequence')}</label>
<div class="col-md-5"> <div class="col-md-5">
<input type="number" class="form-control" id="orders" name="orders" <input type="number" class="form-control" id="orders" name="orders"
value="{if empty($widget['orders'])}99{else}{$widget['orders']}{/if}"> value="{if empty($widget['orders'])}99{else}{$widget['orders']}{/if}">
@ -29,7 +29,8 @@
<select name="position" id="position" class="form-control"> <select name="position" id="position" class="form-control">
{for $pos=1 to 4} {for $pos=1 to 4}
<option value="{$pos}" {if $widget['position'] eq $pos}selected="selected" {/if}> <option value="{$pos}" {if $widget['position'] eq $pos}selected="selected" {/if}>
Area {$pos}</option> Area {$pos}
</option>
{/for} {/for}
</select> </select>
</div> </div>
@ -49,26 +50,24 @@
<p class="help-block col-md-4">&nbsp;</p> <p class="help-block col-md-4">&nbsp;</p>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-3 control-label">{Lang::T('Enabled')}</label> <label class="col-md-3 control-label">{Lang::T('Status')}</label>
<div class="col-md-5"> <div class="col-md-5">
<select name="enabled" id="enabled" class="form-control"> <select name="enabled" id="enabled" class="form-control">
<option value="1" {if $widget['enabled'] neq 1}selected="selected" {/if}> <option value="1" {if $widget['enabled'] neq 1}selected="selected" {/if}>
{Lang::T('Active')}</option> {Lang::T('Active')}
</option>
<option value="0" {if $widget['enabled'] eq 0}selected="selected" {/if}> <option value="0" {if $widget['enabled'] eq 0}selected="selected" {/if}>
{Lang::T('Inactive')}</option> {Lang::T('Not Active')}
<option value="1" {if $widget['enabled'] neq 1}selected="selected" {/if}> </option>
{Lang::T('Active')}</option>
</select> </select>
</div> </div>
<p class="help-block col-md-4">&nbsp;</p> <p class="help-block col-md-4">&nbsp;</p>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-3 control-label">{Lang::T('Contents')}</label> <label class="col-md-3 control-label">{Lang::T('Content')}</label>
<div class="col-md-9"> <div class="col-md-9">
<textarea name="content" rows="5" id="content" <textarea name="content" rows="5" id="content" class="form-control">{$widget['content']}</textarea>
class="form-control">{$widget['content']}</textarea> <p class="help-block">{Lang::T("Not all widgets require content. HTML widgets require content, either text or PHP code. Please be careful when writing this content.")}</p>
<p class="help-block">Not All Widget need contents, HTML widget need content, it can be text
or PHP Code, be careful</p>
</div> </div>
</div> </div>
</div> </div>
@ -83,7 +82,7 @@
</div> </div>
{if $do == 'edit'} {if $do == 'edit'}
<a href="{Text::url('widgets/delete/', $widget['id'])}" class="btn btn-danger btn-xs" <a href="{Text::url('widgets/delete/', $widget['id'])}" class="btn btn-danger btn-xs"
onclick="return ask(this, 'Delete this widget?')">{Lang::T('Delete')}</a> onclick="return ask(this, 'Remove this widget?')">{Lang::T('Delete')}</a>
{/if} {/if}
</div> </div>
</div> </div>

View File

@ -21,15 +21,14 @@
</thead> </thead>
<tbody> <tbody>
{foreach $d as $ds} {foreach $d as $ds}
<tr onclick="window.location.href = '{Text::url('voucher/invoice/')}{$ds['id']}'" <tr onclick="window.location.href = '{Text::url('voucher/invoice/')}{$ds.id|escape:'html'}'" style="cursor: pointer;">
style="cursor: pointer;"> <td>{$ds.invoice|escape:'html'}</td>
<td>{$ds['invoice']}</td> <td>{$ds.plan_name|escape:'html'}</td>
<td>{$ds['plan_name']}</td> <td>{Lang::moneyFormat($ds.price)}</td>
<td>{Lang::moneyFormat($ds['price'])}</td> <td>{$ds.type|escape:'html'}</td>
<td>{$ds['type']}</td> <td>{Lang::dateAndTimeFormat($ds.recharged_on, $ds.recharged_time)}</td>
<td>{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])}</td> <td>{Lang::dateAndTimeFormat($ds.expiration, $ds.time)}</td>
<td>{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}</td> <td>{$ds.method|escape:'html'}</td>
<td>{$ds['method']}</td>
</tr> </tr>
{/foreach} {/foreach}
</tbody> </tbody>
@ -41,5 +40,4 @@
</div> </div>
</div> </div>
{include file="customer/footer.tpl"} {include file="customer/footer.tpl"}

View File

@ -19,11 +19,11 @@
<form method="post" role="form" action="{Text::url('voucher/activation-post')}"> <form method="post" role="form" action="{Text::url('voucher/activation-post')}">
<div class="form-group"> <div class="form-group">
<div class="input-group"> <div class="input-group">
<input type="text" class="form-control" id="code" name="code" value="{$code}" <input type="text" class="form-control" id="code" name="code" value="{$code|escape:'html'}"
placeholder="{Lang::T('Enter voucher code here')}"> placeholder="{Lang::T('Enter voucher code here')}">
<span class="input-group-btn"> <span class="input-group-btn">
<a class="btn btn-default" <a class="btn btn-default"
href="{$app_url}/scan/?back={urlencode(Text::url('voucher/activation&code='))}"><i href="{$app_url|escape:'html'}/scan/?back={urlencode(Text::url('voucher/activation&code='))}"><i
class="glyphicon glyphicon-qrcode"></i></a> class="glyphicon glyphicon-qrcode"></i></a>
</span> </span>
</div> </div>

View File

@ -8,7 +8,7 @@
<div class="panel-body"> <div class="panel-body">
<form class="form-horizontal" method="post" role="form" <form class="form-horizontal" method="post" role="form"
action="{Text::url('accounts/change-password-post')}"> action="{Text::url('accounts/change-password-post')}">
<input type="hidden" name="csrf_token" value="{$csrf_token}"> <input type="hidden" name="csrf_token" value="{$csrf_token|escape:'html'}">
<div class="form-group"> <div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Current Password')}</label> <label class="col-md-2 control-label">{Lang::T('Current Password')}</label>
<div class="col-md-6"> <div class="col-md-6">
@ -35,7 +35,6 @@
</div> </div>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
</div> </div>

View File

@ -4,17 +4,17 @@
<div class="box box-primary"> <div class="box box-primary">
<div class="box-body no-padding"> <div class="box-body no-padding">
<div class="mailbox-read-info"> <div class="mailbox-read-info">
<h3>{$mail['subject']}</h3> <h3>{$mail.subject|escape:'html':'UTF-8'}</h3>
<h5>From: {$mail['from']} <h5>From: {$mail.from|escape:'html':'UTF-8'}
<span class="mailbox-read-time pull-right" data-toggle="tooltip" data-placement="top" <span class="mailbox-read-time pull-right" data-toggle="tooltip" data-placement="top"
title="Read at {Lang::dateTimeFormat($mail['date_read'])}">{Lang::dateTimeFormat($mail['date_created'])}</span> title="Read at {Lang::dateTimeFormat($mail.date_read)}">{Lang::dateTimeFormat($mail.date_created)}</span>
</h5> </h5>
</div> </div>
<div class="mailbox-read-message"> <div class="mailbox-read-message">
{if Text::is_html($mail['body'])} {if Text::is_html($mail.body)}
{$mail['body']} {$mail.body}
{else} {else}
{nl2br(htmlspecialchars_decode($mail['body']))} {nl2br($mail.body|htmlspecialchars_decode)}
{/if} {/if}
</div> </div>
</div> </div>
@ -30,10 +30,10 @@
{/if} {/if}
</div> </div>
<a href="{Text::url('mail')}" class="btn btn-primary"><i class="fa fa-arrow-left"></i> {Lang::T("Back")}</a> <a href="{Text::url('mail')}" class="btn btn-primary"><i class="fa fa-arrow-left"></i> {Lang::T("Back")}</a>
<a href="{Text::url('mail/delete/')}{$mail['id']}" class="btn btn-danger" <a href="{Text::url('mail/delete/')}{$mail.id}" class="btn btn-danger"
onclick="return ask(this, '{Lang::T("Delete")}?')"><i class="fa fa-trash-o"></i> onclick="return ask(this, '{Lang::T("Delete")}?')"><i class="fa fa-trash-o"></i>
{Lang::T("Delete")}</a> {Lang::T("Delete")}</a>
<a href="https://api.whatsapp.com/send?text={if Text::is_html($mail['body'])}{urlencode(strip_tags($mail['body']))}{else}{urlencode($mail['body'])}{/if}" <a href="https://api.whatsapp.com/send?text={if Text::is_html($mail.body)}{urlencode(strip_tags($mail.body))}{else}{urlencode($mail.body)}{/if}"
class="btn btn-success"><i class="fa fa-share"></i> {Lang::T("Share")}</a> class="btn btn-success"><i class="fa fa-share"></i> {Lang::T("Share")}</a>
</div> </div>
<!-- /.box-footer --> <!-- /.box-footer -->
@ -44,7 +44,7 @@
<form method="post"> <form method="post">
<div class="box-tools pull-right"> <div class="box-tools pull-right">
<div class="input-group"> <div class="input-group">
<input type="text" name="q" class="form-control" placeholder="{Lang::T('Search')}..." value="{$q}"> <input type="text" name="q" class="form-control" placeholder="{Lang::T('Search')}..." value="{$q|escape:'html':'UTF-8'}">
<div class="input-group-btn"> <div class="input-group-btn">
<button type="submit" class="btn btn-success"><span <button type="submit" class="btn btn-success"><span
class="glyphicon glyphicon-search"></span></button> class="glyphicon glyphicon-search"></span></button>
@ -73,22 +73,27 @@
{foreach $mails as $mail} {foreach $mails as $mail}
<tr> <tr>
<td class="mailbox-subject"> <td class="mailbox-subject">
<a href="{Text::url('mail/view/')}{$mail['id']}"> <a href="{Text::url('mail/view/')}{$mail.id}">
<div> <div>
{if $mail['date_read'] == null} {if $mail.date_read == null}
<i class="fa fa-envelope text-yellow" title="unread"></i> <i class="fa fa-envelope text-yellow" title="unread"></i>
{else} {else}
<i class="fa fa-envelope-o text-yellow" title="read"></i> <i class="fa fa-envelope-o text-yellow" title="read"></i>
{/if} {/if}
<b>{$mail['subject']}</b> <b>{$mail.subject|escape:'html':'UTF-8'}</b>
</div> </div>
</a> </a>
</td> </td>
<td class="mailbox-name">{$mail['from']}</td> <td class="mailbox-name">{$mail.from|escape:'html':'UTF-8'}</td>
<td class="mailbox-attachment"></td> <td class="mailbox-attachment"></td>
<td class="mailbox-date">{Lang::dateTimeFormat($mail['date_created'])}</td> <td class="mailbox-date">{Lang::dateTimeFormat($mail.date_created)}</td>
</tr> </tr>
{/foreach} {/foreach}
{if empty($mails)}
<tr>
<td colspan="4">{Lang::T("No email found.")}</td>
</tr>
{/if}
</tbody> </tbody>
</table> </table>
</div> </div>
@ -109,7 +114,6 @@
</div> </div>
</div> </div>
</div> </div>
{/if} {/if}
{include file="customer/footer.tpl"} {include file="customer/footer.tpl"}