Skip to content

Commit

Permalink
Merge pull request #3 from timon1988/master
Browse files Browse the repository at this point in the history
Bugfix: enable textarea fields just like input and select on adding a…
  • Loading branch information
MichielCM authored Aug 28, 2017
2 parents 271975c + fbc1984 commit 99d8e3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions xsd+xml2html.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
var clickAddButton = function(button) {
var newNode = button.previousElementSibling.cloneNode(true);

newNode.querySelectorAll("input, select").forEach(function(o) {
newNode.querySelectorAll("input, select, textarea").forEach(function(o) {
o.removeAttribute("disabled");
});

Expand Down Expand Up @@ -193,7 +193,7 @@
var clickRadioInput = function(input, name) {
document.querySelectorAll("[name=" + name + "]").forEach(function(o) {
o.removeAttribute("checked");
o.parentElement.nextElementSibling.querySelectorAll("input, select").forEach(function(p) {
o.parentElement.nextElementSibling.querySelectorAll("input, select, textarea").forEach(function(p) {
if (input.parentElement.nextElementSibling.contains(p))
p.removeAttribute("disabled");
else
Expand Down
4 changes: 2 additions & 2 deletions xsd2html.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
var clickAddButton = function(button) {
var newNode = button.previousElementSibling.cloneNode(true);

newNode.querySelectorAll("input, select").forEach(function(o) {
newNode.querySelectorAll("input, select, textarea").forEach(function(o) {
o.removeAttribute("disabled");
});

Expand Down Expand Up @@ -185,7 +185,7 @@
var clickRadioInput = function(input, name) {
document.querySelectorAll("[name=" + name + "]").forEach(function(o) {
o.removeAttribute("checked");
o.parentElement.nextElementSibling.querySelectorAll("input, select").forEach(function(p) {
o.parentElement.nextElementSibling.querySelectorAll("input, select, textarea").forEach(function(p) {
if (input.parentElement.nextElementSibling.contains(p))
p.removeAttribute("disabled");
else
Expand Down

0 comments on commit 99d8e3d

Please sign in to comment.