mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-15 09:53:50 -06:00
Fix the Backup module where it was not working if user changes its preference language other than english. Fixes #2354
This commit is contained in:
parent
95f763463f
commit
155348d712
@ -123,10 +123,10 @@ TODO LIST FOR BACKUP:
|
||||
width: "100%"
|
||||
},
|
||||
options: [
|
||||
{label: "Custom", value: "custom"},
|
||||
{label: "Tar", value: "tar"},
|
||||
{label: "Plain", value: "plain"},
|
||||
{label: "Directory", value: "directory"}
|
||||
{label: '{{ _('Custom') }}', value: "custom"},
|
||||
{label: '{{ _('Tar') }}', value: "tar"},
|
||||
{label: '{{ _('Plain') }}', value: "plain"},
|
||||
{label: '{{ _('Directory') }}', value: "directory"}
|
||||
]
|
||||
},{
|
||||
id: 'ratio', label: '{{ _('Compression ratio') }}',
|
||||
@ -447,9 +447,11 @@ TODO LIST FOR BACKUP:
|
||||
url: '{{ url_for('help.static', filename='backup_dialog.html') }}'
|
||||
}
|
||||
},{
|
||||
text: '{{ _('Backup') }}', key: 27, className: 'btn btn-primary fa fa-lg fa-save pg-alertify-button'
|
||||
text: '{{ _('Backup') }}', key: 27, className: 'btn btn-primary fa fa-lg fa-save pg-alertify-button',
|
||||
'data-btn-name': 'backup'
|
||||
},{
|
||||
text: '{{ _('Cancel') }}', key: 27, className: 'btn btn-danger fa fa-lg fa-times pg-alertify-button'
|
||||
text: '{{ _('Cancel') }}', key: 27, className: 'btn btn-danger fa fa-lg fa-times pg-alertify-button',
|
||||
'data-btn-name': 'cancel'
|
||||
}],
|
||||
// Set options for dialog
|
||||
options: {
|
||||
@ -537,7 +539,7 @@ TODO LIST FOR BACKUP:
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.button.text === '{{ _('Backup') }}') {
|
||||
if (e.button['data-btn-name'] === "backup") {
|
||||
|
||||
if (!d)
|
||||
return;
|
||||
@ -660,9 +662,11 @@ TODO LIST FOR BACKUP:
|
||||
attrs:{name:'dialog_help', type:'button', label: '{{ _('Backup') }}',
|
||||
url: '{{ url_for('help.static', filename='backup_dialog.html') }}'}
|
||||
},{
|
||||
text: '{{ _('Backup') }}', key: 27, className: 'btn btn-primary fa fa-lg fa-save pg-alertify-button'
|
||||
text: '{{ _('Backup') }}', key: 27, className: 'btn btn-primary fa fa-lg fa-save pg-alertify-button',
|
||||
'data-btn-name': 'backup'
|
||||
},{
|
||||
text: '{{ _('Cancel') }}', key: 27, className: 'btn btn-danger fa fa-lg fa-times pg-alertify-button'
|
||||
text: '{{ _('Cancel') }}', key: 27, className: 'btn btn-danger fa fa-lg fa-times pg-alertify-button',
|
||||
'data-btn-name': 'cancel'
|
||||
}],
|
||||
// Set options for dialog
|
||||
options: {
|
||||
@ -748,7 +752,7 @@ TODO LIST FOR BACKUP:
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.button.text === "Backup") {
|
||||
if (e.button['data-btn-name'] === "backup") {
|
||||
if (!d)
|
||||
return;
|
||||
|
||||
|
@ -374,10 +374,12 @@ define(
|
||||
return {
|
||||
buttons:[{
|
||||
text: "{{ _('OK') }}", key: 27, disable: true,
|
||||
'data-btn-name': 'ok',
|
||||
className:
|
||||
"btn btn-primary fa fa-lg fa-save pg-alertify-button"
|
||||
}, {
|
||||
text: "{{ _('Cancel') }}", key: 27,
|
||||
'data-btn-name': 'cancel',
|
||||
className:
|
||||
"btn btn-danger fa fa-lg fa-times pg-alertify-button"
|
||||
}],
|
||||
@ -393,7 +395,7 @@ define(
|
||||
|
||||
// Callback functions when click on the buttons of the Alertify dialogs
|
||||
callback: function(e) {
|
||||
if (e.button.text === "{{ _('OK') }}") {
|
||||
if (e.button['data-btn-name'] === "ok") {
|
||||
|
||||
var n = this.settings['pg_node'],
|
||||
i = this.settings['pg_item'],
|
||||
|
@ -269,9 +269,11 @@ define(
|
||||
attrs:{name:'dialog_help', type:'button', label: '{{ _('Maintenance') }}',
|
||||
url: '{{ url_for('help.static', filename='maintenance_dialog.html') }}'}
|
||||
},{
|
||||
text: "{{ _('OK') }}", key: 27, className: "btn btn-primary fa fa-lg fa-save pg-alertify-button"
|
||||
text: "{{ _('OK') }}", key: 27, className: "btn btn-primary fa fa-lg fa-save pg-alertify-button",
|
||||
'data-btn-name': 'ok',
|
||||
},{
|
||||
text: "{{ _('Cancel') }}", key: 27, className: "btn btn-danger fa fa-lg fa-times pg-alertify-button"
|
||||
text: "{{ _('Cancel') }}", key: 27, className: "btn btn-danger fa fa-lg fa-times pg-alertify-button",
|
||||
'data-btn-name': 'cancel',
|
||||
}],
|
||||
options: { modal: 0, pinnable: false}
|
||||
};
|
||||
@ -289,7 +291,7 @@ define(
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.button.text === "{{ _('OK') }}") {
|
||||
if (e.button['data-btn-name'] === "ok") {
|
||||
|
||||
var schema = undefined,
|
||||
table = undefined,
|
||||
|
@ -36,7 +36,7 @@ define([
|
||||
custom: false,
|
||||
file: undefined,
|
||||
role: undefined,
|
||||
format: 'Custom or tar',
|
||||
format: 'custom',
|
||||
verbose: true,
|
||||
blobs: true,
|
||||
encoding: undefined,
|
||||
@ -81,8 +81,8 @@ define([
|
||||
width: "100%"
|
||||
},
|
||||
options: [
|
||||
{label: "Custom or tar", value: "custom"},
|
||||
{label: "Directory", value: "directory"}
|
||||
{label: '{{ _('Custom or tar') }}', value: "custom"},
|
||||
{label: '{{ _('Directory') }}', value: "directory"}
|
||||
]
|
||||
},{
|
||||
id: 'file', label: '{{ _('Filename') }}',
|
||||
@ -374,10 +374,12 @@ define([
|
||||
url: '{{ url_for('help.static', filename='restore_dialog.html') }}'}
|
||||
},{
|
||||
text: '{{ _('Restore') }}', key: 27,
|
||||
className: 'btn btn-primary fa fa-upload pg-alertify-button', restore: true
|
||||
className: 'btn btn-primary fa fa-upload pg-alertify-button', restore: true,
|
||||
'data-btn-name': 'restore'
|
||||
},{
|
||||
text: '{{ _('Cancel') }}', key: 27,
|
||||
className: 'btn btn-danger fa fa-lg fa-times pg-alertify-button', restore: false
|
||||
className: 'btn btn-danger fa fa-lg fa-times pg-alertify-button', restore: false,
|
||||
'data-btn-name': 'cancel'
|
||||
}],
|
||||
// Set options for dialog
|
||||
options: {
|
||||
@ -473,7 +475,7 @@ define([
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.button.restore) {
|
||||
if (e.button['data-btn-name'] === "restore") {
|
||||
if (!d)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user