Commit 7a3602eb by Őry Máté

Merge branch 'feature-improve-inline-helps' into 'master'

Feature Improve Inline Helps

🚧 halp!
parents 6278f2fc a7b16627
......@@ -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 %}
......
......@@ -1483,7 +1483,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(),
})
......@@ -2039,7 +2039,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),
})
......@@ -2047,7 +2047,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)
......@@ -2237,9 +2237,9 @@ class GroupCreate(GroupCodeMixin, LoginRequiredMixin, TemplateView):
context = self.get_context_data(**kwargs)
context.update({
'template': 'dashboard/group-create.html',
'box_title': 'Create a Group',
'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