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 {
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>
);
......
......@@ -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 {
......
......@@ -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
......
Markdown is supported
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