Commit babacd5d authored by Sergio's avatar Sergio
Browse files

checkbox to convert client on reseller, fixes FS#925

parent 8abd175a
......@@ -96,6 +96,10 @@ class page_action extends tform_actions {
//* Resellers shall not be able to create another reseller
if($_SESSION["s"]["user"]["typ"] == 'user') {
$this->dataRecord['limit_client'] = 0;
} else {
if($this->dataRecord["reseller"]) {
$this->dataRecord["limit_client"] = 1;
}
}
if($this->id != 0) {
......
......@@ -176,4 +176,5 @@ $wb['parent_client_id_txt'] = 'Client of reseller';
$wb['none_txt'] = 'none';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
$wb['reseller_txt'] = 'Reseller';
?>
......@@ -155,4 +155,7 @@ $wb['added_by_txt'] = 'Creado por';
$wb['added_date_txt'] = 'Fecha de alta';
$wb['parent_client_id_txt'] = 'Cliente de revendedor';
$wb['none_txt'] = 'ninguno';
$wb['limit_database_quota_txt'] = 'Cuota de base de datos';
$wb['limit_database_quota_error_notint'] = 'Cuota de base de datos debe ser un número.';
$wb['reseller_txt'] = 'Revendedor';
?>
......@@ -44,6 +44,10 @@
{tmpl_var name='parent_client_id'}
</select>
</div>
<div class="ctrlHolder">
<label for="reseller">{tmpl_var name='reseller_txt'}</label>
<input type="checkbox" name="reseller" value="1" id="reseller" />
</div>
</tmpl_if>
<div class="subsectiontoggle"><span class="showing"></span>{tmpl_var name='web_limits_txt'}<em class="showing"></em></div>
<div>
......@@ -331,7 +335,7 @@ jQuery('div.panel_client')
.find('div.pnl_formsarea')
.find('fieldset')
.find('input,select,button')
.not('#template_master,#template_additional,#default_mailserver,#default_webserver,#default_dbserver,#default_dnsserver,#default_slave_dnsserver,#customer_no_template,#customer_no_start,#customer_no_counter,#parent_client_id')
.not('#template_master,#template_additional,#default_mailserver,#default_webserver,#default_dbserver,#default_dnsserver,#default_slave_dnsserver,#customer_no_template,#customer_no_start,#customer_no_counter,#parent_client_id,#reseller')
.click(function(e) {
if(custom_template_selected()) return true;
e.preventDefault();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment