mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-28 15:03:57 -04:00
Fix #1199
This commit is contained in:
parent
c0f163938e
commit
1da82fa851
2 changed files with 7 additions and 1 deletions
app
|
@ -36,6 +36,9 @@ block modal-footer-content
|
||||||
button.btn.btn-sm#agreement-button(data-i18n="versions.cla_agree") I AGREE
|
button.btn.btn-sm#agreement-button(data-i18n="versions.cla_agree") I AGREE
|
||||||
if view.isPatch
|
if view.isPatch
|
||||||
.alert.alert-info(data-i18n="versions.owner_approve") An owner will need to approve it before your changes will become visible.
|
.alert.alert-info(data-i18n="versions.owner_approve") An owner will need to approve it before your changes will become visible.
|
||||||
|
.save-error-area
|
||||||
|
if view.savingPatchError
|
||||||
|
.alert.alert-danger Unable to save patch: #{view.savingPatchError}
|
||||||
|
|
||||||
.buttons
|
.buttons
|
||||||
button.btn(data-dismiss="modal", data-i18n="common.cancel") Cancel
|
button.btn(data-dismiss="modal", data-i18n="common.cancel") Cancel
|
||||||
|
|
|
@ -46,6 +46,7 @@ module.exports = class SaveVersionModal extends ModalView
|
||||||
}
|
}
|
||||||
|
|
||||||
submitPatch: ->
|
submitPatch: ->
|
||||||
|
@savingPatchError = false
|
||||||
forms.clearFormAlerts @$el
|
forms.clearFormAlerts @$el
|
||||||
patch = new Patch()
|
patch = new Patch()
|
||||||
patch.set 'delta', @model.getDelta()
|
patch.set 'delta', @model.getDelta()
|
||||||
|
@ -60,8 +61,10 @@ module.exports = class SaveVersionModal extends ModalView
|
||||||
return unless res
|
return unless res
|
||||||
@enableModalInProgress(@$el)
|
@enableModalInProgress(@$el)
|
||||||
|
|
||||||
res.error =>
|
res.error (jqxhr) =>
|
||||||
@disableModalInProgress(@$el)
|
@disableModalInProgress(@$el)
|
||||||
|
@savingPatchError = jqxhr.responseJSON?.message or 'Unknown error.'
|
||||||
|
@renderSelectors '.save-error-area'
|
||||||
|
|
||||||
res.success =>
|
res.success =>
|
||||||
@hide()
|
@hide()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue