File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,15 +163,6 @@ function getRevServerArray() {
163163}
164164
165165function createRevServerTable ( ) {
166- // The Conditional Forwarding option will be disabled when this option was set via ENV VAR.
167- // Check if the textarea is disabled.
168- if ( $ ( ".revServers" ) . prop ( "disabled" ) ) {
169- // In this case, we don't show the table because the values can't be changed.
170- // Show the disabled textarea and return
171- $ ( ".revServers" ) . show ( ) ;
172- return ;
173- }
174-
175166 // Get the data
176167 const tableRows = getRevServerArray ( ) ;
177168
@@ -376,7 +367,16 @@ function processDNSConfig() {
376367 } )
377368 . done ( ( ) => {
378369 // This will be executed only after the done block above is executed
379- createRevServerTable ( ) ;
370+
371+ // If Conditional Forwarding option is set via ENV VAR, the textarea will be disabled and no values can be edited
372+ if ( $ ( ".revServers" ) . prop ( "disabled" ) ) {
373+ // In this case, we hide the table and show the textarea
374+ $ ( "#revServers-table" ) . hide ( ) ;
375+ $ ( ".revServers" ) . show ( ) . attr ( "title" , "Disabled: Set by environment variable" ) ;
376+ } else {
377+ // We only populate the table when the textarea is enabled
378+ createRevServerTable ( ) ;
379+ }
380380 } )
381381 . fail ( data => {
382382 apiFailure ( data ) ;
You can’t perform that action at this time.
0 commit comments