diff --git a/passbook/admin/templates/administration/base.html b/passbook/admin/templates/administration/base.html index 51240c85e..9bde9d06f 100644 --- a/passbook/admin/templates/administration/base.html +++ b/passbook/admin/templates/administration/base.html @@ -59,9 +59,9 @@
  • - - {% trans 'Factors' %} + + {% trans 'Stages' %}
  • diff --git a/passbook/admin/templates/administration/flow/list.html b/passbook/admin/templates/administration/flow/list.html index c22b38dea..8d1691686 100644 --- a/passbook/admin/templates/administration/flow/list.html +++ b/passbook/admin/templates/administration/flow/list.html @@ -26,7 +26,7 @@ {% trans 'Name' %} {% trans 'Designation' %} - {% trans 'Factors' %} + {% trans 'Stages' %} {% trans 'Policies' %} @@ -47,7 +47,7 @@ - {{ flow.factors.all|length }} + {{ flow.stages.all|length }} diff --git a/passbook/admin/templates/administration/overview.html b/passbook/admin/templates/administration/overview.html index daf5f7e82..6442081c8 100644 --- a/passbook/admin/templates/administration/overview.html +++ b/passbook/admin/templates/administration/overview.html @@ -48,16 +48,16 @@ - +
    - {% trans 'Factors' %} + {% trans 'Stages' %}
    {% if factor_count < 1 %} {{ factor_count }} -

    {% trans 'No Factors configured. No Users will be able to login.' %}">

    +

    {% trans 'No Stages configured. No Users will be able to login.' %}">

    {% else %} {{ factor_count }} {% endif %} diff --git a/passbook/admin/templates/administration/policy/list.html b/passbook/admin/templates/administration/policy/list.html index d7b12417e..28f238854 100644 --- a/passbook/admin/templates/administration/policy/list.html +++ b/passbook/admin/templates/administration/policy/list.html @@ -10,7 +10,7 @@ {% trans 'Policies' %} -

    {% trans "Allow users to use Applications based on properties, enforce Password Criteria and selectively apply Factors." %}

    +

    {% trans "Allow users to use Applications based on properties, enforce Password Criteria and selectively apply Stages." %}

    diff --git a/passbook/admin/templates/administration/factor/list.html b/passbook/admin/templates/administration/stage/list.html similarity index 73% rename from passbook/admin/templates/administration/factor/list.html rename to passbook/admin/templates/administration/stage/list.html index 77468cb3a..0c8894165 100644 --- a/passbook/admin/templates/administration/factor/list.html +++ b/passbook/admin/templates/administration/stage/list.html @@ -9,9 +9,9 @@

    - {% trans 'Factors' %} + {% trans 'Stages' %}

    -

    {% trans "Factors required for a user to successfully authenticate." %} +

    {% trans "Stages required for a user to successfully authenticate." %}

    @@ -27,7 +27,7 @@
    @@ -39,34 +39,36 @@ {% trans 'Name' %} - {% trans 'Order' %} + {% trans 'Flows' %} {% trans 'Enabled' %} - {% for factor in object_list %} + {% for stage in object_list %}
    -
    {{ factor.name }} ({{ factor.slug }})
    - {{ factor|verbose_name }} +
    {{ stage.name }}
    + {{ stage|verbose_name }}
    - - {{ factor.order }} - + - {{ factor.enabled }} + {{ stage.enabled }} - {% trans 'Edit' %} - {% trans 'Delete' %} - {% get_links factor as links %} + {% trans 'Edit' %} + {% trans 'Delete' %} + {% get_links stage as links %} {% for name, href in links.items %} {% trans name %} {% endfor %} diff --git a/passbook/admin/views/stages.py b/passbook/admin/views/stages.py index c5623a22e..e60d7aa9f 100644 --- a/passbook/admin/views/stages.py +++ b/passbook/admin/views/stages.py @@ -24,12 +24,12 @@ def all_subclasses(cls): class StageListView(LoginRequiredMixin, PermissionListMixin, ListView): - """Show list of all flows""" + """Show list of all stages""" model = Stage - template_name = "administration/flow/list.html" - permission_required = "passbook_core.view_flow" - ordering = "order" + template_name = "administration/stage/list.html" + permission_required = "passbook_flows.view_stage" + ordering = "name" paginate_by = 40 def get_context_data(self, **kwargs): @@ -52,21 +52,21 @@ class StageCreateView( model = Stage template_name = "generic/create.html" - permission_required = "passbook_core.add_flow" + permission_required = "passbook_flows.add_stage" - success_url = reverse_lazy("passbook_admin:flows") + success_url = reverse_lazy("passbook_admin:stages") success_message = _("Successfully created Stage") def get_context_data(self, **kwargs): kwargs = super().get_context_data(**kwargs) - flow_type = self.request.GET.get("type") - model = next(x for x in all_subclasses(Stage) if x.__name__ == flow_type) + stage_type = self.request.GET.get("type") + model = next(x for x in all_subclasses(Stage) if x.__name__ == stage_type) kwargs["type"] = model._meta.verbose_name return kwargs def get_form_class(self): - flow_type = self.request.GET.get("type") - model = next(x for x in all_subclasses(Stage) if x.__name__ == flow_type) + stage_type = self.request.GET.get("type") + model = next(x for x in all_subclasses(Stage) if x.__name__ == stage_type) if not model: raise Http404 return path_to_class(model.form) @@ -75,12 +75,12 @@ class StageCreateView( class StageUpdateView( SuccessMessageMixin, LoginRequiredMixin, PermissionRequiredMixin, UpdateView ): - """Update flow""" + """Update stage""" model = Stage - permission_required = "passbook_core.update_application" + permission_required = "passbook_flows.update_application" template_name = "generic/update.html" - success_url = reverse_lazy("passbook_admin:flows") + success_url = reverse_lazy("passbook_admin:stages") success_message = _("Successfully updated Stage") def get_form_class(self): @@ -97,12 +97,12 @@ class StageUpdateView( class StageDeleteView( SuccessMessageMixin, LoginRequiredMixin, PermissionRequiredMixin, DeleteView ): - """Delete flow""" + """Delete stage""" model = Stage template_name = "generic/delete.html" - permission_required = "passbook_core.delete_flow" - success_url = reverse_lazy("passbook_admin:flows") + permission_required = "passbook_flows.delete_stage" + success_url = reverse_lazy("passbook_admin:stages") success_message = _("Successfully deleted Stage") def get_object(self, queryset=None): diff --git a/passbook/core/templates/user/base.html b/passbook/core/templates/user/base.html index 274d08346..f1267358b 100644 --- a/passbook/core/templates/user/base.html +++ b/passbook/core/templates/user/base.html @@ -21,7 +21,7 @@ {% user_stages as user_stages_loc %} {% if user_stages_loc %}
    -

    {% trans 'Factors' %}

    +

    {% trans 'Stages' %}