Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects
Commit 143beff8 authored by Zamil Majdy's avatar Zamil Majdy
Browse files

[#140657435] [#40] [Refactor] Add flexbox on login page

parent 170c246a
No related branches found
No related tags found
No related merge requests found
...@@ -75,8 +75,8 @@ padding-right:15%; ...@@ -75,8 +75,8 @@ padding-right:15%;
} }
.formLogin{ .formLogin{
margin: 30px auto 0; /*margin: auto;*/
width: 430px; /*width: 430px;*/
} }
.registerModal{ .registerModal{
......
...@@ -28,15 +28,15 @@ export default class Login extends React.Component { ...@@ -28,15 +28,15 @@ export default class Login extends React.Component {
</Header> </Header>
</div> </div>
<Grid stackable columns={2} relaxed> <Grid stackable={true} columns={2} padded style={{ display: 'flex', justifyContent: 'center' }}>
<Grid.Column> <Grid.Column width="seven">
<Segment basic> <Segment basic>
<LoginForm type="sso-ui" header="SSO Login" imgSrc="UI.png" imgSize="tiny" /> <LoginForm type="sso-ui" header="SSO Login" imgSrc="UI.png" imgSize="tiny" />
{this.props.children} {this.props.children}
</Segment> </Segment>
</Grid.Column> </Grid.Column>
<Grid.Column> <Grid.Column width="seven">
<Segment basic> <Segment basic>
<LoginForm type="company" header="Company Login" imgSrc="logo.png" imgSize="small" /> <LoginForm type="company" header="Company Login" imgSrc="logo.png" imgSize="small" />
{this.props.children} {this.props.children}
......
...@@ -16,7 +16,7 @@ export default class CompanyList extends React.Component { ...@@ -16,7 +16,7 @@ export default class CompanyList extends React.Component {
/* istanbul ignore next */ /* istanbul ignore next */
this.state = { companies: [], loading: true }; this.state = { companies: [], loading: true };
Server.get(this.props.url, false).then((data) => { Server.get(this.props.url, false).then((data) => {
this.setState({ companies: data, loading: false }); this.setState({ companies: data.results, loading: false });
}); });
this.generateCompanies = this.generateCompanies.bind(this); this.generateCompanies = this.generateCompanies.bind(this);
......
...@@ -15,7 +15,7 @@ def is_admin_or_company(user): ...@@ -15,7 +15,7 @@ def is_admin_or_company(user):
if user.is_superuser or user.is_staff: if user.is_superuser or user.is_staff:
return True return True
if not hasattr(user, "company") or user.company != Company.VERIFIED : if not hasattr(user, "company") or user.company.status != Company.VERIFIED:
raise PermissionDenied("This account is not valid company account or has not been verified") raise PermissionDenied("This account is not valid company account or has not been verified")
return True return True
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Yuk Cari Tempat Kape :)</title> <title>Yuk Cari Tempat Kape :)</title>
<link rel="stylesheet" href="{% static 'css/custom.css' %}"/> <link rel="stylesheet" href="{% static 'css/custom.css' %}"/>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/semantic.min.css"/> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/semantic.min.css"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment