Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multiple issues with CI overview description field #1999

Merged
merged 1 commit into from
Aug 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/components/curriculum-inventory-report-overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ export default Component.extend(Validations, ValidationErrorDisplay, {
});
},
revertDescriptionChanges(){
const program = this.get('report');
this.set('report', program.get('description'));
const report = this.get('report');
this.set('description', report.get('description'));
},
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{{inplace-select value=report.year displayValueOverride=report.yearLabel options=yearOptions save="changeYear"}}
{{/if}}
</div>

<div class="block">
<label>{{t "general.program"}}:</label>
<span>{{report.program.title}} ({{report.program.shortTitle}})</span>
Expand All @@ -41,21 +41,18 @@
{{report.description}}
{{else}}
{{#editable-field
value=shortTitle
value=description
save=(action 'changeDescription')
close=(action 'revertDescriptionChanges')
clickPrompt=(if report.description report.description (t 'general.clickToEdit'))
as |isSaving save close|
}}
{{one-way-textarea
value=description
update=(action (mut description))
onenter=save
onescape=close
disabled=isSaving
focusOut=(action 'addErrorDisplayFor' 'description')
keyPress=(action 'addErrorDisplayFor' 'description')
}}
<textarea
onchange={{action (mut description) value="target.value"}}
value={{description}}
disabled={{isSaving}}
onkeypress={{action 'addErrorDisplayFor' 'description'}}
>{{description}}</textarea>
{{#if (and (v-get this 'description' 'isInvalid') (is-in showErrorsFor 'description'))}}
<span class="validation-error-message">{{v-get this 'description' 'message'}}</span>
{{/if}}
Expand Down