Add record helper for TXT type. #380

This commit is contained in:
Khanh Ngo 2018-10-30 09:55:31 +07:00
parent 3fea57fca1
commit d3972b659a
2 changed files with 17 additions and 1 deletions

View file

@ -412,6 +412,22 @@
modal.modal('hide');
})
modal.modal('show');
} else if (record_type == "TXT") {
var txt_data = record_data.val().replace(/"/g, '"');
var modal = $("#modal_custom_record");
var form = " <label for=\"txt_record\">TXT Record Data</label> \
<textarea style=\"min-width: 100%;color: #333;\" placeholder=\"Your TXT record data\" rows=\"5\" id=\"txt_record\" name=\"txt_record\">" + txt_data + "</textarea> \
";
modal.find('.modal-body p').html(form);
modal.find('#button_save').click(function() {
data = modal.find('#txt_record').val();
if (! /^".*"$/.test(data)) {
data = '"' + data + '"';
}
record_data.val(data);
modal.modal('hide');
})
modal.modal('show');
}
});
{% endif %}

View file

@ -600,7 +600,7 @@ def dashboard_domains_updater():
return jsonify(response_data)
@app.route('/domain/<path:domain_name>', methods=['GET', 'POST'])
@app.route('/domain/<path:domain_name>', methods=['GET'])
@login_required
@can_access_domain
def domain(domain_name):