// Remove preactivation from installer
This commit is contained in:
@@ -20,13 +20,7 @@ $(document).ready(function()
|
||||
$('#infosTimezone').val(json.message);
|
||||
}
|
||||
});
|
||||
|
||||
// Load associated partners
|
||||
//load_partners(iso);
|
||||
});
|
||||
|
||||
//if (default_iso)
|
||||
// load_partners(default_iso);
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -66,60 +60,3 @@ function upload_logo()
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Load partners for a given country
|
||||
*
|
||||
* @param string iso
|
||||
*/
|
||||
function load_partners(iso)
|
||||
{
|
||||
$.ajax({
|
||||
url: 'index.php',
|
||||
data: 'getPartners=true&iso='+iso,
|
||||
dataType: 'json',
|
||||
cache: false,
|
||||
success: function(json)
|
||||
{
|
||||
if (json.success)
|
||||
{
|
||||
// Display partner HTML
|
||||
$('#benefitsBlock').html(json.message).show();
|
||||
|
||||
// Add event on partner checkbox to display fields if it's checked
|
||||
$('.preinstall_partner').click(function()
|
||||
{
|
||||
var name = $(this).attr('name');
|
||||
var partner_id = name.substr(8, name.length - 9);
|
||||
|
||||
if ($(this).attr('checked'))
|
||||
load_partner_fields(partner_id, iso);
|
||||
else
|
||||
$('#partner_fields_'+partner_id).html('').hide();
|
||||
});
|
||||
}
|
||||
else
|
||||
$('#benefitsBlock').html('');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Display partner fields
|
||||
*
|
||||
* @param string partner_id Key of partner
|
||||
*/
|
||||
function load_partner_fields(partner_id, iso)
|
||||
{
|
||||
$.ajax({
|
||||
url: 'index.php',
|
||||
data: 'getPartnersFields=true&partner_id='+partner_id+'&iso='+iso,
|
||||
dataType: 'json',
|
||||
cache: false,
|
||||
success: function(json)
|
||||
{
|
||||
if (json.success)
|
||||
$('#partner_fields_'+partner_id).html(json.message).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user