mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
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:
parent
5760cc9182
commit
95c61c6a0b
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user