2018-03-20 20:18:03 +00:00
|
|
|
function getParameterByName(name, url) {
|
|
|
|
if (!url) url = window.location.href;
|
|
|
|
name = name.replace(/[\[\]]/g, "\\$&");
|
|
|
|
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
|
|
|
|
results = regex.exec(url);
|
|
|
|
if (!results) return null;
|
|
|
|
if (!results[2]) return '';
|
|
|
|
return decodeURIComponent(results[2].replace(/\+/g, " "));
|
|
|
|
}
|
2018-03-18 18:37:59 +00:00
|
|
|
$(function () {
|
2018-05-03 15:49:57 +00:00
|
|
|
var param_rcp = getParameterByName('rcp');
|
2018-03-21 17:32:23 +00:00
|
|
|
if(param_rcp !== "" && param_rcp !== null && param_rcp !== undefined) {
|
2018-05-03 15:49:57 +00:00
|
|
|
var rcp_option = $('#recipient>option[value=' + param_rcp + ']');
|
2018-03-20 20:18:03 +00:00
|
|
|
if(rcp_option.length === 1) {
|
|
|
|
rcp_option.attr('selected', true);
|
|
|
|
$('#recipient_option_choose').removeAttr('selected');
|
2018-05-03 15:49:57 +00:00
|
|
|
$('select').formSelect();
|
2018-03-21 17:34:06 +00:00
|
|
|
} else {
|
2018-05-03 15:49:57 +00:00
|
|
|
$('select').formSelect();
|
2018-03-20 20:18:03 +00:00
|
|
|
}
|
|
|
|
} else {
|
2018-05-03 15:49:57 +00:00
|
|
|
$('select').formSelect();
|
|
|
|
|
2018-03-20 20:18:03 +00:00
|
|
|
}
|
2018-05-03 15:49:57 +00:00
|
|
|
});
|