mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Add possibility to pass url parameter to update command of details page
'update_attribute' can contain a name of field in details page. In that case the value of the field with field name will be appended to the update command options. Part of: https://fedorahosted.org/freeipa/ticket/5426 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
bbca1d9219
commit
042e113db9
@@ -553,6 +553,13 @@ exp.details_facet = IPA.details_facet = function(spec, no_init) {
|
||||
*/
|
||||
that.update_command_name = spec.update_command_name || 'mod';
|
||||
|
||||
/**
|
||||
* Name of url argument which will be added to update RPC command as option.
|
||||
*
|
||||
* @property {string}
|
||||
*/
|
||||
that.update_attribute = spec.update_attribute || null;
|
||||
|
||||
/**
|
||||
* Command mode
|
||||
* Command mode determines how update information on update is collected.
|
||||
@@ -929,6 +936,10 @@ exp.details_facet = IPA.details_facet = function(spec, no_init) {
|
||||
options: options
|
||||
});
|
||||
|
||||
if (that.update_attribute) {
|
||||
that.add_url_arg_to_command(command, that.update_attribute);
|
||||
}
|
||||
|
||||
//set command options
|
||||
that.add_fields_to_command(update_info, command);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user