diff --git a/assets/js/ProfilePage.jsx b/assets/js/ProfilePage.jsx index 55dc5eeeb20a83e4310cdc33542b5faa73a1fdd5..f45a206d1be560ac40b1c3b62e319f977a726f40 100644 --- a/assets/js/ProfilePage.jsx +++ b/assets/js/ProfilePage.jsx @@ -38,6 +38,7 @@ export default class ProfilePage extends React.Component { bagikanTranskrip: '', acceptedNo: 0, refresh: 1, + loading: false, }; this.getProfile = this.getProfile.bind(this); this.handleChange = this.handleChange.bind(this); @@ -89,9 +90,12 @@ export default class ProfilePage extends React.Component { submitForm[key] = this.state.form[key]; } }); + this.setState({ loading: true }); Server.submit(`/profiles/students/${this.state.id}/`, submitForm, 'PATCH').then(() => { + this.setState({ loading: false }); this.modalAlert.open('Profil berhasil diperbaharui', 'Silakan periksa kembali profil anda', this.getProfile); }, error => error.then((r) => { + this.setState({ loading: false }); this.modalAlert.open('Pembaharuan profil gagal', r.detail); })); }; @@ -158,7 +162,7 @@ export default class ProfilePage extends React.Component { name="show_transcript" /> </Form.Field> - <Button type="submit" size="small" primary floated="right">Submit</Button> + <Button type="submit" size="small" loading={this.state.loading} primary floated="right">Submit</Button> </Form> </Segment> ); diff --git a/assets/js/components/TopMenu.jsx b/assets/js/components/TopMenu.jsx index de531388bf714e8771d75b4df37f1f4312d7ce71..58c2d99f5ef22a41f61c6b612cbb05e30e2910f3 100644 --- a/assets/js/components/TopMenu.jsx +++ b/assets/js/components/TopMenu.jsx @@ -4,7 +4,7 @@ import { Link, browserHistory } from 'react-router'; import Server from '../lib/Server'; import Storage from '../lib/Storage'; -const defaultPicture = 'http://semantic-ui.com/images/avatar/small/elliot.jpg'; +const defaultPicture = 'https://semantic-ui.com/images/avatar/small/elliot.jpg'; export default class TopMenu extends React.Component { diff --git a/kape/settings.py b/kape/settings.py index 358fd0e13eec7312b22b336d627910cbb4b0af3b..0967295dc6ae23469c82e06a247daa4fb5ff6104 100755 --- a/kape/settings.py +++ b/kape/settings.py @@ -20,7 +20,7 @@ SECRET_KEY = 'gz!k*@!n8h$yny1)zp!e5#w8!s4%*wqnur5$qnr@$*xx_o+aij' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [u'bot.recruit.id',u'104.236.76.161',u'localhost',u'127.0.0.1'] +ALLOWED_HOSTS = [u'bot.recruit.id',u'kape.recruit.id',u'104.236.76.161',u'localhost',u'127.0.0.1'] # Application definition