Diag DNS disable Add Alias button when host field is changed

(cherry picked from commit 45eafdbd7b)
This commit is contained in:
Phil Davis 2017-05-21 10:29:23 +05:45 committed by Renato Botelho
parent 12ca33f4dc
commit 2e294992e4

View File

@ -365,4 +365,21 @@ if (!$input_errors && $type) {
</div>
<?php
}
?>
<script type="text/javascript">
//<![CDATA[
events.push(function() {
var original_host = "<?=$host;?>";
$('input[name="host"]').on('input', function() {
if ($('#host').val() == original_host) {
disableInput('create_alias', false);
} else {
disableInput('create_alias', true);
}
});
});
//]]>
</script>
<?php
include("foot.inc");