FIX: regression preventing to set number of hours before closing

This commit also adds a full test suite for editing topic timer.
This commit is contained in:
Joffrey JAFFEUX
2017-11-24 02:48:45 +01:00
committed by GitHub
parent 82222e8d18
commit 63307c303a
3 changed files with 156 additions and 2 deletions

View File

@ -114,6 +114,7 @@ export default ComboBoxComponent.extend(DatetimeMixin, {
pluginApiIdentifiers: ["future-date-input-selector"],
classNames: ["future-date-input-selector"],
isCustom: Ember.computed.equal("value", "pick_date_and_time"),
isBasedOnLastPost: Ember.computed.equal("value", "set_based_on_last_post"),
clearable: true,
rowComponent: "future-date-input-selector/future-date-input-selector-row",
headerComponent: "future-date-input-selector/future-date-input-selector-header",
@ -154,7 +155,7 @@ export default ComboBoxComponent.extend(DatetimeMixin, {
},
mutateValue(value) {
if (this.get("isCustom")) {
if (this.get("isCustom") || this.get("isBasedOnLastPost")) {
this.set("value", value);
} else {
let input = null;