From 29f60931e2bee750e5acdf7bead5ed3b21d7e4d5 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Jun 10 2014 08:23:29 +0000 Subject: webui: association adder dialog - change find label to filter also add filter placeholder Reviewed-By: Endi Sukma Dewata --- diff --git a/install/ui/src/freeipa/dialog.js b/install/ui/src/freeipa/dialog.js index 7b156cf..f71f23b 100644 --- a/install/ui/src/freeipa/dialog.js +++ b/install/ui/src/freeipa/dialog.js @@ -763,10 +763,15 @@ IPA.adder_dialog = function(spec) { 'class': 'input-group col-md-12 adder-dialog-top' }).appendTo(container); + var filter_placeholder = text.get('@i18n:association.filter_placeholder'); + filter_placeholder = filter_placeholder.replace('${other_entity}', + that.other_entity.metadata.label); + that.filter_field = $('', { type: 'text', name: 'filter', 'class': 'form-control', + 'placeholder': filter_placeholder, keyup: function(event) { if (event.keyCode === keys.ENTER) { that.search(); @@ -781,7 +786,7 @@ IPA.adder_dialog = function(spec) { that.find_button = IPA.button({ name: 'find', - label: '@i18n:buttons.find', + label: '@i18n:buttons.filter', click: function() { that.search(); return false; diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json index 233218c..5fa8b3e 100644 --- a/install/ui/test/data/ipa_init.json +++ b/install/ui/test/data/ipa_init.json @@ -36,6 +36,7 @@ }, "added": "${count} item(s) added", "direct_membership": "Direct Membership", + "filter_placeholder": "Filter available ${other_entity}", "indirect_membership": "Indirect Membership", "no_entries": "No entries.", "paging": "Showing ${start} to ${end} of ${total} entries.", @@ -65,6 +66,7 @@ "disable": "Disable", "edit": "Edit", "enable": "Enable", + "filter": "Filter", "find": "Find", "get": "Get", "issue": "Issue", diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py index 886d3f6..e89c99d 100644 --- a/ipalib/plugins/internal.py +++ b/ipalib/plugins/internal.py @@ -170,6 +170,7 @@ class i18n_messages(Command): }, "added": _("${count} item(s) added"), "direct_membership": _("Direct Membership"), + "filter_placeholder": _("Filter available ${other_entity}"), "indirect_membership": _("Indirect Membership"), "no_entries": _("No entries."), "paging": _("Showing ${start} to ${end} of ${total} entries."), @@ -198,6 +199,7 @@ class i18n_messages(Command): "disable": _("Disable"), "edit": _("Edit"), "enable": _("Enable"), + "filter": _("Filter"), "find": _("Find"), "get": _("Get"), "issue": _("Issue"),