| 669 | } |
| 670 | |
| 671 | onJoinClassroomError (classroom, jqxhr, options) { |
| 672 | this.state = null |
| 673 | if (jqxhr.status === 422) { |
| 674 | this.errorMessage = 'Please enter a code.' |
| 675 | } else if (jqxhr.status === 404) { |
| 676 | this.errorMessage = $.t('signup.classroom_not_found') |
| 677 | } else if (jqxhr.status === 403) { |
| 678 | this.errorMessage = $.t('signup.activation_code_used') |
| 679 | } else { |
| 680 | this.errorMessage = `${jqxhr.responseText}` |
| 681 | } |
| 682 | return this.renderSelectors('#join-class-form') |
| 683 | } |
| 684 | |
| 685 | onJoinClassroomSuccess (newClassroom, data, options) { |
| 686 | this.state = null |