mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 14:23:39 +08:00
DEV: Make admin-start-backup template extendable (#18904)
We need to change the content of this modal in different plugins based on context, so move some parts of it into the JS file.
This commit is contained in:
parent
ac2ef0bd9d
commit
b93075a445
|
@ -1,9 +1,22 @@
|
|||
import Controller, { inject as controller } from "@ember/controller";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
|
||||
export default Controller.extend(ModalFunctionality, {
|
||||
adminBackupsLogs: controller(),
|
||||
|
||||
@discourseComputed
|
||||
warningMessage() {
|
||||
// this is never shown here, but we may want to show different
|
||||
// messages in plugins
|
||||
return "";
|
||||
},
|
||||
|
||||
@discourseComputed
|
||||
yesLabel() {
|
||||
return "yes_value";
|
||||
},
|
||||
|
||||
actions: {
|
||||
startBackupWithUploads() {
|
||||
this.send("closeModal");
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<DModalBody @title="admin.backups.operations.backup.confirm">
|
||||
<DButton @class="btn-primary backup-with-uploads" @action={{action "startBackupWithUploads"}} @label="yes_value" />
|
||||
{{#if this.warningMessage}}
|
||||
<div class="alert alert-warning">{{html-safe this.warningMessage}}</div>
|
||||
{{/if}}
|
||||
<DButton @class="btn-primary backup-with-uploads" @action={{action "startBackupWithUploads"}} @label={{this.yesLabel}} />
|
||||
<DButton @class="backup-no-uploads" @action={{action "startBackupWithoutUploads"}} @label="admin.backups.operations.backup.without_uploads" />
|
||||
<DButton @class="btn-default" @action={{action "cancel"}} @label="no_value" />
|
||||
</DModalBody>
|
||||
|
|
|
@ -2136,6 +2136,7 @@ backups:
|
|||
include_s3_uploads_in_backups:
|
||||
default: false
|
||||
hidden: true
|
||||
client: true
|
||||
|
||||
search:
|
||||
use_pg_headlines_for_excerpt:
|
||||
|
|
Loading…
Reference in New Issue
Block a user