Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
02cf7d0b
Commit
02cf7d0b
authored
Oct 24, 2015
by
Ray Schamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GH-162: Show "user deletion canceled" modal
The look of the modals is all messed up. Will fix that separately.
parent
b9ecbae5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
6 deletions
+33
-6
src/components/navigation/navigation.jsx
src/components/navigation/navigation.jsx
+33
-6
No files found.
src/components/navigation/navigation.jsx
View file @
02cf7d0b
...
@@ -12,11 +12,14 @@ var Dropdown = require('./dropdown.jsx');
...
@@ -12,11 +12,14 @@ var Dropdown = require('./dropdown.jsx');
var
Input
=
require
(
'
../forms/input.jsx
'
);
var
Input
=
require
(
'
../forms/input.jsx
'
);
var
log
=
require
(
'
../../lib/log.js
'
);
var
log
=
require
(
'
../../lib/log.js
'
);
var
Login
=
require
(
'
../login/login.jsx
'
);
var
Login
=
require
(
'
../login/login.jsx
'
);
var
Modal
=
require
(
'
../modal/modal.jsx
'
);
var
Registration
=
require
(
'
../registration/registration.jsx
'
);
var
Registration
=
require
(
'
../registration/registration.jsx
'
);
var
Session
=
require
(
'
../../mixins/session.jsx
'
);
var
Session
=
require
(
'
../../mixins/session.jsx
'
);
require
(
'
./navigation.scss
'
);
require
(
'
./navigation.scss
'
);
Modal
.
setAppElement
(
document
.
getElementById
(
'
view
'
));
var
defaultMessages
=
defineMessages
({
var
defaultMessages
=
defineMessages
({
messages
:
{
messages
:
{
id
:
'
general.messages
'
,
id
:
'
general.messages
'
,
...
@@ -36,12 +39,13 @@ var Navigation = React.createClass({
...
@@ -36,12 +39,13 @@ var Navigation = React.createClass({
],
],
getInitialState
:
function
()
{
getInitialState
:
function
()
{
return
{
return
{
'
accountNavOpen
'
:
false
,
accountNavOpen
:
false
,
'
loginOpen
'
:
false
,
canceledDeletionOpen
:
false
,
'
loginError
'
:
null
,
loginOpen
:
false
,
'
registrationOpen
'
:
false
,
loginError
:
null
,
'
unreadMessageCount
'
:
0
,
registrationOpen
:
false
,
'
messageCountIntervalId
'
:
-
1
unreadMessageCount
:
0
,
messageCountIntervalId
:
-
1
};
};
},
},
componentDidMount
:
function
()
{
componentDidMount
:
function
()
{
...
@@ -103,6 +107,7 @@ var Navigation = React.createClass({
...
@@ -103,6 +107,7 @@ var Navigation = React.createClass({
},
},
handleLogIn
:
function
(
formData
)
{
handleLogIn
:
function
(
formData
)
{
this
.
setState
({
'
loginError
'
:
null
});
this
.
setState
({
'
loginError
'
:
null
});
formData
[
'
useMessages
'
]
=
true
;
this
.
api
({
this
.
api
({
method
:
'
post
'
,
method
:
'
post
'
,
host
:
''
,
host
:
''
,
...
@@ -119,6 +124,11 @@ var Navigation = React.createClass({
...
@@ -119,6 +124,11 @@ var Navigation = React.createClass({
this
.
setState
({
'
loginError
'
:
body
.
msg
});
this
.
setState
({
'
loginError
'
:
body
.
msg
});
}
else
{
}
else
{
this
.
closeLogin
();
this
.
closeLogin
();
body
.
messages
.
map
(
function
(
message
)
{
if
(
message
.
message
==
'
canceled-deletion
'
)
{
this
.
showCanceledDeletion
();
}
}.
bind
(
this
));
window
.
refreshSession
();
window
.
refreshSession
();
}
}
}
}
...
@@ -145,6 +155,12 @@ var Navigation = React.createClass({
...
@@ -145,6 +155,12 @@ var Navigation = React.createClass({
closeAccountNav
:
function
()
{
closeAccountNav
:
function
()
{
this
.
setState
({
'
accountNavOpen
'
:
false
});
this
.
setState
({
'
accountNavOpen
'
:
false
});
},
},
showCanceledDeletion
:
function
()
{
this
.
setState
({
'
canceledDeletionOpen
'
:
true
});
},
closeCanceledDeletion
:
function
()
{
this
.
setState
({
'
canceledDeletionOpen
'
:
false
});
},
closeRegistration
:
function
()
{
closeRegistration
:
function
()
{
this
.
setState
({
'
registrationOpen
'
:
false
});
this
.
setState
({
'
registrationOpen
'
:
false
});
},
},
...
@@ -299,6 +315,17 @@ var Navigation = React.createClass({
...
@@ -299,6 +315,17 @@ var Navigation = React.createClass({
</
li
>
</
li
>
]
}
]
}
</
ul
>
</
ul
>
<
Modal
isOpen=
{
this
.
state
.
canceledDeletionOpen
}
onRequestClose=
{
this
.
closeCanceledDeletion
}
frameSettings=
{
{
padding
:
15
}
}
>
<
h4
>
Your Account Will Not Be Deleted
</
h4
>
<
p
>
Your account was scheduled for deletion but you logged in. Your account has been reactivated.
If you didn’t request for your account to be deleted, you should
{
'
'
}
<
a
href=
"/accounts/password_reset/"
>
change your password
</
a
>
{
'
'
}
to make sure your account is secure.
</
p
>
</
Modal
>
</
div
>
</
div
>
);
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment