Notification Message Editor

This commit is contained in:
Ibnu Maksum
2023-08-14 11:24:27 +07:00
parent aeeb04fd67
commit 1904e5e8a0
10 changed files with 224 additions and 97 deletions

103
ui/ui/app-notifications.tpl Normal file
View File

@ -0,0 +1,103 @@
{include file="sections/header.tpl"}
<form class="form-horizontal" method="post" role="form" action="{$_url}settings/notifications-post">
<div class="row">
<div class="col-sm-12 col-md-12">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="panel-heading">
<div class="btn-group pull-right">
<button class="btn btn-primary btn-xs" title="save" type="submit"><span
class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span></button>
</div>
{Lang::T('User Notification')}
</div>
<div class="panel-body">
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Expired Notification Message')}</label>
<div class="col-md-6">
<textarea class="form-control" id="user_notification_expired_text"
name="user_notification_expired_text"
placeholder="Hello [[name]], your internet package [[package]] has been expired"
rows="3">{if $_json['expired']!=''}{Lang::htmlspecialchars($_json['expired'])}{else}Hello [[name]], your internet package [[package]] has been expired.{/if}</textarea>
</div>
<p class="help-block col-md-4">
{Lang::T('<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name.')}
</p>
</div>
</div>
<div class="panel-body">
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Reminder 7 days')}</label>
<div class="col-md-6">
<textarea class="form-control" id="reminder_7_day" name="reminder_7_day"
rows="3">{Lang::htmlspecialchars($_json['reminder_7_day'])}</textarea>
</div>
<p class="help-block col-md-4">
{Lang::T('<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name.')}
</p>
</div>
</div>
<div class="panel-body">
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Reminder 3 days')}</label>
<div class="col-md-6">
<textarea class="form-control" id="reminder_3_day" name="reminder_3_day"
rows="3">{Lang::htmlspecialchars($_json['reminder_3_day'])}</textarea>
</div>
<p class="help-block col-md-4">
{Lang::T('<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name.')}
</p>
</div>
</div>
<div class="panel-body">
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Reminder 1 day')}</label>
<div class="col-md-6">
<textarea class="form-control" id="reminder_1_day" name="reminder_1_day"
rows="3">{Lang::htmlspecialchars($_json['reminder_1_day'])}</textarea>
</div>
<p class="help-block col-md-4">
{Lang::T('<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name.')}
</p>
</div>
</div>
<div class="panel-body">
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Invoice Notification Message')}</label>
<div class="col-md-6">
<textarea class="form-control" id="invoice_paid" name="invoice_paid"
placeholder="Hello [[name]], your internet package [[package]] has been expired"
rows="20">{Lang::htmlspecialchars($_json['invoice_paid'])}</textarea>
<p class="help-block">
{Lang::T('<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name.')}
</p>
</div>
<p class="col-md-4 help-block">
<b>[[company_name]]</b> Your Company Name at Settings.<br>
<b>[[address]]</b> Your Company Address at Settings.<br>
<b>[[phone]]</b> Your Company Phone at Settings.<br>
<b>[[invoice]]</b> invoice number.<br>
<b>[[date]]</b> Date invoice created.<br>
<b>[[payment_gateway]]</b> Payment gateway user paid from.<br>
<b>[[payment_channel]]</b> Payment channel user paid from.<br>
<b>[[type]]</b> is Hotspot/PPPOE.<br>
<b>[[plan_name]]</b> Internet Package.<br>
<b>[[plan_price]]</b> Internet Package Prices.<br>
<b>[[user_name]]</b> Username internet.<br>
<b>[[user_password]]</b> User password.<br>
<b>[[expired_date]]</b> Expired datetime.
</p>
</div>
</div>
</div>
<div class="panel-body">
<div class="form-group">
<button class="btn btn-success btn-block waves-effect waves-light"
type="submit">{$_L['Save']}</button>
</div>
</div>
</div>
</div>
</form>
{include file="sections/footer.tpl"}

View File

