Association table can be read only

When it is read only it does not show Add and Delete buttons.

Part of: https://fedorahosted.org/freeipa/ticket/5906

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
Pavel Vomacka 2016-06-02 13:07:00 +02:00 committed by Petr Vobornik
parent 5760cc9182
commit 95c61c6a0b

View File

@ -428,6 +428,7 @@ IPA.association_table_widget = function (spec) {
that.add_method = spec.add_method || 'add_member';
that.remove_method = spec.remove_method || 'remove_member';
that.read_only = spec.read_only === undefined ? false : spec.read_only;
that.add_title = text.get(spec.add_title || '@i18n:association.add.member');
that.remove_title = text.get(spec.remove_title || '@i18n:association.remove.member');
@ -501,6 +502,8 @@ IPA.association_table_widget = function (spec) {
that.table_create(container);
if (that.read_only) return;
that.remove_button = IPA.button_widget({
name: 'remove',
label: '@i18n:buttons.remove',