1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-25 18:54:29 +01:00
ldapcherry/resources/static/js/alignforms.js

26 lines
917 B
JavaScript
Raw Normal View History

2017-04-06 01:20:51 +02:00
var classes = ["lcform-col-1", "lcform-col-2"];
var j, len_j = classes.length;
for(j=0; j < len_j; j++){
var formSelector = classes[j];
var forms = document.getElementsByClassName(formSelector);
//console.log(formSelector);
//console.log(forms);
if (forms.length > 0){
2017-04-06 01:21:57 +02:00
forms[0].style.removeProperty("display");
2017-04-06 01:20:51 +02:00
var InputGroups = forms[0].getElementsByClassName("input-group-addon");
//console.log(InputGroups);
var i, len = InputGroups.length;
var longest = 0;
for(i=0; i < len; i++){
2017-04-06 01:20:51 +02:00
if (InputGroups[i].id !== "basic-addon-password2"){
longest = longest < InputGroups[i].clientWidth ? InputGroups[i].clientWidth : longest;
}
}
for(i=0; i < len; i++){
2017-04-06 01:20:51 +02:00
InputGroups[i].style.minWidth = (longest + 0) + "px";
}
//console.log(longest);
}
}
//console.log("end_re");