diff --git a/src/assets/js/backend_users_providers.js b/src/assets/js/backend_users_providers.js
index 8b37f97d..23b40780 100644
--- a/src/assets/js/backend_users_providers.js
+++ b/src/assets/js/backend_users_providers.js
@@ -358,6 +358,7 @@
$('#providers .record-details').find('input, textarea').val('');
$('#providers input[type="checkbox"]').prop('checked', false);
$('#provider-services input[type="checkbox"]').prop('checked', false);
+ $('#provider-services a').remove();
$('#providers .breaks tbody').empty();
};
@@ -386,11 +387,26 @@
$('#provider-notifications').removeClass('active');
}
+ // Add dedicated provider link.
+ var dedicatedUrl = GlobalVariables.baseUrl + '/index.php?provider=' + encodeURIComponent(provider.id);
+ var linkHtml = '';
+ $('#providers .record-details h3')
+ .find('a')
+ .remove()
+ .end()
+ .append(linkHtml);
+
+ $('#provider-services a').remove();
$('#provider-services input[type="checkbox"]').prop('checked', false);
$.each(provider.services, function(index, serviceId) {
$('#provider-services input[type="checkbox"]').each(function() {
if ($(this).attr('data-id') == serviceId) {
$(this).prop('checked', true);
+ // Add dedicated service-provider link.
+ dedicatedUrl = GlobalVariables.baseUrl + '/index.php?provider=' + encodeURIComponent(provider.id)
+ + '&service=' + encodeURIComponent(serviceId);
+ linkHtml = '';
+ $(this).parent().append(linkHtml);
}
});
});