Fakultas Ilmu Komputer UI

Commit c72ba43d authored by Zamil Majdy's avatar Zamil Majdy
Browse files

Appearance tweaks :)

parent 43727156
...@@ -38,6 +38,7 @@ export default class ProfilePage extends React.Component { ...@@ -38,6 +38,7 @@ export default class ProfilePage extends React.Component {
bagikanTranskrip: '', bagikanTranskrip: '',
acceptedNo: 0, acceptedNo: 0,
refresh: 1, refresh: 1,
loading: false,
}; };
this.getProfile = this.getProfile.bind(this); this.getProfile = this.getProfile.bind(this);
this.handleChange = this.handleChange.bind(this); this.handleChange = this.handleChange.bind(this);
...@@ -89,9 +90,12 @@ export default class ProfilePage extends React.Component { ...@@ -89,9 +90,12 @@ export default class ProfilePage extends React.Component {
submitForm[key] = this.state.form[key]; submitForm[key] = this.state.form[key];
} }
}); });
this.setState({ loading: true });
Server.submit(`/profiles/students/${this.state.id}/`, submitForm, 'PATCH').then(() => { 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); this.modalAlert.open('Profil berhasil diperbaharui', 'Silakan periksa kembali profil anda', this.getProfile);
}, error => error.then((r) => { }, error => error.then((r) => {
this.setState({ loading: false });
this.modalAlert.open('Pembaharuan profil gagal', r.detail); this.modalAlert.open('Pembaharuan profil gagal', r.detail);
})); }));
}; };
...@@ -158,7 +162,7 @@ export default class ProfilePage extends React.Component { ...@@ -158,7 +162,7 @@ export default class ProfilePage extends React.Component {
name="show_transcript" name="show_transcript"
/> />
</Form.Field> </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> </Form>
</Segment> </Segment>
); );
......
...@@ -4,7 +4,7 @@ import { Link, browserHistory } from 'react-router'; ...@@ -4,7 +4,7 @@ import { Link, browserHistory } from 'react-router';
import Server from '../lib/Server'; import Server from '../lib/Server';
import Storage from '../lib/Storage'; 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 { export default class TopMenu extends React.Component {
......
...@@ -20,7 +20,7 @@ SECRET_KEY = 'gz!k*@!n8h$yny1)zp!e5#w8!s4%*wqnur5$qnr@$*xx_o+aij' ...@@ -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! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True 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 # Application definition
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment