mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 14:12:10 +08:00
FIX: Client not setting TopicTimer#based_on_last_post
.
https://meta.discourse.org/t/incorrect-message-key-in-temporarily-closed-topic/87773
This commit is contained in:
@ -46,5 +46,12 @@ export default Ember.Component.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.set("topicTimer.updateTime", time);
|
this.set("topicTimer.updateTime", time);
|
||||||
|
},
|
||||||
|
|
||||||
|
@observes("selection")
|
||||||
|
_updateBasedOnLastPost() {
|
||||||
|
if (!this.get('autoClose')) {
|
||||||
|
this.set('topicTimer.based_on_last_post', false);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
@ -18,7 +18,6 @@ export default Ember.Component.extend(bufferedRender({
|
|||||||
if (!this.get('executeAt')) return;
|
if (!this.get('executeAt')) return;
|
||||||
|
|
||||||
let statusUpdateAt = moment(this.get('executeAt'));
|
let statusUpdateAt = moment(this.get('executeAt'));
|
||||||
if (statusUpdateAt < new Date()) return;
|
|
||||||
|
|
||||||
let duration = moment.duration(statusUpdateAt - moment());
|
let duration = moment.duration(statusUpdateAt - moment());
|
||||||
let minutesLeft = duration.asMinutes();
|
let minutesLeft = duration.asMinutes();
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
input=topicTimer.updateTime
|
input=topicTimer.updateTime
|
||||||
statusType=selection
|
statusType=selection
|
||||||
includeWeekend=true
|
includeWeekend=true
|
||||||
basedOnLastPost=false}}
|
basedOnLastPost=topicTimer.based_on_last_post}}
|
||||||
{{else if publishToCategory}}
|
{{else if publishToCategory}}
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label>{{i18n 'topic.topic_status_update.publish_to'}}</label>
|
<label>{{i18n 'topic.topic_status_update.publish_to'}}</label>
|
||||||
@ -23,7 +23,7 @@
|
|||||||
statusType=selection
|
statusType=selection
|
||||||
includeWeekend=true
|
includeWeekend=true
|
||||||
categoryId=topicTimer.category_id
|
categoryId=topicTimer.category_id
|
||||||
basedOnLastPost=false}}
|
basedOnLastPost=topicTimer.based_on_last_post}}
|
||||||
{{else if autoClose}}
|
{{else if autoClose}}
|
||||||
{{future-date-input
|
{{future-date-input
|
||||||
input=topicTimer.updateTime
|
input=topicTimer.updateTime
|
||||||
|
@ -155,7 +155,7 @@ export default ComboBoxComponent.extend(DatetimeMixin, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
mutateValue(value) {
|
mutateValue(value) {
|
||||||
if (this.get("isCustom") || this.get("isBasedOnLastPost")) {
|
if (value === 'pick_date_and_time' || this.get("isBasedOnLastPost")) {
|
||||||
this.set("value", value);
|
this.set("value", value);
|
||||||
} else {
|
} else {
|
||||||
let input = null;
|
let input = null;
|
||||||
|
Reference in New Issue
Block a user