Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Hjelp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-Hjelp
Commits
e0dc6801
Verified
Commit
e0dc6801
authored
4 years ago
by
Tom Teichler
Browse files
Options
Downloads
Patches
Plain Diff
[Reformat] black
parent
10e93dee
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
aleksis/apps/hjelp/forms.py
+5
-14
5 additions, 14 deletions
aleksis/apps/hjelp/forms.py
aleksis/apps/hjelp/models.py
+4
-18
4 additions, 18 deletions
aleksis/apps/hjelp/models.py
aleksis/apps/hjelp/views.py
+3
-15
3 additions, 15 deletions
aleksis/apps/hjelp/views.py
with
12 additions
and
47 deletions
aleksis/apps/hjelp/forms.py
+
5
−
14
View file @
e0dc6801
...
...
@@ -9,9 +9,7 @@ from .models import IssueCategory
class
FAQForm
(
forms
.
Form
):
"""
Form used to allow users to send in a question
"""
question
=
forms
.
CharField
(
widget
=
forms
.
Textarea
(),
label
=
_
(
"
Your question
"
),
required
=
True
)
question
=
forms
.
CharField
(
widget
=
forms
.
Textarea
(),
label
=
_
(
"
Your question
"
),
required
=
True
)
class
IssueForm
(
forms
.
Form
):
...
...
@@ -51,16 +49,13 @@ class IssueForm(forms.Form):
),
)
bug_category_free_text
=
forms
.
CharField
(
label
=
_
(
"
Please specify the issue according to the chosen category.
"
),
required
=
False
,
label
=
_
(
"
Please specify the issue according to the chosen category.
"
),
required
=
False
,
)
short_description
=
forms
.
CharField
(
label
=
_
(
"
Please describe the issue in one sentence.
"
),
required
=
True
)
long_description
=
forms
.
CharField
(
widget
=
forms
.
Textarea
,
label
=
_
(
"
Please describe the issue in more detail.
"
),
required
=
False
,
widget
=
forms
.
Textarea
,
label
=
_
(
"
Please describe the issue in more detail.
"
),
required
=
False
,
)
...
...
@@ -96,15 +91,11 @@ class FeedbackForm(forms.Form):
)
apps
=
forms
.
CharField
(
label
=
_
(
"
What do you like? What would you change?
"
),
required
=
False
,
widget
=
forms
.
Textarea
,
label
=
_
(
"
What do you like? What would you change?
"
),
required
=
False
,
widget
=
forms
.
Textarea
,
)
more
=
forms
.
CharField
(
label
=
_
(
"
What else do you want to tell us?
"
),
required
=
False
,
widget
=
forms
.
Textarea
,
label
=
_
(
"
What else do you want to tell us?
"
),
required
=
False
,
widget
=
forms
.
Textarea
,
)
ideas
=
forms
.
CharField
(
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/hjelp/models.py
+
4
−
18
View file @
e0dc6801
...
...
@@ -24,11 +24,7 @@ class FAQSection(ExtensibleModel):
name
=
models
.
CharField
(
max_length
=
200
,
verbose_name
=
_
(
"
Name
"
))
icon
=
models
.
CharField
(
max_length
=
50
,
blank
=
True
,
default
=
"
question_answer
"
,
choices
=
ICONS
,
verbose_name
=
_
(
"
Icon
"
),
max_length
=
50
,
blank
=
True
,
default
=
"
question_answer
"
,
choices
=
ICONS
,
verbose_name
=
_
(
"
Icon
"
),
)
def
__str__
(
self
):
...
...
@@ -42,11 +38,7 @@ class FAQSection(ExtensibleModel):
class
FAQQuestion
(
ExtensibleModel
):
question_text
=
models
.
TextField
(
verbose_name
=
_
(
"
Question
"
))
icon
=
models
.
CharField
(
max_length
=
50
,
blank
=
True
,
default
=
"
question_answer
"
,
choices
=
ICONS
,
verbose_name
=
_
(
"
Icon
"
),
max_length
=
50
,
blank
=
True
,
default
=
"
question_answer
"
,
choices
=
ICONS
,
verbose_name
=
_
(
"
Icon
"
),
)
show
=
models
.
BooleanField
(
verbose_name
=
_
(
"
Show
"
),
default
=
False
)
...
...
@@ -79,11 +71,7 @@ class FAQQuestion(ExtensibleModel):
class
IssueCategory
(
ExtensibleModel
):
name
=
models
.
CharField
(
max_length
=
40
,
verbose_name
=
_
(
"
Name
"
))
icon
=
models
.
CharField
(
max_length
=
50
,
blank
=
True
,
default
=
"
bug_report
"
,
choices
=
ICONS
,
verbose_name
=
_
(
"
Icon
"
),
max_length
=
50
,
blank
=
True
,
default
=
"
bug_report
"
,
choices
=
ICONS
,
verbose_name
=
_
(
"
Icon
"
),
)
parent
=
models
.
ForeignKey
(
"
self
"
,
...
...
@@ -93,9 +81,7 @@ class IssueCategory(ExtensibleModel):
null
=
True
,
verbose_name
=
_
(
"
Parent category
"
),
)
free_text
=
models
.
BooleanField
(
verbose_name
=
_
(
"
Free text input allowed
"
),
default
=
False
)
free_text
=
models
.
BooleanField
(
verbose_name
=
_
(
"
Free text input allowed
"
),
default
=
False
)
placeholder
=
models
.
CharField
(
max_length
=
100
,
verbose_name
=
_
(
"
Placeholder
"
),
blank
=
True
,
null
=
True
)
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/hjelp/views.py
+
3
−
15
View file @
e0dc6801
...
...
@@ -88,12 +88,7 @@ def report_issue(request):
# Register activity
desc_categories
=
add_arrows
(
[
bug_category_1
,
bug_category_2
,
bug_category_3
,
bug_category_free_text
,
]
[
bug_category_1
,
bug_category_2
,
bug_category_3
,
bug_category_free_text
,]
)
desc_act
=
f
"
{
desc_categories
}
|
{
short_description
}
"
act
=
Activity
(
...
...
@@ -108,12 +103,7 @@ def report_issue(request):
context
=
{
"
description
"
:
[
add_arrows
(
[
bug_category_1
,
bug_category_2
,
bug_category_3
,
bug_category_free_text
,
]
[
bug_category_1
,
bug_category_2
,
bug_category_3
,
bug_category_free_text
,]
),
short_description
,
long_description
,
...
...
@@ -124,9 +114,7 @@ def report_issue(request):
send_templated_mail
(
template_name
=
"
hjelp
"
,
from_email
=
f
"
{
request
.
user
.
get_full_name
()
}
<
{
request
.
user
.
email
}
>
"
,
recipient_list
=
[
get_site_preferences
()[
"
hjelp__issue_report_recipient
"
]
],
recipient_list
=
[
get_site_preferences
()[
"
hjelp__issue_report_recipient
"
]],
context
=
context
,
)
...
...
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