Files
Testing/templates/admin_subscriber_editplan.tpl
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

800 lines
13 KiB
Smarty

{include file='admin_header.tpl'}
{literal}
<script src="../include/js/semods.js"></script>
<script src="../include/js/semods.controls.multiselect.js"></script>
<script>
function init_multiselects() {
new SEMods.Controls.MultiSelect( "plan_plans" );
new SEMods.Controls.MultiSelect( "plan_levels" );
}
function plan_recurring_onChanged(value) {
if(value == 1) {
document.getElementById("recurring_div").style.display = "inline";
//if(SEMods.B.isIE)
// display = 'inline';
//else
// display = 'table-row';
//
//document.getElementById("plan_price_row").style.display = display;
}
else {
SEMods.B.hide("recurring_div");
//SEMods.B.hide("plan_price_row");
}
}
function plan_periodtype_onChange(value) {
//alert(value);
if(value == 4) {
SEMods.B.hide("plan_trialperiod_row");
SEMods.B.hide("plan_recurring_row");
SEMods.B.hide("plan_onetime_price_row");
SEMods.B.hide("plan_period");
}
else {
if(SEMods.B.isIE)
display = 'inline';
else
display = 'table-row';
document.getElementById("plan_trialperiod_row").style.display = display;
document.getElementById("plan_recurring_row").style.display = display;
document.getElementById("plan_onetime_price_row").style.display = display;
document.getElementById("plan_period").style.display = display;
}
}
SEMods.B.register_onload( init_multiselects );
</script>
<style>
.multiSelect {
background:#FFFFFF url('../images/apps_dropdown.gif') no-repeat scroll right center;
border:1px solid #BBBBBB;
display:inline;
padding:2px 20px 2px 4px;
width:200px;
Xoverflow: hidden;
}
.multiSelect.hover {
background:transparent url('../images/apps_dropdown_hover.gif') no-repeat scroll right center;
}
.multiSelect.active, .multiSelect.focus {
border:1px inset #000000;
}
.multiSelect.active {
background:transparent url('../images/apps_dropdown_active.gif') no-repeat scroll right center;
}
.multiSelectOptions {
background:#FFFFFF none repeat scroll 0%;
border:1px solid #B2B2B2;
margin-top:-1px;
max-height:150px;
overflow:auto;
Xwidth:206px;
width:198px;
}
.multiSelectOptions label {
display:block;
padding:2px 5px;
}
.multiSelectOptions label.checked {
background:#E6E6E6 none repeat scroll 0%;
}
.multiSelectOptions label.selectAll {
border-bottom:1px dotted #CCCCCC;
}
.multiSelectOptions label.hover {
background:#CFCFCF none repeat scroll 0%;
}
iframe.layerfix {
display:none;/*sorry for IE5*/
display/**/:block;/*sorry for IE5*/
position:absolute;/*must have*/
top:0;/*must have*/
left:0;/*must have*/
z-index:1;/*must have*/
filter:mask();/*must have*/
Xwidth:3000px;/*must have for any big value*/
Xheight:3000px/*must have for any big value*/;
}
table.tabs {
margin-bottom: 12px;
}
td.tab {
background: #FFFFFF;
padding-left: 1px;
border-bottom: 1px solid #CCCCCC;
}
td.tab0 {
font-size: 1pt;
padding-left: 7px;
border-bottom: 1px solid #CCCCCC;
}
td.tab1 {
border: 1px solid #CCCCCC;
border-top: 3px solid #AAAAAA;
border-bottom: none;
font-weight: bold;
padding: 6px 8px 6px 8px;
}
td.tab2 {
background: #F8F8F8;
border: 1px solid #CCCCCC;
border-top: 3px solid #CCCCCC;
font-weight: bold;
padding: 6px 8px 6px 8px;
}
td.tab3 {
background: #FFFFFF;
border-bottom: 1px solid #CCCCCC;
padding-right: 12px;
width: 100%;
text-align: right;
vertical-align: middle;
}
.tabs A {
text-decoration: none;
}
.tabs A:hover {
text-decoration: underline;
}
</style>
{/literal}
<h2>{lang_print id=100014136}</h2>
{lang_print id=100014137}
<br><br>
{if $error_message != ''}
<div class='error'><img src='../images/error.gif' border='0' class='icon'> {$error_message}</div>
{/if}
{if isset($paymentgateways_errors) && $paymentgateways_errors|@is_array && $paymentgateways_errors|count > 0}
{foreach from=$paymentgateways_errors item=paymentgateways_error}
<div class='error'><img src='../images/error.gif' border='0' class='icon'> {$paymentgateways_error.name} - {$paymentgateways_error.error_message}</div>
{/foreach}
{/if}
<form action='admin_subscriber_editplan.php' method='POST'>
<input type='hidden' name='task' value='editplan'>
<input type='hidden' name='plan_id' value='{$plan_id}'>
<input type='hidden' name='plan_has_managed_users' value='{$plan_has_managed_users}'>
<table cellpadding='0' cellspacing='0'>
<tr>
<td class='form1'>{lang_print id=100014138}</td>
<td class='form2'><input style="width:500px" type='text' class='text' name='plan_name' value='{$plan_info.plan_name}' size='40' maxlength='250'></td>
</tr>
<tr>
<td class='form1'>{lang_print id=100014139}</td>
<td class='form2'>
<textarea name="plan_description">{$plan_info.plan_description}</textarea>
{literal}<script src="../include/ckeditor/ckeditor.js"></script>
<script>
//CKFinder.setupCKEditor( );
// This call can be placed at any point after the
// <textarea>, or inside a <head><script> in a
// window.onload event handler.
// Replace the <textarea id="editor"> with an CKEditor
// instance, using default configurations.
var editor = CKEDITOR.replace( 'plan_description' ,{
filebrowserBrowseUrl : '../include/filemanager/dialog.php?type=2&editor=ckeditor&fldr=',
//filebrowserUploadUrl : '../include/filemanager/dialog.php?type=2&editor=ckeditor&fldr=',
filebrowserImageBrowseUrl : '../include/filemanager/dialog.php?type=1&editor=ckeditor&fldr='
});
//CKFinder.setupCKEditor( editor, '../include/ckeditor/ckfinder/' );
</script>
{/literal}
</td>
</tr>
<tr>
<td class='form1'>{lang_print id=100014140}</td>
<td class='form2'>
<select class='text' name='plan_enabled'>
<option value='1'{if $plan_info.plan_enabled == 1} SELECTED{/if}>{lang_print id=100014141}</option>
<option value='0'{if $plan_info.plan_enabled == 0} SELECTED{/if}>{lang_print id=100014142}</option>
</select>
</td>
</tr>
<tr>
<td class='form1'>{lang_print id=100014151}</td>
<td class='form2'>
<select class='text' name='plan_showonsignup'>
<option value='1'{if $plan_info.plan_showonsignup == 1} SELECTED{/if}>{lang_print id=100014141}</option>
<option value='0'{if $plan_info.plan_showonsignup == 0} SELECTED{/if}>{lang_print id=100014142}</option>
</select>
</td>
</tr>
<tr>
<td class='form1'>{lang_print id=100014145}</td>
<td class='form2'>
<select class='text' name='plan_level_id'>
{foreach from=$levels item=level}
<option value='{$level.level_id}'{if $plan_info.plan_level_id == $level.level_id} SELECTED{/if}>{$level.level_name}</option>
{/foreach}
</select>
</td>
</tr>
<tr>
<td class='form1'>{lang_print id=100014146}</td>
<td class='form2'>
<select class='text' name='plan_downgrade_level_id'>
{foreach from=$levels item=level}
<option value='{$level.level_id}'{if $plan_info.plan_downgrade_level_id == $level.level_id} SELECTED{/if}>{$level.level_name}</option>
{/foreach}
</select>
</td>
</tr>
<tr>
<td class='form1'>&nbsp;</td>
<td class='form2'>&nbsp; </td>
</tr>
<tr id="plan_trialperiod_row" {if $plan_info.plan_periodtype == 4}style="display: none"{/if}>
<td class='form1'>{lang_print id=100014148}</td>
<td class='form2'>
<input {if $plan_has_managed_users}disabled{/if} Xstyle="width:500px" type='text' class='text' name='plan_trialperiod' value='{$plan_info.plan_trialperiod}' size='5' maxlength='3'>
days
<input type="hidden" value="0" class='text' name='plan_trialperiodtype'>
</td>
</tr>
<tr>
<td class='form1'>{lang_print id=100014147}</td>
<td class='form2'>
<input {if $plan_info.plan_periodtype == 4}style="display: none"{/if} {if $plan_has_managed_users}disabled{/if} Xstyle="width:500px" type='text' class='text' name='plan_period' id='plan_period' value='{$plan_info.plan_period}' size='5' maxlength='3'>
days
<input type="hidden" class='text' name='plan_periodtype' value="0">
</td>
</tr>
<tr id="plan_recurring_row" {if $plan_info.plan_periodtype == 4}style="display: none"{/if}>
<td class='form1'>{lang_print id=100014152}</td>
<td class='form2'>
<select {if $plan_has_managed_users}disabled{/if} class='text' name='plan_recurring' onchange="plan_recurring_onChanged(this.value)">
<option value='1'{if $plan_info.plan_recurring == 1} SELECTED{/if}>{lang_print id=100014141}</option>
<option value='0'{if $plan_info.plan_recurring == 0} SELECTED{/if}>{lang_print id=100014142}</option>
</select>
<span id='recurring_div' style="padding-left: 5px; display: {if $plan_info.plan_recurring == 1}inline{else}none{/if}">
{lang_print id=100014158} <input {if $plan_has_managed_users}disabled{/if} type='text' class='text' name='plan_recurring_cycles' value='{$plan_info.plan_recurring_cycles}' size='5'> {lang_print id=100014157}
</span>
</td>
</tr>
<tr id="plan_price_row">
<td class='form1'>{lang_print id=100014149}</td>
<td class='form2'>
<input {if $plan_has_managed_users}disabled{/if} type='text' class='text' name='plan_price' value='{$plan_info.plan_price}' size='5'> &nbsp;&nbsp; {$currency_code}
</td>
</tr>
<tr id="plan_onetime_price_row" {if $plan_info.plan_periodtype == 4}style="display: none"{/if}>
<td class='form1'>{lang_print id=100014150}</td>
<td class='form2'>
<input {if $plan_has_managed_users}disabled{/if} type='text' class='text' name='plan_onetime_price' value='{$plan_info.plan_onetime_price}' size='5'> &nbsp;&nbsp; {$currency_code}
</td>
</tr>
<tr>
<td class='form1'>&nbsp;</td>
<td class='form2'>&nbsp; </td>
</tr>
<tr>
<td class='form1'>{lang_print id=100014159}</td>
<td class='form2'>
<input id="plan_levels_input" type="text" readonly="readonly" class="multiSelect" value="{lang_print id=100014160}" style="cursor: default;" />
<input type="hidden" id="plan_levels_all" name="plan_levels_all" value="{$levels_all}">
<iframe border=0 frameBorder=0 class="layerfix" id="plan_levels_iframe"></iframe>
<div id="plan_levels_div" class="multiSelectOptions" style="position: absolute; z-index: 99999; display: none;">
<label class="selectAll"><input type="checkbox" class="selectAll" /> {lang_print id=100014161} </label>
{section name=level_loop loop=$levelsx}
<label><input type="checkbox" name="plan_levels[]" value="{$levelsx[level_loop].level_id}" {if $levelsx[level_loop].level_selected} checked="checked" {/if}/> {$levelsx[level_loop].level_name} {if $levelsx[level_loop].level_default} {lang_print id=100014162} {/if} </label>
{/section}
</div>
</td>
</tr>
<tr>
<td class='form1'>{lang_print id=100014163}</td>
<td class='form2'>
<input id="plan_plans_input" type="text" readonly="readonly" class="multiSelect" value="{lang_print id=100014160}" style="cursor: default;" />
<input type="hidden" id="plan_plans_all" name="plan_plans_all" value="{$plans_all}">
<iframe border=0 frameBorder=0 class="layerfix" id="plan_plans_iframe"></iframe>
<div id="plan_plans_div" class="multiSelectOptions" style="position: absolute; z-index: 99999; display: none;">
<label class="selectAll"><input type="checkbox" class="selectAll" /> {lang_print id=100014161} </label>
{section name=plan_loop loop=$plans}
<label><input type="checkbox" name="plan_plans[]" value="{$plans[plan_loop].plan_id}" {if $plans[plan_loop].plan_selected} checked="checked" {/if}/> {$plans[plan_loop].plan_name} </label>
{/section}
</div>
</td>
</tr>
<tr>
<td class='form1'>&nbsp;</td>
<td class='form2'>&nbsp; </td>
</tr>
<tr>
<td class='form1'>&nbsp;</td>
<td class='form2'>
<table cellpadding='0' cellspacing='0'>
<tr>
<td><input type='submit' class='button' value='{lang_print id=100014143}'>&nbsp;</td>
</form>
<form action='admin_subscriber_plans.php' method='GET'>
<td><input type='submit' class='button' value='{lang_print id=100014144}'></td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<br>
<br>
<br>
<br>
<br>
<br>
{include file='admin_footer.tpl'}