Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
108cbd75
Commit
108cbd75
authored
Oct 15, 2018
by
PJ Janse van Rensburg
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'translation-fix'
parents
b065d72c
30ab3e77
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
base.py
flask_admin/model/base.py
+6
-2
row_actions.html
...k_admin/templates/bootstrap3/admin/model/row_actions.html
+1
-1
No files found.
flask_admin/model/base.py
View file @
108cbd75
...
...
@@ -18,7 +18,7 @@ from wtforms.fields import HiddenField
from
wtforms.fields.core
import
UnboundField
from
wtforms.validators
import
ValidationError
,
InputRequired
from
flask_admin.babel
import
gettext
from
flask_admin.babel
import
gettext
,
ngettext
from
flask_admin.base
import
BaseView
,
expose
from
flask_admin.form
import
BaseForm
,
FormOpts
,
rules
...
...
@@ -2204,7 +2204,11 @@ class BaseModelView(BaseView, ActionsMixin):
# message is flashed from within delete_model if it fails
if
self
.
delete_model
(
model
):
flash
(
gettext
(
'Record was successfully deleted.'
),
'success'
)
count
=
1
flash
(
ngettext
(
'Record was successfully deleted.'
,
'
%(count)
s records were successfully deleted.'
,
count
,
count
=
count
),
'success'
)
return
redirect
(
return_url
)
else
:
flash_errors
(
form
,
message
=
'Failed to delete record.
%(error)
s'
)
...
...
flask_admin/templates/bootstrap3/admin/model/row_actions.html
View file @
108cbd75
...
...
@@ -31,7 +31,7 @@
{% elif csrf_token %}
<input
type=
"hidden"
name=
"csrf_token"
value=
"{{ csrf_token() }}"
/>
{% endif %}
<button
onclick=
"return safeConfirm('{{ _gettext('Are you sure you want to delete this record?') }}');"
title=
"
Delete record
"
>
<button
onclick=
"return safeConfirm('{{ _gettext('Are you sure you want to delete this record?') }}');"
title=
"
{{ _gettext('Delete record') }}
"
>
<span
class=
"fa fa-trash glyphicon glyphicon-trash"
></span>
</button>
</form>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment