Expired date at Internet plan

This commit is contained in:
Ibnu Maksum
2024-06-19 15:26:26 +07:00
parent 242d43f7c1
commit 703593d5e2
12 changed files with 168 additions and 249 deletions

View File

@ -26,10 +26,10 @@
</label>
<div class="col-md-10">
<input type="radio" name="prepaid" onclick="prePaid()" value="yes"
{if $d['prepaid'] == yes}checked{/if}>
{if $d['prepaid'] == 'yes'}checked{/if}>
Prepaid
<input type="radio" name="prepaid" onclick="postPaid()" value="no"
{if $d['prepaid'] == no}checked{/if}> Postpaid
{if $d['prepaid'] == 'no'}checked{/if}> Postpaid
</div>
</div>
<div class="form-group">
@ -206,6 +206,17 @@
<p class="help-block col-md-4">{Lang::T('1 Period = 1 Month, Expires the 20th of each month')}
</p>
</div>
<div class="form-group {if $d['prepaid'] == yes}hidden{/if}" id="expired_date">
<label class="col-md-2 control-label">{Lang::T('Expired Date')}
<a tabindex="0" class="btn btn-link btn-xs" role="button" data-toggle="popover"
data-trigger="focus" data-container="body"
data-content="Expired will be this date every month, 0 will be when customer buy internet plan">?</a>
</label>
<div class="col-md-6">
<input type="number" class="form-control" name="expired_date" maxlength="2"
value="{$d['expired_date']}" min="1" max="28" step="1">
</div>
</div>
<span id="routerChoose" class="{if $d['is_radius']}hidden{/if}">
<div class="form-group">
<label class="col-md-2 control-label"><a
@ -252,10 +263,12 @@
var postOpt = `<option value="Period">{Lang::T('Period')}</option>`;
function prePaid() {
$("#validity_unit").html(preOpt);
$('#expired_date').addClass('hidden');
}
function postPaid() {
$("#validity_unit").html(postOpt);
$("#expired_date").removeClass('hidden');
}
</script>