Commit 2b7a692c by Őry Máté

dashboard: add inline help texts

parent 5aee89e2
......@@ -176,7 +176,14 @@ class GroupCreateForm(forms.ModelForm):
self.fields['org_id'] = forms.ChoiceField(
# TRANSLATORS: directory like in LDAP
choices=choices, required=False, label=_('Directory identifier'))
if not new_groups:
if new_groups:
self.fields['org_id'].help_text = _(
"If you select an item here, the members of this directory "
"group will be automatically added to the group at the time "
"they log in. Please note that other users (those with "
"permissions like yours) may also automatically become a "
"group co-owner).")
else:
self.fields['org_id'].widget = HiddenInput()
def save(self, commit=True):
......
{% load crispy_forms_tags %}
{% load i18n %}
<p class="text-muted">
{% trans "User groups allow sharing templates or other resources with multiple users at once." %}
</p>
<form method="POST" action="{% url "dashboard.views.group-create" %}">
{% csrf_token %}
......
......@@ -1361,7 +1361,7 @@ class TemplateChoose(LoginRequiredMixin, TemplateView):
self.request.user)
context.update({
'box_title': _('Choose template'),
'ajax_title': False,
'ajax_title': True,
'template': "dashboard/_template-choose.html",
'templates': templates.all(),
})
......@@ -1890,7 +1890,7 @@ class VmCreate(LoginRequiredMixin, TemplateView):
context.update({
'template': 'dashboard/_vm-create-2.html',
'box_title': _('Customize VM'),
'ajax_title': False,
'ajax_title': True,
'vm_create_form': form,
'template_o': templates.get(pk=template),
})
......@@ -1898,7 +1898,7 @@ class VmCreate(LoginRequiredMixin, TemplateView):
context.update({
'template': 'dashboard/_vm-create-1.html',
'box_title': _('Create a VM'),
'ajax_title': False,
'ajax_title': True,
'templates': templates.all(),
})
return self.render_to_response(context)
......@@ -2090,7 +2090,7 @@ class GroupCreate(GroupCodeMixin, LoginRequiredMixin, TemplateView):
'template': 'dashboard/group-create.html',
'box_title': 'Create a Group',
'form': form,
'ajax_title': True,
})
return self.render_to_response(context)
......
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 sign in to comment