Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Commits
43378b0b
Commit
43378b0b
authored
3 years ago
by
Jiří Kalvoda
Browse files
Options
Downloads
Patches
Plain Diff
Sjednocení teček na konci flashů
MJ: Tečku na konci, prosím. JK: Tady máš nějaké do zásoby!
parent
0375cceb
Branches
Branches containing commit
No related tags found
1 merge request
!111
Jk/delete registration
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mo/web/org_users.py
+8
-8
8 additions, 8 deletions
mo/web/org_users.py
with
8 additions
and
8 deletions
mo/web/org_users.py
+
8
−
8
View file @
43378b0b
...
@@ -321,7 +321,7 @@ def org_org(id: int):
...
@@ -321,7 +321,7 @@ def org_org(id: int):
)
)
sess
.
commit
()
sess
.
commit
()
app
.
logger
.
info
(
f
"
New role for user #
{
id
}
added:
{
db
.
row2dict
(
new_role
)
}
"
)
app
.
logger
.
info
(
f
"
New role for user #
{
id
}
added:
{
db
.
row2dict
(
new_role
)
}
"
)
flash
(
f
'
Role
"
{
new_role
}
"
úspěšně přidána
'
,
'
success
'
)
flash
(
f
'
Role
"
{
new_role
}
"
úspěšně přidána
.
'
,
'
success
'
)
return
redirect
(
url_for
(
'
org_user
'
,
id
=
id
))
return
redirect
(
url_for
(
'
org_user
'
,
id
=
id
))
if
form_remove_role
.
remove_role_id
.
data
and
form_remove_role
.
validate_on_submit
():
if
form_remove_role
.
remove_role_id
.
data
and
form_remove_role
.
validate_on_submit
():
...
@@ -340,7 +340,7 @@ def org_org(id: int):
...
@@ -340,7 +340,7 @@ def org_org(id: int):
)
)
sess
.
commit
()
sess
.
commit
()
app
.
logger
.
info
(
f
"
Role for user #
{
id
}
removed:
{
db
.
row2dict
(
role
)
}
"
)
app
.
logger
.
info
(
f
"
Role for user #
{
id
}
removed:
{
db
.
row2dict
(
role
)
}
"
)
flash
(
f
'
Role
"
{
role
}
"
úspěšně odebrána
'
,
'
success
'
)
flash
(
f
'
Role
"
{
role
}
"
úspěšně odebrána
.
'
,
'
success
'
)
return
redirect
(
url_for
(
'
org_user
'
,
id
=
id
))
return
redirect
(
url_for
(
'
org_user
'
,
id
=
id
))
return
render_template
(
return
render_template
(
...
@@ -451,7 +451,7 @@ def org_user_edit(id: int):
...
@@ -451,7 +451,7 @@ def org_user_edit(id: int):
if
hasattr
(
form
,
'
email
'
)
and
form
.
email
is
not
None
:
if
hasattr
(
form
,
'
email
'
)
and
form
.
email
is
not
None
:
other_user
=
mo
.
users
.
user_by_email
(
form
.
email
.
data
)
other_user
=
mo
.
users
.
user_by_email
(
form
.
email
.
data
)
if
other_user
is
not
None
and
other_user
!=
user
:
if
other_user
is
not
None
and
other_user
!=
user
:
flash
(
'
Zadaný e-mail nelze použít, existuje jiný účet s tímto e-mailem
'
,
'
danger
'
)
flash
(
'
Zadaný e-mail nelze použít, existuje jiný účet s tímto e-mailem
.
'
,
'
danger
'
)
check
=
False
check
=
False
if
check
:
if
check
:
...
@@ -466,9 +466,9 @@ def org_user_edit(id: int):
...
@@ -466,9 +466,9 @@ def org_user_edit(id: int):
details
=
{
'
action
'
:
'
edit
'
,
'
changes
'
:
changes
},
details
=
{
'
action
'
:
'
edit
'
,
'
changes
'
:
changes
},
)
)
sess
.
commit
()
sess
.
commit
()
flash
(
'
Změny uživatele uloženy
'
,
'
success
'
)
flash
(
'
Změny uživatele uloženy
.
'
,
'
success
'
)
else
:
else
:
flash
(
'
Žádné změny k uložení
'
,
'
info
'
)
flash
(
'
Žádné změny k uložení
.
'
,
'
info
'
)
return
redirect
(
url_for
(
'
org_user
'
,
id
=
id
))
return
redirect
(
url_for
(
'
org_user
'
,
id
=
id
))
...
@@ -546,7 +546,7 @@ def org_user_new():
...
@@ -546,7 +546,7 @@ def org_user_new():
token
=
mo
.
users
.
make_activation_token
(
new_user
)
token
=
mo
.
users
.
make_activation_token
(
new_user
)
sess
.
commit
()
sess
.
commit
()
flash
(
'
Nový uživatel vytvořen
'
,
'
success
'
)
flash
(
'
Nový uživatel vytvořen
.
'
,
'
success
'
)
if
mo
.
email
.
send_new_account_email
(
new_user
,
token
):
if
mo
.
email
.
send_new_account_email
(
new_user
,
token
):
flash
(
'
E-mail s odkazem na aktivaci účtu odeslán na {}.
'
.
format
(
new_user
.
email
),
'
success
'
)
flash
(
'
E-mail s odkazem na aktivaci účtu odeslán na {}.
'
.
format
(
new_user
.
email
),
'
success
'
)
...
@@ -600,9 +600,9 @@ def org_user_participant_edit(user_id: int, year: int):
...
@@ -600,9 +600,9 @@ def org_user_participant_edit(user_id: int, year: int):
details
=
{
'
action
'
:
'
edit-participant
'
,
'
year
'
:
year
,
'
changes
'
:
changes
},
details
=
{
'
action
'
:
'
edit-participant
'
,
'
year
'
:
year
,
'
changes
'
:
changes
},
)
)
sess
.
commit
()
sess
.
commit
()
flash
(
'
Změny registrace uloženy
'
,
'
success
'
)
flash
(
'
Změny registrace uloženy
.
'
,
'
success
'
)
else
:
else
:
flash
(
'
Žádné změny k uložení
'
,
'
info
'
)
flash
(
'
Žádné změny k uložení
.
'
,
'
info
'
)
return
redirect
(
url_for
(
'
org_user
'
,
id
=
user_id
))
return
redirect
(
url_for
(
'
org_user
'
,
id
=
user_id
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment