mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
UX: use future date input instead of date picker on feature topic modal (#6096)
This commit is contained in:
parent
a9ebad3f6c
commit
af1d1db3da
@ -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(
|
||||
|
@ -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
|
||||
|
@ -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}}
|
||||
|
@ -73,6 +73,11 @@
|
||||
.modal-inner-container {
|
||||
min-width: 700px;
|
||||
}
|
||||
|
||||
.pin-until {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
.mobile-view .feature-topic .feature-section {
|
||||
|
Loading…
Reference in New Issue
Block a user