Pavel Loginov 2022-05-07 11:28:38 +03:00
parent 2e74e78f43
commit 53d7ba34ee
2 changed files with 13 additions and 12 deletions

View File

@ -1,15 +1,5 @@
{% from 'include/input_macros.html' import input, checkbox, copy_to_clipboard %} {% from 'include/input_macros.html' import input, checkbox, copy_to_clipboard %}
{% if user_status == 0 or user_plan == 'user' %} {% if user_status == 0 or user_plan == 'user' %}
<script>
$( function() {
$('select:regex(id, slavefor)').selectmenu("disable");
{% if user_status == 0 %}
$('#slavefor-th').attr("title", "Actions with the master config will automatically apply on the slave. You are not subscribed. Please subscribe to have access to this feature");
{% elif user_plan == 'user' %}
$('#slavefor-th').attr("title", "Actions with the master config will automatically apply on the slave. This feature is not available for your plan");
{% endif %}
});
</script>
{% endif %} {% endif %}
{% if not adding %} {% if not adding %}
<table class="overview" id="ajax-servers"> <table class="overview" id="ajax-servers">
@ -199,3 +189,14 @@
or read HowTo in this <a href="https://roxy-wi.org/howto.py?howto=setup" title="How to setup servers, group and SSH credentials" target="_blank">article</a> or read HowTo in this <a href="https://roxy-wi.org/howto.py?howto=setup" title="How to setup servers, group and SSH credentials" target="_blank">article</a>
</div> </div>
{% endif %} {% endif %}
<script>
$( function() {
$('select:regex(id, slavefor)').selectmenu();
$('select:regex(id, slavefor)').selectmenu("disable");
{% if user_status == 0 %}
$('#slavefor-th').attr("title", "Actions with the master config will automatically apply on the slave. You are not subscribed. Please subscribe to have access to this feature");
{% elif user_plan == 'user' %}
$('#slavefor-th').attr("title", "Actions with the master config will automatically apply on the slave. This feature is not available for your plan");
{% endif %}
});
</script>

View File

@ -1999,7 +1999,7 @@ function changePortCheckFromServerPort() {
$($(this)).next().val(iNum); $($(this)).next().val(iNum);
}); });
} }
function checkIsServerFiled(select_id, message = 'Choose the server first') { function checkIsServerFiled(select_id, message = 'Select a server first') {
if ($(select_id).val() == null || $(select_id).val() == '') { if ($(select_id).val() == null || $(select_id).val() == '') {
toastr.warning(message); toastr.warning(message);
return false; return false;