Skip to content

Commit

Permalink
Merge pull request #183 from crossroads/master
Browse files Browse the repository at this point in the history
#MayRelease1
  • Loading branch information
namrataukirde authored May 4, 2018
2 parents dab674f + 7dc8d83 commit 5ee4c34
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions app/controllers/item/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ const { getOwner } = Ember;

export default Ember.Controller.extend({

offer: Ember.computed.alias('model.offer'),
i18n: Ember.inject.service(),
itemDescriptionPlaceholder: Ember.computed(function(){
return this.get("i18n").t("items.add_item.description_placeholder").string;
}),

isOfferReviewed: Ember.computed("model", "model.state", "offer", "offer.state", function() {
return this.get("offer.state") === "received";
}),

formData: Ember.computed("model", {
get: function() {
var item = this.get('model');
Expand Down
2 changes: 1 addition & 1 deletion app/templates/item/edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>

<div class="small-6 columns">
{{#online-button classNames="add_item_link button expand"}}{{t "items.add_item.save"}}{{/online-button}}
{{#online-button classNames="add_item_link button expand" disabledOverride=disabled disabled=isOfferReviewed offer=model.offer}}{{t "items.add_item.save"}}{{/online-button}}
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/edit-images-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,6 @@ test("Can't delete last image", function() {
});

andThen(function() {
equal(find("#photo-list img").length, 1);
equal(find("#photo-list img").length, 0);
});
});

0 comments on commit 5ee4c34

Please sign in to comment.