Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Change naming from userprofile to account

Anna Siwikede846713b62
diff --git a/saleor/static/scss/layouts/_userprofile.scss b/saleor/static/scss/layouts/_account.scss
similarity index 98%
rename from saleor/static/scss/layouts/_userprofile.scss
rename to saleor/static/scss/layouts/_account.scss
index 8b0b23393f..8b28286f7e 100644
--- a/saleor/static/scss/layouts/_userprofile.scss
+++ b/saleor/static/scss/layouts/_account.scss
@@ -1,4 +1,4 @@
-.userprofile {
+.account {
h2 {
text-align: center;
text-transform: uppercase;
diff --git a/saleor/static/scss/storefront.scss b/saleor/static/scss/storefront.scss
index d36ab6ddb4..d6c867caa6 100644
--- a/saleor/static/scss/storefront.scss
+++ b/saleor/static/scss/storefront.scss
@@ -17,6 +17,7 @@
@import "components/typography";
@import "components/variant-picker";
+@import "layouts/account";
@import "layouts/cart";
@import "layouts/category-page";
@import "layouts/checkout";
@@ -27,5 +28,3 @@
@import "layouts/product-list";
@import "layouts/product-page";
@import "layouts/styleguide";
-@import "layouts/userprofile";
-
diff --git a/templates/account/address_edit.html b/templates/account/address_edit.html
index a0d8129bf7..4dc6337ed4 100644
--- a/templates/account/address_edit.html
+++ b/templates/account/address_edit.html
@@ -38,7 +38,7 @@
{% endblock breadcrumb %}
{% block content %}
- <div class="row userprofile__address-edit">
+ <div class="row account__address-edit">
<div class="col-sm-8 col-lg-6 m-auto">
<form method="post" novalidate>
{% csrf_token %}
@@ -49,7 +49,7 @@
{% trans "New address" context "New address title" %}
{% endif %}
</h2>
- <div class="userprofile__address-edit__form">
+ <div class="account__address-edit__form">
{% include "account/snippets/address_form.html" %}
</div>
<p class="text-right">
diff --git a/templates/account/details.html b/templates/account/details.html
index 20f6b9e77d..a9b0e896a2 100644
--- a/templates/account/details.html
+++ b/templates/account/details.html
@@ -22,8 +22,8 @@
{% endblock breadcrumb %}
{% block content %}
- <div class="userprofile">
- <div class="userprofile__nav container">
+ <div class="account">
+ <div class="account__nav container">
<h2>{% trans "My account" %}</h2>
<ul class="nav nav-tabs col-lg-10 m-auto" role="tablist">
<li class="nav-item">
@@ -97,7 +97,7 @@
</div>
</div>
{% else %}
- <h3 class="text-sm-center userprofile__orders-empty">
+ <h3 class="text-sm-center account__orders-empty">
{% trans "There are not any completed orders yet." context "No recent orders text" %}
</h3>
{% endif %}
@@ -105,7 +105,7 @@
</div>
<div class="tab-pane fade" id="password" role="tabpanel">
<div class="row ">
- <div class="col-md-8 col-lg-6 m-auto userprofile__password">
+ <div class="col-md-8 col-lg-6 m-auto account__password">
<form action="" method="post">
{% csrf_token %}
{% bootstrap_form change_password_form %}
@@ -115,7 +115,7 @@
</div>
</div>
<div class="tab-pane fade" id="addresses" role="tabpanel">
- <div class="card-deck-wrapper userprofile__addresses">
+ <div class="card-deck-wrapper account__addresses">
<div class="row card-deck">
{% for address in addresses %}
<div class="col-md-6">
@@ -133,7 +133,7 @@
</a>
</li>
</ul>
- {% include "userprofile/address_delete.html" with pk=address.pk %}
+ {% include "account/address_delete.html" with pk=address.pk %}
</div>
</div>
{% endfor %}
diff --git a/templates/account/password_set.html b/templates/account/password_set.html
deleted file mode 100644
index c08332212c..0000000000
--- a/templates/account/password_set.html
+++ /dev/null
@@ -1,29 +0,0 @@
-{% extends "base.html" %}
-{% load i18n %}
-{% load bootstrap_form from bootstrap4 %}
-
-{% block content %}
- <div class="row">
- <div class="col-sm-6">
- <div class="panel panel-default">
- <div class="panel-body">
- <form method="post" novalidate action="{% url "account_set_password" %}">
- {% csrf_token %}
- <fieldset>
- <legend class="text-center">
- {% trans "Password Reset" context "Password set form legend" %}
- </legend>
- {% bootstrap_form form %}
- <input type="hidden" name="next" value="{{ next }}" />
- </fieldset>
- <div class="form-group text-right">
- <button class="btn primary">
- {% trans "Continue" context "Password set form primary action" %}
- </button>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
-{% endblock %}
diff --git a/templates/dashboard/base.html b/templates/dashboard/base.html
index 5b1155ef40..6e927dccd8 100644
--- a/templates/dashboard/base.html
+++ b/templates/dashboard/base.html
@@ -155,7 +155,7 @@
</ul>
</li>
{% endif %}
- {% if perms.order.view_order or perms.userprofile.view_user %}
+ {% if perms.order.view_order or perms.account.view_user %}
<li class="side-nav-section">
<p>
{% trans "Sales" context "Dashboard sales. `Sales' is noun of to sell" %}
@@ -168,7 +168,7 @@
</a>
</li>
{% endif %}
- {% if perms.userprofile.view_user %}
+ {% if perms.account.view_user %}
<li class="{% block menu_customers_class %}{% endblock %}">
<a href="{% url 'dashboard:customers' %}">
{% trans "Customers" context "Dashboard customers list" %}
@@ -178,20 +178,20 @@
</ul>
</li>
{% endif %}
- {% if perms.userprofile.view_group or perms.userprofile.edit_group %}
+ {% if perms.account.view_group or perms.account.edit_group %}
<li class="side-nav-section">
<p>
{% trans "Staff management" context "Management section" %}
</p>
<ul>
- {% if perms.userprofile.view_staff %}
+ {% if perms.account.view_staff %}
<li class="{% block menu_staff_class %}{% endblock %}">
<a href="{% url 'dashboard:staff-list' %}">
{% trans "Staff members" context "Dashboard staff members list" %}
</a>
</li>
{% endif %}
- {% if perms.userprofile.view_group %}
+ {% if perms.account.view_group %}
<li class="{% block menu_groups_class %}{% endblock %}">
<a href="{% url 'dashboard:group-list' %}">
{% trans "Groups" context "Dashboard groups list" %}
diff --git a/templates/dashboard/customer/detail.html b/templates/dashboard/customer/detail.html
index 9ab300e000..07453582fe 100644
--- a/templates/dashboard/customer/detail.html
+++ b/templates/dashboard/customer/detail.html
@@ -58,12 +58,12 @@
</div>
</div>
<div class="card-action">
- {% if perms.userprofile.edit_user %}
+ {% if perms.account.edit_user %}
<a href="{% url 'dashboard:customer-update' customer.pk %}" class="btn-flat waves-effect">
{% trans "Edit customer" context "Customer action" %}
</a>
{% endif %}
- {% if perms.userprofile.impersonate_user %}
+ {% if perms.account.impersonate_user %}
<a href="{% url 'impersonate-start' uid=customer.pk %}" class="btn-flat waves-effect">
{% trans 'Impersonate customer' context 'Customer impersonate action' %}
</a>
diff --git a/templates/dashboard/customer/form.html b/templates/dashboard/customer/form.html
index ba799b6e1f..adc13c2ab0 100644
--- a/templates/dashboard/customer/form.html
+++ b/templates/dashboard/customer/form.html
@@ -53,7 +53,7 @@
</div>
</div>
</div>
- {% if perms.userprofile.edit_user %}
+ {% if perms.account.edit_user %}
<div class="card-action right-align">
{% if customer.pk %}
<a href="{% url 'dashboard:customer-details' pk=customer.pk %}" class="btn-flat waves-effect">
diff --git a/templates/dashboard/customer/list.html b/templates/dashboard/customer/list.html
index 782fdcab3d..b41c284281 100644
--- a/templates/dashboard/customer/list.html
+++ b/templates/dashboard/customer/list.html
@@ -14,7 +14,7 @@
{% block menu_customers_class %}active{% endblock %}
{% block header_extra %}
- {% if perms.userprofile.edit_staff %}
+ {% if perms.account.edit_staff %}
<div class="btn-fab-fixed">
<a href="{% url 'dashboard:customer-create' %}" class="btn-fab-default waves-effect waves-light" title="{% trans "Add customer" context "Customer list add button text" %}" >
<svg data-src="{% static "dashboard/images/add.svg" %}" />
diff --git a/templates/dashboard/group/detail.html b/templates/dashboard/group/detail.html
index 14fd8d7f5e..5006fd269c 100644
--- a/templates/dashboard/group/detail.html
+++ b/templates/dashboard/group/detail.html
@@ -47,7 +47,7 @@
<svg data-src="{% static "dashboard/images/more-vert.svg" %}" height="24" width="24" />
</a>
<ul id="context-menu" class="dropdown-content">
- {% if perms.userprofile.edit_group %}
+ {% if perms.account.edit_group %}
<li>
<a href="#base-modal" data-href="{% url 'dashboard:group-delete' pk=group.pk %}"
class="modal-trigger-custom">
@@ -79,7 +79,7 @@
</div>
</div>
</div>
- {% if perms.userprofile.edit_group %}
+ {% if perms.account.edit_group %}
<div class="card-action right-align">
<a href="{% url 'dashboard:group-list' %}" class="btn-flat waves-effect">
{% trans "Cancel" context "Dashboard cancel action" %}
diff --git a/templates/dashboard/group/list.html b/templates/dashboard/group/list.html
index 057442f4bc..1f892c252b 100644
--- a/templates/dashboard/group/list.html
+++ b/templates/dashboard/group/list.html
@@ -13,7 +13,7 @@
{% block menu_groups_class %}active{% endblock %}
{% block header_extra %}
- {% if perms.userprofile.edit_group %}
+ {% if perms.account.edit_group %}
<div class="btn-fab-fixed">
<a href="{% url 'dashboard:group-create' %}" class="btn-fab-default waves-effect waves-light" title="{% trans "Add group" context "Group list add button text" %}">
<svg data-src="{% static "dashboard/images/add.svg" %}" />
@@ -48,7 +48,7 @@
</thead>
<tbody>
{% for group in groups %}
- <tr data-action-go="{% if perms.userprofile.edit_group %}{% url 'dashboard:group-details' pk=group.name.pk %}{% endif %}">
+ <tr data-action-go="{% if perms.account.edit_group %}{% url 'dashboard:group-details' pk=group.name.pk %}{% endif %}">
<td>
{{ group.name }}
</td>
diff --git a/templates/dashboard/staff/detail.html b/templates/dashboard/staff/detail.html
index dd4edea494..149ea5c02e 100644
--- a/templates/dashboard/staff/detail.html
+++ b/templates/dashboard/staff/detail.html
@@ -43,7 +43,7 @@
<svg data-src="{% static "dashboard/images/more-vert.svg" %}" height="24" width="24" />
</a>
<ul id="context-menu" class="dropdown-content">
- {% if perms.userprofile.edit_staff %}
+ {% if perms.account.edit_staff %}
<li>
<a href="#base-modal" data-href="{% url 'dashboard:staff-delete' pk=staff_member.pk %}" class="modal-trigger-custom">
{% trans 'Remove staff member' context 'Staff member form action' %}
@@ -70,7 +70,7 @@
</div>
</div>
</div>
- {% if perms.userprofile.edit_staff %}
+ {% if perms.account.edit_staff %}
<div class="card-action right-align">
<a href="{% url 'dashboard:staff-list' %}" class="btn-flat waves-effect">
{% trans "Cancel" context "Dashboard cancel action" %}
diff --git a/templates/dashboard/staff/list.html b/templates/dashboard/staff/list.html
index 932605dcac..3d32aa7800 100644
--- a/templates/dashboard/staff/list.html
+++ b/templates/dashboard/staff/list.html
@@ -14,7 +14,7 @@
{% block menu_staff_class %}active{% endblock %}
{% block header_extra %}
- {% if perms.userprofile.edit_staff %}
+ {% if perms.account.edit_staff %}
<div class="btn-fab-fixed">
<a class="btn-fab-default waves-effect waves-light"
title="{% trans "Add staff member" context "Staff members list add button text" %}"