UX: use future date input instead of date picker on feature topic modal (#6096)

This commit is contained in:
Maja Komel 2018-07-18 23:27:12 +02:00 committed by Régis Hanol
parent a9ebad3f6c
commit af1d1db3da
4 changed files with 25 additions and 8 deletions

View File

@ -70,10 +70,7 @@ export default Ember.Component.extend({
},
didReceiveAttrs() {
this.set(
"displayLabel",
I18n.t(this.get("label") || "topic.topic_status_update.when")
);
if (this.get("label")) this.set("displayLabel", I18n.t(this.get("label")));
},
@computed(

View File

@ -7,6 +7,7 @@
{{#if showTimeOnly}}
{{future-date-input
input=topicTimer.updateTime
label="topic.topic_status_update.when"
statusType=selection
includeWeekend=true
basedOnLastPost=topicTimer.based_on_last_post}}
@ -20,6 +21,7 @@
{{future-date-input
input=topicTimer.updateTime
label="topic.topic_status_update.when"
statusType=selection
includeWeekend=true
categoryId=topicTimer.category_id
@ -27,6 +29,7 @@
{{else if autoClose}}
{{future-date-input
input=topicTimer.updateTime
label="topic.topic_status_update.when"
statusType=selection
includeWeekend=true
basedOnLastPost=topicTimer.based_on_last_post

View File

@ -41,14 +41,20 @@
{{{pinMessage}}}
</p>
<p class="with-validation">
{{date-picker-future value=model.pinnedInCategoryUntil}}
{{future-date-input
class="pin-until"
includeFarFuture=true
input=model.pinnedInCategoryUntil}}
{{popup-input-tip validation=pinInCategoryValidation shownAt=pinInCategoryTipShownAt}}
</p>
{{else}}
<p class="with-validation">
{{{pinMessage}}}
{{d-icon "clock-o"}}
{{date-picker-future value=model.pinnedInCategoryUntil}}
{{future-date-input
class="pin-until"
includeFarFuture=true
input=model.pinnedInCategoryUntil}}
{{popup-input-tip validation=pinInCategoryValidation shownAt=pinInCategoryTipShownAt}}
</p>
{{/if}}
@ -77,14 +83,20 @@
{{i18n "topic.feature_topic.pin_globally"}}
</p>
<p class="with-validation">
{{date-picker-future value=model.pinnedGloballyUntil}}
{{future-date-input
class="pin-until"
includeFarFuture=true
input=model.pinnedGloballyUntil}}
{{popup-input-tip validation=pinGloballyValidation shownAt=pinGloballyTipShownAt}}
</p>
{{else}}
<p class="with-validation">
{{i18n "topic.feature_topic.pin_globally"}}
{{d-icon "clock-o"}}
{{date-picker-future value=model.pinnedGloballyUntil}}
{{future-date-input
class="pin-until"
includeFarFuture=true
input=model.pinnedGloballyUntil}}
{{popup-input-tip validation=pinGloballyValidation shownAt=pinGloballyTipShownAt}}
</p>
{{/if}}

View File

@ -73,6 +73,11 @@
.modal-inner-container {
min-width: 700px;
}
.pin-until {
position: relative;
display: inline-block;
}
}
.mobile-view .feature-topic .feature-section {