mirror of
https://github.com/discourse/discourse.git
synced 2025-03-21 20:15:43 +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:
parent
3287f47f07
commit
2fecb4b46e
@ -46,5 +46,12 @@ export default Ember.Component.extend({
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
let statusUpdateAt = moment(this.get('executeAt'));
|
||||
if (statusUpdateAt < new Date()) return;
|
||||
|
||||
let duration = moment.duration(statusUpdateAt - moment());
|
||||
let minutesLeft = duration.asMinutes();
|
||||
|
@ -9,7 +9,7 @@
|
||||
input=topicTimer.updateTime
|
||||
statusType=selection
|
||||
includeWeekend=true
|
||||
basedOnLastPost=false}}
|
||||
basedOnLastPost=topicTimer.based_on_last_post}}
|
||||
{{else if publishToCategory}}
|
||||
<div class="control-group">
|
||||
<label>{{i18n 'topic.topic_status_update.publish_to'}}</label>
|
||||
@ -23,7 +23,7 @@
|
||||
statusType=selection
|
||||
includeWeekend=true
|
||||
categoryId=topicTimer.category_id
|
||||
basedOnLastPost=false}}
|
||||
basedOnLastPost=topicTimer.based_on_last_post}}
|
||||
{{else if autoClose}}
|
||||
{{future-date-input
|
||||
input=topicTimer.updateTime
|
||||
|
@ -155,7 +155,7 @@ export default ComboBoxComponent.extend(DatetimeMixin, {
|
||||
},
|
||||
|
||||
mutateValue(value) {
|
||||
if (this.get("isCustom") || this.get("isBasedOnLastPost")) {
|
||||
if (value === 'pick_date_and_time' || this.get("isBasedOnLastPost")) {
|
||||
this.set("value", value);
|
||||
} else {
|
||||
let input = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user