@ -6,8 +6,8 @@
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="panel-heading">
<div class="btn-group pull-right">
<button class="btn btn-primary btn-xs" title="save" type="submit"><span class="glyphicon glyphicon-floppy-disk"
aria-hidden="true"></span></button>
<button class="btn btn-primary btn-xs" title="save" type="submit"><span
class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span></button>
</div>
{$_L['General_Settings']}
</div>
@ -17,24 +17,25 @@
<div class="col-md-6">
<input type="text" required class="form-control" id="company" name="company"
value="{$_c['CompanyName']}">
<span class="help-block">{$_L['App_Name_Help_Text']}</span>
</div>
<span class="help-block col-md-4">{$_L['App_Name_Help_Text']}</span>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Company Footer')}</label>
<div class="col-md-6">
<input type="text" required class="form-control" id="footer" name="footer"
value="{$_c['CompanyFooter']}">
<span class="help-block">{Lang::T('Will show below user pages')}</span>
</div>
<span class="help-block col-md-4">{Lang::T('Will show below user pages')}</span>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{$_L['Address']}</label>
<div class="col-md-6">
<textarea class="form-control" id="address" name="address"
rows="3">{Lang::htmlspecialchars($_c['address'])}</textarea>
<span class="help-block">{$_L['You_can_use_html_tag']}</span>
</div>
<span class="help-block col-md-4">{$_L['You_can_use_html_tag']}</span>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{$_L['Phone_Number']}</label>
@ -49,18 +50,17 @@
<option value="0">No</option>
<option value="1" {if $_c['radius_mode']}selected="selected" {/if}>Yes</option>
</select>
<p class="help-block">Still on Testing.</p>
<p class="help-block">Changing from Radius will not add existing user to Mikrotik Hotspot.
</p>
<p class="help-block">With Radius user can use Hotspot or PPOE.</p>
</div>
<p class="help-block col-md-4">Still on Testing.<br>
Changing from Radius will not add existing user to Mikrotik Hotspot.<br>
With Radius user can use Hotspot or PPOE.</p>
</div>
<div class="form-group">
<label class="col-md-2 control-label">APP URL</label>
<div class="col-md-6">
<input type="text" readonly class="form-control" value="{$app_url}">
<p class="help-block">edit at config.php</p>
</div>
<p class="help-block col-md-4">edit at config.php</p>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Disable Voucher')}</label>
@ -71,14 +71,14 @@
<option value="yes" {if $_c['disable_voucher'] == 'yes'}selected="selected" {/if}>Yes
</option>
</select>
<p class="help-block">{Lang::T('Voucher activation menu will be hidden')}</p>
</div>
<p class="help-block col-md-4">{Lang::T('Voucher activation menu will be hidden')}</p>
</div>
</div>
<div class="panel-heading">
<div class="btn-group pull-right">
<button class="btn btn-primary btn-xs" title="save" type="submit"><span class="glyphicon glyphicon-floppy-disk"
aria-hidden="true"></span></button>
<button class="btn btn-primary btn-xs" title="save" type="submit"><span
class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span></button>
</div>
{Lang::T('Balance System')}
</div>
@ -92,8 +92,8 @@
<option value="yes" {if $_c['enable_balance'] == 'yes'}selected="selected" {/if}>Yes
</option>
</select>
<p class="help-block">{Lang::T('Customer can deposit money to buy voucher')}</p>
</div>
<p class="help-block col-md-4">{Lang::T('Customer can deposit money to buy voucher')}</p>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Allow Transfer')}</label>
@ -104,14 +104,14 @@
<option value="yes" {if $_c['allow_balance_transfer'] == 'yes'}selected="selected"
{/if}>Yes</option>
</select>
<p class="help-block">{Lang::T('Allow balance transfer between customers')}</p>
</div>
<p class="help-block col-md-4">{Lang::T('Allow balance transfer between customers')}</p>
</div>
</div>
<div class="panel-heading">
<div class="btn-group pull-right">
<button class="btn btn-primary btn-xs" title="save" type="submit"><span class="glyphicon glyphicon-floppy-disk"
aria-hidden="true"></span></button>
<button class="btn btn-primary btn-xs" title="save" type="submit"><span
class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span></button>
</div>
{Lang::T('Telegram Notification')}
</div>
@ -135,8 +135,8 @@
</div>
<div class="panel-heading">
<div class="btn-group pull-right">
<button class="btn btn-primary btn-xs" title="save" type="submit"><span class="glyphicon glyphicon-floppy-disk"
aria-hidden="true"></span></button>
<button class="btn btn-primary btn-xs" title="save" type="submit"><span
class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span></button>
</div>
{Lang::T('SMS OTP Registration')}
</div>
@ -146,17 +146,18 @@
<div class="col-md-6">
<input type="text" class="form-control" id="sms_url" name="sms_url" value="{$_c['sms_url']}"
placeholder="https://domain/?param_number=[number]&param_text=[text]&secret=">
<p class="help-block">Must include <b>[text]</b> &amp; <b>[number]</b>, it will be replaced.
</p>
</div>
<p class="help-block col-md-4">Must include <b>[text]</b> &amp; <b>[number]</b>, it will be
replaced.
</p>
</div>
<small id="emailHelp" class="form-text text-muted">You can use WhatsApp in here too. <a
href="https://wa.nux.my.id/login" target="_blank">Free Server</a></small>
</div>
<div class="panel-heading">
<div class="btn-group pull-right">
<button class="btn btn-primary btn-xs" title="save" type="submit"><span class="glyphicon glyphicon-floppy-disk"
aria-hidden="true"></span></button>
<button class="btn btn-primary btn-xs" title="save" type="submit"><span
class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span></button>
</div>
{Lang::T('Whatsapp Notification')}
</div>
@ -166,15 +167,18 @@
<div class="col-md-6">
<input type="text" class="form-control" id="wa_url" name="wa_url" value="{$_c['wa_url']}"
placeholder="https://domain/?param_number=[number]&param_text=[text]&secret=">
<p class="help-block">Must include <b>[text]</b> &amp; <b>[number]</b>, it will be replaced.
</p>
</div>
<p class="help-block col-md-4">Must include <b>[text]</b> &amp; <b>[number]</b>, it will be
replaced.
</p>
</div>
<small id="emailHelp" class="form-text text-muted">You can use WhatsApp in here too. <a
href="https://wa.nux.my.id/login" target="_blank">Free Server</a></small>
</div>
<div class="panel-heading">
<div class="btn-group pull-right">
<button class="btn btn-primary btn-xs" title="save" type="submit"><span class="glyphicon glyphicon-floppy-disk"
aria-hidden="true"></span></button>
<button class="btn btn-primary btn-xs" title="save" type="submit"><span
class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span></button>
</div>
{Lang::T('User Notification')}
</div>
@ -190,20 +194,8 @@
<option value="sms" {if $_c['user_notification_expired'] == 'sms'}selected="selected"
{/if}>SMS</option>
</select>
<p class="help-block">{Lang::T('User will get notification when package expired')}</p>
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Expired Notification Message')}</label>
<div class="col-md-6">
<textarea class="form-control" id="user_notification_expired_text"
name="user_notification_expired_text"
placeholder="Hello [[name]], your internet package [[package]] has been expired"
rows="3">{if $_c['user_notification_expired_text']!=''}{Lang::htmlspecialchars($_c['user_notification_expired_text'])}{else}Hello [[name]], your internet package [[package]] has been expired.{/if}</textarea>
<p class="help-block">
{Lang::T('<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name.')}
</p>
</div>
<p class="help-block col-md-4">{Lang::T('User will get notification when package expired')}</p>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Payment Notification')}</label>
@ -216,15 +208,28 @@
<option value="sms" {if $_c['user_notification_payment'] == 'sms'}selected="selected"
{/if}>SMS</option>
</select>
<p class="help-block">
{Lang::T('User will get invoice notification when buy package or package refilled')}</p>
</div>
<p class="help-block col-md-4">
{Lang::T('User will get invoice notification when buy package or package refilled')}</p>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Reminder Notification')}</label>
<div class="col-md-6">
<select name="user_notification_reminder" id="user_notification_reminder"
class="form-control">
<option value="none">None</option>
<option value="wa" {if $_c['user_notification_reminder'] == 'wa'}selected="selected"
{/if}>Whatsapp</option>
<option value="sms" {if $_c['user_notification_reminder'] == 'sms'}selected="selected"
{/if}>SMS</option>
</select>
</div>
</div>
</div>
<div class="panel-heading">
<div class="btn-group pull-right">
<button class="btn btn-primary btn-xs" title="save" type="submit"><span class="glyphicon glyphicon-floppy-disk"
aria-hidden="true"></span></button>
<button class="btn btn-primary btn-xs" title="save" type="submit"><span
class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span></button>
</div>
{Lang::T('Tawk.to Chat Widget')}
</div>
@ -234,29 +239,13 @@
<div class="col-md-6">
<input type="text" class="form-control" id="tawkto" name="tawkto" value="{$_c['tawkto']}"
placeholder="62f1ca7037898912e961f5/1ga07df">
<p class="help-block">From Direct Chat Link.</p>
<pre>/ip hotspot walled-garden
add dst-host=tawk.to
add dst-host=*.tawk.to</pre>
</div>
</div>
</div>
<div class="panel-heading">
<div class="btn-group pull-right">
<button class="btn btn-primary btn-xs" title="save" type="submit"><span class="glyphicon glyphicon-floppy-disk"
aria-hidden="true"></span></button>
</div>
{Lang::T('Invoice')}
</div>
<div class="panel-body">
<div class="form-group">
<label class="col-md-2 control-label">Note Invoice</label>
<div class="col-md-6">
<textarea class="form-control" id="note" name="note"
rows="3">{Lang::htmlspecialchars($_c['note'])}</textarea>
<span class="help-block">{$_L['You_can_use_html_tag']}</span>
</div>
<p class="help-block col-md-4">From Direct Chat Link.</p>
</div>
<label class="col-md-2"></label>
<p class="col-md-6 help-block">/ip hotspot walled-garden<br>
add dst-host=tawk.to<br>
add dst-host=*.tawk.to</p>
</div>
</div>
@ -268,8 +257,8 @@ add dst-host=*.tawk.to</pre>
</div>
<pre>/ip hotspot walled-garden
add dst-host={$_domain}
add dst-host=*.{$_domain}</pre>
add dst-host={$_domain}
add dst-host=*.{$_domain}</pre>
</div>
</div>
</form>

View File

@ -224,7 +224,9 @@
<li {if $_routes[1] eq 'app'}class="active" {/if}><a
href="{$_url}settings/app">{$_L['General_Settings']}</a></li>
<li {if $_routes[1] eq 'localisation'}class="active" {/if}><a
href="{$_url}settings/localisation">{$_L['Localisation']}</a></li>
href="{$_url}settings/localisation">{$_L['Localisation']}</a></li>
<li {if $_routes[1] eq 'notifications'}class="active" {/if}><a
href="{$_url}settings/notifications">{Lang::T('User Notification')}</a></li>
<li {if $_routes[1] eq 'users'}class="active" {/if}><a
href="{$_url}settings/users">{$_L['Administrator_Users']}</a></li>
<li {if $_routes[1] eq 'dbstatus'}class="active" {/if}><a