Form groups for i18n input

This commit is contained in:
Raphael Michel
2015-04-05 22:36:22 +02:00
parent aeac6d6e39
commit d060a4b19b
2 changed files with 18 additions and 0 deletions

View File

@@ -64,6 +64,9 @@ class I18nWidget(forms.MultiWidget):
)
return data
def format_output(self, rendered_widgets):
return '<div class="i18n-form-group">%s</div>' % super().format_output(rendered_widgets)
class I18nTextInput(I18nWidget):
widget = forms.TextInput

View File

@@ -67,6 +67,21 @@ td > .form-group > .checkbox {
padding-left: 0;
}
.i18n-form-group input,
.i18n-form-group textarea {
.border-top-radius(0px);
.border-bottom-radius(0px);
border-top-width: 0;
&:first-child {
.border-top-radius(@input-border-radius);
border-top-width: 1px;
}
&:last-child {
.border-bottom-radius(@input-border-radius);
}
}
@media (min-width: @screen-sm-min) {
.variation-matrix > tbody > tr > td {
line-height: 34px;