Make show_roles language independent
A menu in the membership form was displayed depending on whether show_roles was equal to "No", however as the initial boolean value was passed through the Django yesno template filter which is internationalised, this would not work when using the dashboard in other languages. Change-Id: Ie58eb98590296b0c9f38b3c243c7c63327755fd9 Closes-Bug: #1224338
This commit is contained in:
parent
3e39c2142f
commit
f3fc4b419e
@ -37,7 +37,7 @@ horizon.membership = {
|
||||
* default role id.
|
||||
**/
|
||||
init_properties: function(step_slug) {
|
||||
horizon.membership.has_roles[step_slug] = $("." + step_slug + "_membership").data('show-roles') !== "no";
|
||||
horizon.membership.has_roles[step_slug] = $("." + step_slug + "_membership").data('show-roles') !== "False";
|
||||
horizon.membership.default_role_id[step_slug] = $('#id_default_' + step_slug + '_role').attr('value');
|
||||
horizon.membership.init_data_list(step_slug);
|
||||
horizon.membership.init_role_list(step_slug);
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<noscript><h3>{{ step }}</h3></noscript>
|
||||
|
||||
<div class="membership {{ step.slug }}_membership" data-show-roles="{{ step.show_roles|yesno }}">
|
||||
<div class="membership {{ step.slug }}_membership" data-show-roles="{{ step.show_roles }}">
|
||||
<div class="header">
|
||||
<div class="help_text">{{ step.help_text }}</div>
|
||||
<div class="left">
|
||||
|
Loading…
Reference in New Issue
Block a user