forked from MapComplete/MapComplete
		
	Refactor htmlElement to Template literals
Makes it a bit easier to read.
This commit is contained in:
		
							parent
							
								
									61964a801f
								
							
						
					
					
						commit
						e1568876b8
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
					@ -74,14 +74,14 @@ export class RadioButton<T> extends InputElement<T> {
 | 
				
			||||||
        for (let i = 0; i < this._elements.length; i++){
 | 
					        for (let i = 0; i < this._elements.length; i++){
 | 
				
			||||||
            const el = this._elements[i];
 | 
					            const el = this._elements[i];
 | 
				
			||||||
            const htmlElement =
 | 
					            const htmlElement =
 | 
				
			||||||
                '<input type="radio" id="' + this.IdFor(i) + '" name="radiogroup-' + this.id + '">' +
 | 
					                `<input type="radio" id="${this.IdFor(i)}" name="radiogroup-${this.id}">` +
 | 
				
			||||||
                '<label for="' + this.IdFor(i) + '">' + el.Render() + '</label>' +
 | 
					                `<label for="${this.IdFor(i)}">${el.Render()}</label>` +
 | 
				
			||||||
                '<br>';
 | 
					                `<br>`;
 | 
				
			||||||
            body += htmlElement;
 | 
					            body += htmlElement;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return "<form id='" + this.id + "-form'>" + body + "</form>";
 | 
					        return `<form id='${this.id}-form'>${body}</form>`;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public ShowValue(t: T): boolean {
 | 
					    public ShowValue(t: T): boolean {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue