mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 14:40:27 +00:00
PR Conflict resolution
This commit is contained in:
parent
d0961ca5e7
commit
9b696a42a4
@ -102,6 +102,28 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p>Domains on the right are associated with the account. Red marked domain names are already associated with other accounts.
|
||||
Moving already associated domains to this account will overwrite the previous associated account.
|
||||
</p>
|
||||
<p>Hover over the red domain names to show the associated account. Click on domains to move between columns.</p>
|
||||
<div class="form-group col-2">
|
||||
<select multiple="multiple" class="form-control" id="account_domains"
|
||||
name="account_domains">
|
||||
{% for domain in domains %}
|
||||
{% if account != None and domain.account_id != None and account.id != domain.account_id %}
|
||||
{% with account_id=domain.account_id %}
|
||||
<option style="color: red" data-toggle="tooltip" title="Associated with: {{ accounts[account_id].name }}"
|
||||
value="{{ domain.name }}">{{ domain.name }}</option>
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
<option {% if account.id == domain.account_id %}selected{% endif %}
|
||||
value="{{ domain.name }}">{{ domain.name }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button type="button" class="btn btn-secondary float-left" onclick="window.location.href='{{ url_for('admin.manage_account') }}'">
|
||||
@ -145,9 +167,10 @@
|
||||
{% endblock %}
|
||||
{% block extrascripts %}
|
||||
<script>
|
||||
$("#account_multi_user").multiSelect({
|
||||
selectableHeader: "<input type='text' class='search-input' autocomplete='off' placeholder='Username'>",
|
||||
selectionHeader: "<input type='text' class='search-input' autocomplete='off' placeholder='Username'>",
|
||||
function addMultiSelect(id, placeholder) {
|
||||
$(id).multiSelect({
|
||||
selectableHeader: `<input type='text' class='search-input' autocomplete='off' placeholder='${placeholder}'>`,
|
||||
selectionHeader: `<input type='text' class='search-input' autocomplete='off' placeholder='${placeholder}'>`,
|
||||
afterInit: function (ms) {
|
||||
var that = this,
|
||||
$selectableSearch = that.$selectableUl.prev(),
|
||||
@ -180,5 +203,8 @@
|
||||
this.qs2.cache();
|
||||
}
|
||||
});
|
||||
}
|
||||
addMultiSelect("#account_multi_user", "Username")
|
||||
addMultiSelect("#account_domains", "Domain")
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user