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

Wrong status when save fails #375

Closed
montrueque opened this issue Jul 12, 2018 · 1 comment
Closed

Wrong status when save fails #375

montrueque opened this issue Jul 12, 2018 · 1 comment
Labels

Comments

@montrueque
Copy link

Are you requesting a feature, reporting a bug or ask a question?

Bug

What is the current behavior?

When saving function via AJAX using this example of the docs and error is thrown, the survey status is marked as saved

editor.saveSurveyFunc = function (saveNo, callback) {
    $.ajax({
        url: "UrlToYourWebService",
        type: "POST",
        data: {
            surveyId: yourEditUniqueSurveyI,
            surveyText : editor.text
        },
        success: function (data) {
            callback(saveNo, data.isSuccess);
        },
        error: function (xhr, ajaxOptions, thrownError) {
            callback(saveNo, false);
            alert(thrownError);
        }
    });
}

What is the expected behavior?

The status next to the "Save survey" button should be "Error" instead of "Saved".

How would you reproduce the current behavior (if this is a bug)?

I put a breakpoint in this line of the code.

Specify your

  • browser: Chrome 67.0.3396.99
  • editor version: 1.0.32
@tsv2013
Copy link
Member

tsv2013 commented Jul 12, 2018

Thank you for the report. I've fixed the issue. Fix will be available in the nearest update.

Ewilliams90 pushed a commit to evergage/Survey-JS-Builder that referenced this issue Oct 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants