diff --git a/useradmin/admin.py b/useradmin/admin.py index 4b3def48..0728fe14 100644 --- a/useradmin/admin.py +++ b/useradmin/admin.py @@ -39,8 +39,6 @@ class ModelUserAdmin(admin.ModelAdmin): # Custom templates change_form_template = 'useradmin/change_form.html' - delete_confirmation_template = 'useradmin/delete_confirmation.html' - delete_selected_confirmation_template = 'useradmin/delete_selected_confirmation.html' # Defines new management site diff --git a/useradmin/static/useradmin/css/base.css b/useradmin/static/useradmin/css/base.css new file mode 100644 index 00000000..a044d22e --- /dev/null +++ b/useradmin/static/useradmin/css/base.css @@ -0,0 +1,49 @@ +/* Make admin buttons look like Bootstrap */ + +.button, input[type=submit] { + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 14px; + font-weight: 400; + line-height: 1.42857143; + text-align: center; + white-space: nowrap; + vertical-align: middle; + -ms-touch-action: manipulation; + touch-action: manipulation; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + border: 1px solid #ccc; + border-radius: 4px; + color: #333; + background: #fff none; +} + +.button:hover, .button:active, .button:focus, +input[type=submit]:hover, input[type=submit]:active, input[type=submit]:focus { + text-decoration: none; + color: #333; + background-color: #e6e6e6; + border-color: #adadad; +} + +.button:focus, input[type=submit]:focus { + border-color: #8c8c8c; +} + +.button:active:focus, .button:active:hover, +input[type=submit]:active:focus, input[type=submit]:active:hover { + background-color: #d4d4d4; +} + +/* Object tools should be inline */ + +.object-tools { + padding-left: 0; + margin-left: -5px; + list-style: none; +} diff --git a/useradmin/templates/admin/base_site.html b/useradmin/templates/admin/base_site.html index 2399756c..713285ab 100644 --- a/useradmin/templates/admin/base_site.html +++ b/useradmin/templates/admin/base_site.html @@ -1,5 +1,11 @@ {# Please keep this template in sync with django/contrib/admin one #} {% extends "users/sidebar.html" %} +{% load static %} + +{% block extrastyle %} + {{ block.super }} + +{% endblock %} {% block title %}{{ title }}{% endblock %} diff --git a/useradmin/templates/useradmin/change_form.html b/useradmin/templates/useradmin/change_form.html index efae2d0d..b9b218de 100644 --- a/useradmin/templates/useradmin/change_form.html +++ b/useradmin/templates/useradmin/change_form.html @@ -20,18 +20,13 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. {% endcomment %} -{% load i18n admin_urls admin_modify %} +{% load i18n admin_urls %} -{% block object-tools %} -{% if change %}{% if not is_popup %} -
{% blocktrans with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}
-{% blocktrans with escaped_object=object %}Deleting the {{ object_name }} '{{ escaped_object }}' would require deleting the following protected related objects:{% endblocktrans %}
-{% blocktrans with escaped_object=object %}Are you sure you want to delete the {{ object_name }} "{{ escaped_object }}"? All of the following related items will be deleted:{% endblocktrans %}
- {% include "admin/includes/object_delete_summary.html" %} -{% blocktrans %}Deleting the selected {{ objects_name }} would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}
-{% blocktrans %}Deleting the selected {{ objects_name }} would require deleting the following protected related objects:{% endblocktrans %}
-{% blocktrans %}Are you sure you want to delete the selected {{ objects_name }}? All of the following objects and their related items will be deleted:{% endblocktrans %}
- {% include "admin/includes/object_delete_summary.html" %} -