-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #392 from hasgeek/labels
Implement labels (resolves #313)
- Loading branch information
Showing
43 changed files
with
2,442 additions
and
440 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ | |
from .session import * | ||
from .profile import * | ||
from .participant import * | ||
from .label import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from baseframe import __ | ||
import baseframe.forms as forms | ||
|
||
__all__ = ['LabelForm', 'LabelOptionForm'] | ||
|
||
|
||
class LabelForm(forms.Form): | ||
name = forms.StringField("", widget=forms.HiddenInput(), validators=[forms.validators.Optional()]) | ||
title = forms.StringField(__("Label"), | ||
validators=[forms.validators.DataRequired(__(u"This can’t be empty")), forms.validators.Length(max=250)]) | ||
icon_emoji = forms.StringField("") | ||
required = forms.BooleanField(__("Make this label mandatory in proposal forms"), default=False, | ||
description=__("If checked, proposers must select one of the options")) | ||
restricted = forms.BooleanField(__("Restrict use of this label to editors"), default=False, | ||
description=__("If checked, only editors and reviewers can apply this label on proposals")) | ||
|
||
|
||
class LabelOptionForm(forms.Form): | ||
name = forms.StringField("", widget=forms.HiddenInput(), validators=[forms.validators.Optional()]) | ||
title = forms.StringField(__("Option"), | ||
validators=[forms.validators.DataRequired(__(u"This can’t be empty")), forms.validators.Length(max=250)]) | ||
icon_emoji = forms.StringField("") | ||
seq = forms.IntegerField("", widget=forms.HiddenInput()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ | |
from .session import * | ||
from .user import * | ||
from .venue import * | ||
from .label import * |
Oops, something went wrong.