Fixed a bug introduced by the recent updates for the mobile-first PR.

This commit is contained in:
Matt Scott 2023-02-25 16:50:08 -05:00
parent 81bd5804e0
commit df94baa81e

View File

@ -90,11 +90,13 @@
<div class="card-body"> <div class="card-body">
<div class="form-group"> <div class="form-group">
<input type="checkbox" id="chkAutoPtr" class="auto_ptr_toggle" <input type="checkbox" id="chkAutoPtr" class="auto_ptr_toggle"
{% for setting in domain.settings %}{% if setting.setting=='auto_ptr' and setting.value=='True' %}checked data-zone="{{ domain.name }}"
{% endif %}{% endfor %} {% for setting in domain.settings %}{% if setting.setting=='auto_ptr' and setting.value=='True' %}checked
{% if SETTING.get('auto_ptr') %}disabled="True" {% endif %}> {% endif %}{% endfor %}
{% if SETTING.get('auto_ptr') %}disabled="True" {% endif %}>
&nbsp; &nbsp;
<label for="chkAutoPtr">Allow automatic reverse pointer creation on record updates?</label> <label for="chkAutoPtr">Allow automatic reverse pointer creation on record
updates?</label>
{% if SETTING.get('auto_ptr') %} {% if SETTING.get('auto_ptr') %}
<p><code>Auto-ptr is enabled globally on the PDA system!</code></p> <p><code>Auto-ptr is enabled globally on the PDA system!</code></p>
{% endif %} {% endif %}
@ -116,8 +118,9 @@
<div class="card-body"> <div class="card-body">
<div class="form-group"> <div class="form-group">
<input type="checkbox" id="chkDynDns" class="dyndns_on_demand_toggle" <input type="checkbox" id="chkDynDns" class="dyndns_on_demand_toggle"
{% for setting in domain.settings %}{% if setting.setting=='create_via_dyndns' and setting.value=='True' %}checked data-zone="{{ domain.name }}"
{% endif %}{% endfor %}> {% for setting in domain.settings %}{% if setting.setting=='create_via_dyndns' and setting.value=='True' %}checked
{% endif %}{% endfor %}>
&nbsp; &nbsp;
<label for="chkDynDns">Allow on-demand creation of records via DynDNS updates?</label> <label for="chkDynDns">Allow on-demand creation of records via DynDNS updates?</label>
</div> </div>
@ -278,7 +281,8 @@
<option>EPOCH</option> <option>EPOCH</option>
<option>OFF</option> <option>OFF</option>
</select><br/> </select><br/>
<button type="submit" title="Update SOA-EDIT-API" class="btn btn-primary" id="change_soa_edit_api"> <button type="submit" title="Update SOA-EDIT-API" class="btn btn-primary"
id="change_soa_edit_api">
<i class="fa-solid fa-floppy-disk"></i>&nbsp;Update SOA-EDIT-API <i class="fa-solid fa-floppy-disk"></i>&nbsp;Update SOA-EDIT-API
</button> </button>
</form> </form>
@ -373,7 +377,7 @@
//handle checkbox toggling //handle checkbox toggling
$('.dyndns_on_demand_toggle').on('ifToggled', function (event) { $('.dyndns_on_demand_toggle').on('ifToggled', function (event) {
var is_checked = $(this).prop('checked'); var is_checked = $(this).prop('checked');
var domain = $(this).prop('id'); var domain = $(this).data('zone')
postdata = { postdata = {
'action': 'set_setting', 'action': 'set_setting',
'data': { 'data': {
@ -386,7 +390,7 @@
}); });
$('.auto_ptr_toggle').on('ifToggled', function (event) { $('.auto_ptr_toggle').on('ifToggled', function (event) {
var is_checked = $(this).prop('checked'); var is_checked = $(this).prop('checked');
var domain = $(this).prop('id'); var domain = $(this).data('zone')
postdata = { postdata = {
'action': 'set_setting', 'action': 'set_setting',
'data': { 'data': {