@@ -10,10 +10,10 @@ <h2>Configuration Files</h2>
1010 < div id ="config-files ">
1111 {% for file in settings.config_files %}
1212 < div >
13- < label for ="file_ {{ loop.index0 }} "> Name:</ label >
14- < input type ="text " name ="config_files " id ="file_ {{ loop.index0 }} " value ="{{ file.name }} ">
15- < label for ="path_ {{ loop.index0 }} "> Path:</ label >
16- < input type ="text " name ="path_{{ loop.index0 }} " id ="path_ {{ loop.index0 }} " value ="{{ file.path }} ">
13+ < label for ="file_name_ {{ loop.index0 }} "> Name:</ label >
14+ < input type ="text " name ="config_files_names " id ="file_name_ {{ loop.index0 }} " value ="{{ file.name }} ">
15+ < label for ="file_path_ {{ loop.index0 }} "> Path:</ label >
16+ < input type ="text " name ="config_files_paths " id ="file_path_ {{ loop.index0 }} " value ="{{ file.path }} ">
1717 </ div >
1818 {% endfor %}
1919 </ div >
@@ -33,20 +33,19 @@ <h2>Additional Settings</h2>
3333</ form >
3434</ div >
3535
36-
3736< script >
3837 document . getElementById ( 'add-file' ) . addEventListener ( 'click' , function ( ) {
3938 const configFilesDiv = document . getElementById ( 'config-files' ) ;
4039 const index = configFilesDiv . children . length ;
4140 const newFileDiv = document . createElement ( 'div' ) ;
4241 newFileDiv . innerHTML = `
43- <label for="file_ ${ index } ">Name:</label>
44- <input type="text" name="config_files " id="file_ ${ index } " value="">
45- <label for="path_ ${ index } ">Path:</label>
46- <input type="text" name="path_ ${ index } " id="path_ ${ index } " value="">
47- ` ;
42+ <label for="file_name_ ${ index } ">Name:</label>
43+ <input type="text" name="config_files_names " id="file_name_ ${ index } " value="">
44+ <label for="file_path_ ${ index } ">Path:</label>
45+ <input type="text" name="config_files_paths " id="file_path_ ${ index } " value="">
46+ ` ;
4847 configFilesDiv . appendChild ( newFileDiv ) ;
4948 } ) ;
5049</ script >
5150
52- {% endblock %}
51+ {% endblock %}
0 commit comments