mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 22:13:32 -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
|
||||
if view.isPatch
|
||||
.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
|
||||
button.btn(data-dismiss="modal", data-i18n="common.cancel") Cancel
|
||||
|
|
|
@ -46,6 +46,7 @@ module.exports = class SaveVersionModal extends ModalView
|
|||
}
|
||||
|
||||
submitPatch: ->
|
||||
@savingPatchError = false
|
||||
forms.clearFormAlerts @$el
|
||||
patch = new Patch()
|
||||
patch.set 'delta', @model.getDelta()
|
||||
|
@ -60,8 +61,10 @@ module.exports = class SaveVersionModal extends ModalView
|
|||
return unless res
|
||||
@enableModalInProgress(@$el)
|
||||
|
||||
res.error =>
|
||||
res.error (jqxhr) =>
|
||||
@disableModalInProgress(@$el)
|
||||
@savingPatchError = jqxhr.responseJSON?.message or 'Unknown error.'
|
||||
@renderSelectors '.save-error-area'
|
||||
|
||||
res.success =>
|
||||
@hide()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue