mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 20:18:38 +02:00
update the update of readonly row
This commit is contained in:
parent
c7160dfe01
commit
1575d12fb4
1 changed files with 13 additions and 4 deletions
|
@ -343,15 +343,24 @@ export class NameserverForm {
|
||||||
copyEditRowToReadonlyRow(editRow, readOnlyRow) {
|
copyEditRowToReadonlyRow(editRow, readOnlyRow) {
|
||||||
let textInputs = editRow.querySelectorAll("input[type='text']");
|
let textInputs = editRow.querySelectorAll("input[type='text']");
|
||||||
let tds = readOnlyRow.querySelectorAll("td");
|
let tds = readOnlyRow.querySelectorAll("td");
|
||||||
|
let updatedText = '';
|
||||||
|
|
||||||
// if server is defined, copy the value to the first td in readOnlyRow
|
// if server is defined, copy the value to the first td in readOnlyRow
|
||||||
if (textInputs[0] && tds[0]) {
|
if (textInputs[0]) {
|
||||||
tds[0].innerText = textInputs[0].value;
|
updatedText = textInputs[0].value;
|
||||||
|
//tds[0].innerText = textInputs[0].value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if ip is defined, copy the value to the second td in readOnlyRow
|
// if ip is defined, copy the value to the second td in readOnlyRow
|
||||||
if (textInputs[1] && tds[1]) {
|
if (textInputs[1]) {
|
||||||
tds[1].innerText = textInputs[1].value;
|
if (textInputs[1].value) {
|
||||||
|
updatedText = updatedText + "(" + textInputs[1].value + ")";
|
||||||
|
}
|
||||||
|
//tds[1].innerText = textInputs[1].value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tds[0]) {
|
||||||
|
tds[0].innerText = updatedText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue