Bootstrap 当我使用 Django Jinjna 模板将 "schemaname.tablename" 发送到 id 字段时,模式弹出中断
Bootstrap modal pop up breaks when i send "schemaname.tablename" into id field using Django Jinjna template
下面是我的 html 脚本,当我发送 schema_name.table_name 到我的模式的 'id' 属性时,弹出模式不显示,弹出模式中断,但工作以及下面注释中提到的
注意:当我只发送table_name到'id'属性时,显示弹出但我需要发送schema_name,请帮助
<input type="checkbox" id='dbo.segment_customer_hash_mapping_history' name="acs[]" value="dbo.segment_customer_hash_mapping_history"> dbo.segment_customer_hash_mapping_history
<!-- <form action="/dwdatacatlog2/" method="GET">-->
<button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModaldbo.segment_customer_hash_mapping_history">Add
filter
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-plus-circle" fill="currentColor"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
<path fill-rule="evenodd"
d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>
</svg>
</button>
<!-- <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Open Small Modal</button>-->
<!-- Modal -->
<div class="modal fade" id="myModaldbo.segment_customer_hash_mapping_history" role="dialog">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h4>Add Filters</h4>
<!-- <h4 class="modal-title">Modal Header</h4>-->
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<p><small>Table name</small></p>
<p>dbo.segment_customer_hash_mapping_history</p>
<p>
<select id="columnname" name="columnname" class="form-control"
onchange="changecat(this);">
<!-- onchange="populatefilter()"-->
<option value="int////audit_id"> audit_id<small>(int)</small></option>
<option value="int////segment_id"> segment_id<small>(int)</small></option>
<option value="varchar////segment_name"> segment_name<small>(varchar)</small></option>
<option value="varchar////customer_hash"> customer_hash<small>(varchar)</small></option>
<option value="varchar////created_by"> created_by<small>(varchar)</small></option>
<option value="datetime////created_on"> created_on<small>(datetime)</small></option>
</select>
<br>
</select>
<select name="datatype" id="datatype" class="form-control">
<option value="" disabled selected>Select</option>
</select>
<br>
<input type="text" name="parametervalue" class="form-control" aria-label="Default"
aria-describedby="inputGroup-sizing-default"
placeholder="enter corresponding column value" required="True">
</option>
</div>
<div class="modal-footer justify-content-between">
<button type="button" class="btn default" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-secondary "> Submit</button>
</div>
</div>
</div>
</div>
<!-- </form>-->
</tr>
<!-- -->
<tr>
<br>
<!-- <input type="button" value="filter"> -->
<hr>
</tr>
属性 id='dbo.segment_customer_hash_mapping_history' '.'导致模态弹出窗口出现问题
对后端进行了更改,这样 id 就不会点“.”了。这个解决方法对我有帮助
下面是我的 html 脚本,当我发送 schema_name.table_name 到我的模式的 'id' 属性时,弹出模式不显示,弹出模式中断,但工作以及下面注释中提到的
注意:当我只发送table_name到'id'属性时,显示弹出但我需要发送schema_name,请帮助
<input type="checkbox" id='dbo.segment_customer_hash_mapping_history' name="acs[]" value="dbo.segment_customer_hash_mapping_history"> dbo.segment_customer_hash_mapping_history
<!-- <form action="/dwdatacatlog2/" method="GET">-->
<button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModaldbo.segment_customer_hash_mapping_history">Add
filter
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-plus-circle" fill="currentColor"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
<path fill-rule="evenodd"
d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>
</svg>
</button>
<!-- <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Open Small Modal</button>-->
<!-- Modal -->
<div class="modal fade" id="myModaldbo.segment_customer_hash_mapping_history" role="dialog">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h4>Add Filters</h4>
<!-- <h4 class="modal-title">Modal Header</h4>-->
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<p><small>Table name</small></p>
<p>dbo.segment_customer_hash_mapping_history</p>
<p>
<select id="columnname" name="columnname" class="form-control"
onchange="changecat(this);">
<!-- onchange="populatefilter()"-->
<option value="int////audit_id"> audit_id<small>(int)</small></option>
<option value="int////segment_id"> segment_id<small>(int)</small></option>
<option value="varchar////segment_name"> segment_name<small>(varchar)</small></option>
<option value="varchar////customer_hash"> customer_hash<small>(varchar)</small></option>
<option value="varchar////created_by"> created_by<small>(varchar)</small></option>
<option value="datetime////created_on"> created_on<small>(datetime)</small></option>
</select>
<br>
</select>
<select name="datatype" id="datatype" class="form-control">
<option value="" disabled selected>Select</option>
</select>
<br>
<input type="text" name="parametervalue" class="form-control" aria-label="Default"
aria-describedby="inputGroup-sizing-default"
placeholder="enter corresponding column value" required="True">
</option>
</div>
<div class="modal-footer justify-content-between">
<button type="button" class="btn default" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-secondary "> Submit</button>
</div>
</div>
</div>
</div>
<!-- </form>-->
</tr>
<!-- -->
<tr>
<br>
<!-- <input type="button" value="filter"> -->
<hr>
</tr>
属性 id='dbo.segment_customer_hash_mapping_history' '.'导致模态弹出窗口出现问题
对后端进行了更改,这样 id 就不会点“.”了。这个解决方法对我有帮助