Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 20 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | export function createAddnewContainer(container, translation = {close: '', address: ''}) { |
||
2 | let overlay = document.createElement('div'); |
||
3 | |||
4 | overlay.setAttribute('class', 'bg-overlay add-new-address'); |
||
5 | overlay.innerHTML = ` |
||
6 | <div class="close" data-action="close" title="${translation.close}">╳</div> |
||
7 | <div class="valign"> |
||
8 | <div class="edit-marker-form"> |
||
9 | <label for="address">${translation.address}</label> |
||
10 | <input type="text" name="address" id="address" placeholder="${translation.address}" class="add-marker-form__address"/> |
||
11 | </div> |
||
12 | </div> |
||
13 | `; |
||
14 | |||
15 | container.append(overlay); |
||
16 | |||
17 | overlay.querySelector('*[data-action="close"]').addEventListener('click', () => overlay.parentNode.removeChild(overlay)); |
||
18 | |||
19 | return overlay; |
||
20 | } |