Skip to content

Commit

Permalink
[FEATURE] Highlight empty/missing label fields.
Browse files Browse the repository at this point in the history
Inspired by issue #2.
  • Loading branch information
Raphael Graf committed Oct 20, 2017
1 parent a49dc51 commit 5df580c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Resources/Private/Partials/Module/List.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
<div>
<f:form.textfield name="keys[{key}]" value="{key}" readonly="{f:if(condition:'{conf.modifyKeys}',then:'',else:'1')}" additionalAttributes="{autocomplete:'off'}" />
</div>
<div>
<div class="{f:if(condition: '{label.default}', else: 'nd')}">
<f:form.textarea name="labels[{key}][default]" value="{label.default}" additionalAttributes="{f:if(condition:'{conf.langKeysAllowed.default}',then:'{data-no:\'1\'}',else:'{readonly:\'1\'}')}" />
</div>
<f:for each="{label}" as="value" key="langKey">
<f:if condition="{langKey} != 'default'">
<div class="{f:if(condition: '{value} == {label.default}', then: 'same')}">
<div class="{f:if(condition: '{value}', then: '{f:if(condition: \'{value} == {label.default}\', then: \'same\')}', else: 'nt')}">
<f:form.textarea name="labels[{key}][{langKey}]" value="{value}" />
</div>
</f:if>
Expand Down
8 changes: 7 additions & 1 deletion Resources/Public/Css/translate.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@
line-height:normal;
}
.translate-row > .same {
background-color:#d2e3e2;
background-color:#dbeceb;
}
.translate-row > .nd {
background-color:#e5bcbc;
}
.translate-row > .nt {
background-color:#ffe3e3;
}
.translate-row input {
width:100%;
Expand Down

0 comments on commit 5df580c

Please sign in to comment.