Commit 41633be1 authored by ibuler's avatar ibuler

[Bugfix] 修复无法删除资产组

parent d2620a65
......@@ -32,7 +32,7 @@
</ul>
</div>
<div class="tab-content">
<div class="col-sm-9" style="padding-left: 0;">
<div class="col-sm-7" style="padding-left: 0;">
<div class="ibox float-e-margins">
<div class="ibox-title">
<span class="label"><b>{{ idc.name }}</b></span>
......@@ -51,10 +51,10 @@
</div>
</div>
<div class="ibox-content">
<table class="table idc-details">
<table class="table">
<tbody>
<tr class="no-borders-tr" data-name="{{ idc.name }}">
<td>{% trans 'Name' %}:</td>
<tr class="no-borders-tr">
<td width="20%">{% trans 'Name' %}:</td>
<td><b>{{ idc.name }}</b></td>
</tr>
<tr>
......
......@@ -26,7 +26,6 @@ class UserGroup(NoDeleteModelMixin):
__str__ = __unicode__
def delete(self, using=None, keep_parents=False):
self.group_ptr.delete()
if self.name != 'Default':
self.users.clear()
return super(UserGroup, self).delete()
......
......@@ -77,22 +77,22 @@
{% csrf_token %}
<tr class="no-borders-tr">
<td colspan="1" style="padding-top: 0">
{% bootstrap_field form.name layout="horizontal" %}
{% bootstrap_field form.name %}
</td>
</tr>
<tr class="no-borders-tr">
<td colspan="1" style="padding-top: 0">
{% bootstrap_field form.assets layout="horizontal" %}
{% bootstrap_field form.assets %}
</td>
</tr>
<tr class="no-borders-tr">
<td colspan="1" style="padding-top: 0">
{% bootstrap_field form.asset_groups layout="horizontal" %}
{% bootstrap_field form.asset_groups %}
</td>
</tr>
<tr class="no-borders-tr">
<td colspan="1" style="padding-top: 0">
{% bootstrap_field form.system_users layout="horizontal" %}
{% bootstrap_field form.system_users %}
</td>
</tr>
<tr class="no-borders-tr">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment