2019-06-04 14:53:10 +00:00
|
|
|
export default (submitable, cancelable, radiogroup, text) => (
|
|
|
|
scope = '[data-test-policy-form]'
|
|
|
|
) => {
|
2019-05-01 18:09:29 +00:00
|
|
|
return {
|
|
|
|
// this should probably be settable
|
|
|
|
resetScope: true,
|
2019-06-04 14:53:10 +00:00
|
|
|
scope: scope,
|
2019-05-01 18:09:29 +00:00
|
|
|
prefix: 'policy',
|
|
|
|
...submitable(),
|
|
|
|
...cancelable(),
|
2020-06-23 08:59:43 +00:00
|
|
|
...radiogroup('template', ['', 'service-identity', 'node-identity'], 'policy'),
|
2019-06-04 14:53:10 +00:00
|
|
|
rules: {
|
|
|
|
error: text('[data-test-rules] strong'),
|
|
|
|
},
|
2019-05-01 18:09:29 +00:00
|
|
|
};
|
|
|
|
};
|