Commit 39fff235 authored by ibuler's avatar ibuler

[Bugfix] 修复cluster创建的bug

parent 7316661e
......@@ -38,7 +38,7 @@
{% bootstrap_field form.contact layout="horizontal" %}
{% bootstrap_field form.phone layout="horizontal" %}
<h3 class="widget-head-color-box">{% trans 'Settings' %}</h3>
<h3 class="widget-head-color-box">{% trans 'Setting' %}</h3>
{% bootstrap_field form.admin_user layout="horizontal" %}
{% bootstrap_field form.system_users layout="horizontal" %}
......
......@@ -46,7 +46,7 @@ class ClusterCreateView(AdminUserRequiredMixin, SuccessMessageMixin, CreateView)
return super().get_context_data(**kwargs)
def form_valid(self, form):
cluster = form.save(commit=False)
cluster = form.save()
cluster.created_by = self.request.user.username
cluster.save()
return super().form_valid(form)
......
......@@ -52,7 +52,6 @@
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
<button class="btn btn-default btn-test" type="button"> {% trans 'Test connection' %}</button>
<button class="btn btn-default" type="reset"> {% trans 'Reset' %}</button>
<button id="submit_button" class="btn btn-primary" type="submit">{% trans 'Submit' %}</button>
</div>
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Jumpserver 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-12 15:51+0800\n"
"POT-Creation-Date: 2018-01-12 18:51+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: Jumpserver team<ibuler@qq.com>\n"
......@@ -1107,10 +1107,10 @@ msgstr "选择资产"
msgid "Task has been send, seen left assets status"
msgstr "任务已下发,查看左侧资产状态"
#: assets/templates/assets/cluster_create_update.html:41 common/views.py:17
#: common/views.py:44 common/views.py:69 templates/_nav.html:74
#: assets/templates/assets/cluster_create_update.html:41
#: users/templates/users/reset_password.html:57
#: users/templates/users/user_profile.html:20
msgid "Settings"
msgid "Setting"
msgstr "设置"
#: assets/templates/assets/cluster_list.html:11 assets/views/cluster.py:43
......@@ -1409,6 +1409,11 @@ msgstr "LDAP设置"
msgid "Test connection"
msgstr "测试连接"
#: common/views.py:17 common/views.py:44 common/views.py:69
#: templates/_nav.html:69
msgid "Settings"
msgstr "系统设置"
#: common/views.py:30 common/views.py:55 common/views.py:80
msgid "Update setting successfully"
msgstr "更新设置成功"
......@@ -1955,14 +1960,14 @@ msgstr "离线会话"
msgid "Command"
msgstr "命令"
#: templates/_nav.html:56 templates/_nav_user.html:14
msgid "Web terminal"
msgstr "Web终端"
#: templates/_nav_user.html:4
msgid "My assets"
msgstr "我的资产"
#: templates/_nav_user.html:14
msgid "Web terminal"
msgstr "Web终端"
#: templates/captcha/image.html:3
msgid "Play CAPTCHA as audio file"
msgstr "语言播放验证码"
......@@ -2423,10 +2428,6 @@ msgstr "重置密码"
msgid "Password again"
msgstr "再次输入密码"
#: users/templates/users/reset_password.html:57
msgid "Setting"
msgstr "设置"
#: users/templates/users/user_create.html:4
#: users/templates/users/user_list.html:16 users/views/user.py:72
msgid "Create user"
......
......@@ -65,7 +65,7 @@
{# </ul>#}
{#</li>#}
<li id="settings">
<a href="{% url 'settings:email-setting' %}">
<a href="{% url 'settings:basic-setting' %}">
<i class="fa fa-gears"></i> <span class="nav-label">{% trans 'Settings' %}</span><span class="label label-info pull-right"></span>
</a>
</li>
\ No newline at end of file
......@@ -17,7 +17,7 @@
<a href="" class="text-center"><i class="fa fa-laptop"></i> {% trans 'Profile' %} </a>
</li>
<li class="pull-right">
<a class="btn btn-outline btn-default" href="{% url 'users:user-profile-update' %}"><i class="fa fa-edit"></i>{% trans 'Settings' %}</a>
<a class="btn btn-outline btn-default" href="{% url 'users:user-profile-update' %}"><i class="fa fa-edit"></i>{% trans 'Setting' %}</a>
</li>
</ul>
</div>
......
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