Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
58840b40
Commit
58840b40
authored
Oct 20, 2014
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rendering of letter form for dicitonary
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
0e0d282c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
1 deletion
+30
-1
weblate/html/bootstrap3/layout/inline_field.html
weblate/html/bootstrap3/layout/inline_field.html
+21
-0
weblate/html/dictionary.html
weblate/html/dictionary.html
+1
-1
weblate/trans/forms.py
weblate/trans/forms.py
+8
-0
No files found.
weblate/html/bootstrap3/layout/inline_field.html
0 → 100644
View file @
58840b40
{% load crispy_forms_field %}
{% if field.is_hidden %}
{{ field }}
{% else %}
{% if field|is_checkbox %}
<div
id=
"div_{{ field.auto_id }}"
class=
"checkbox"
>
<label
for=
"{{ field.id_for_label }}"
class=
"{% if field.field.required %} requiredField{% endif %}"
>
{% crispy_field field 'class' 'checkbox' %}
{{ field.label|safe }}
</label>
</div>
{% else %}
<div
id=
"div_{{ field.auto_id }}"
class=
"form-group"
>
<label
for=
"{{ field.id_for_label }}"
class=
"{% if field.field.required %} requiredField{% endif %}"
>
{{ field.label|safe }}
</label>
{% crispy_field field 'placeholder' field.label %}
</div>
{% endif %}
{% endif %}
weblate/html/dictionary.html
View file @
58840b40
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
{% include "paginator.html" %}
{% include "paginator.html" %}
<form
class=
"autosubmit paginatoraddon"
>
<form
class=
"autosubmit paginatoraddon"
>
{
{ letterform|crispy }
}
{
% crispy letterform %
}
</form>
</form>
{% if page_obj.object_list %}
{% if page_obj.object_list %}
...
...
weblate/trans/forms.py
View file @
58840b40
...
@@ -26,6 +26,8 @@ from django.utils.safestring import mark_safe
...
@@ -26,6 +26,8 @@ from django.utils.safestring import mark_safe
from
django.utils.encoding
import
smart_unicode
from
django.utils.encoding
import
smart_unicode
from
django.forms
import
ValidationError
from
django.forms
import
ValidationError
from
django.core.urlresolvers
import
reverse
from
django.core.urlresolvers
import
reverse
from
crispy_forms.helper
import
FormHelper
from
django.forms
import
ValidationError
from
weblate.lang.models
import
Language
from
weblate.lang.models
import
Language
from
weblate.trans.models
import
Unit
from
weblate.trans.models
import
Unit
from
weblate.trans.models.source
import
PRIORITY_CHOICES
from
weblate.trans.models.source
import
PRIORITY_CHOICES
...
@@ -571,6 +573,12 @@ class LetterForm(forms.Form):
...
@@ -571,6 +573,12 @@ class LetterForm(forms.Form):
required
=
False
required
=
False
)
)
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
LetterForm
,
self
).
__init__
(
*
args
,
**
kwargs
)
self
.
helper
=
FormHelper
(
self
)
self
.
helper
.
form_class
=
'form-inline'
self
.
helper
.
field_template
=
'bootstrap3/layout/inline_field.html'
class
CommentForm
(
forms
.
Form
):
class
CommentForm
(
forms
.
Form
):
'''
'''
...
...
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