-
-
Save yurio/01d50e9f0aa7086f9cce to your computer and use it in GitHub Desktop.
wrong-acl-levels.patch
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
Index: src/Oro/src/Oro/Bundle/SecurityBundle/Resources/public/js/security-access-levels.js | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- src/Oro/src/Oro/Bundle/SecurityBundle/Resources/public/js/security-access-levels.js (date 1409332834000) | |
+++ src/Oro/src/Oro/Bundle/SecurityBundle/Resources/public/js/security-access-levels.js (revision ) | |
@@ -31,11 +31,13 @@ | |
selector.attr('id', parentDiv.attr(selectorIdAttribute)); | |
selector.attr('class', 'security-permission'); | |
$.each(data, function (value, text) { | |
+ if (value !== 'template_name') { | |
- var option = $('<option>').attr('value', value).text(text); | |
- if (parentDiv.attr(valueAttribute) == value) { | |
- option.attr('selected', 'selected'); | |
- } | |
- selector.append(option); | |
+ var option = $('<option>').attr('value', value).text(text); | |
+ if (parentDiv.attr(valueAttribute) == value) { | |
+ option.attr('selected', 'selected'); | |
+ } | |
+ selector.append(option); | |
+ } | |
}); | |
selectDiv.append(selector); | |
selectDiv.show(); | |
Index: src/Oro/src/Oro/Bundle/SecurityBundle/Resources/views/AclPermission/aclAccessLevels.json.twig | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- src/Oro/src/Oro/Bundle/SecurityBundle/Resources/views/AclPermission/aclAccessLevels.json.twig (date 1409332834000) | |
+++ src/Oro/src/Oro/Bundle/SecurityBundle/Resources/views/AclPermission/aclAccessLevels.json.twig (revision ) | |
@@ -1,10 +1,11 @@ | |
+{ | |
{% set translatedLevels = {} %} | |
{% for id, level in levels %} | |
{% if level is empty %} | |
{% set level = 'NONE' %} | |
{% endif %} | |
{% set label = 'oro.security.access-level.' ~ level %} | |
- {% set translatedLevels = translatedLevels|merge({(id) : label|trans}) %} | |
+ {% if loop.index != loop.first %},{% endif %} | |
+ "{{ id }}":"{{ label|trans }}" | |
{% endfor %} | |
- | |
-{{ translatedLevels|json_encode()|raw }} | |
+} | |
\ No newline at end of file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment