refs #5666 test: fix e2e tests
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
7a63e527a5
commit
035b31d878
|
@ -23,7 +23,7 @@ export function directive($translate, $window) {
|
|||
let rule = $attrs.rule.split('.');
|
||||
let modelName = rule.shift();
|
||||
let fieldName = rule.shift();
|
||||
|
||||
let modelAlias = $attrs.ruleAlias;
|
||||
let split = $attrs.ngModel.split('.');
|
||||
if (!fieldName) fieldName = split.pop() || null;
|
||||
if (!modelName) modelName = firstUpper(split.pop() || '');
|
||||
|
@ -31,8 +31,12 @@ export function directive($translate, $window) {
|
|||
if (!modelName || !fieldName)
|
||||
throw new Error(`rule: Cannot retrieve model or field attribute`);
|
||||
|
||||
|
||||
let modelValidations = vnValidations[modelName];
|
||||
|
||||
if (!modelValidations)
|
||||
modelValidations = vnValidations[modelAlias];
|
||||
|
||||
if (!modelValidations)
|
||||
throw new Error(`rule: Model '${modelName}' doesn't exist`);
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<form
|
||||
name="form"
|
||||
ng-submit="watcher.submit()"
|
||||
|
||||
class="vn-w-md">
|
||||
<vn-card class="vn-pa-lg">
|
||||
<vn-vertical>
|
||||
|
@ -14,12 +15,15 @@
|
|||
label="Name"
|
||||
ng-model="$ctrl.role.name"
|
||||
rule
|
||||
rule-alias="VnRole"
|
||||
vn-focus>
|
||||
</vn-textfield>
|
||||
<vn-textfield
|
||||
label="Description"
|
||||
ng-model="$ctrl.role.description"
|
||||
rule>
|
||||
label="Description"
|
||||
ng-model="$ctrl.role.description"
|
||||
rule
|
||||
rule-alias="VnRole"
|
||||
>
|
||||
</vn-textfield>
|
||||
</vn-vertical>
|
||||
</vn-card>
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
<vn-vertical>
|
||||
<vn-textfield
|
||||
label="Name"
|
||||
ng-model="$ctrl.role.name"
|
||||
ng-model="$ctrl.VnRole.name"
|
||||
rule
|
||||
vn-focus>
|
||||
</vn-textfield>
|
||||
<vn-textfield
|
||||
label="Description"
|
||||
ng-model="$ctrl.role.description"
|
||||
ng-model="$ctrl.VnRole.description"
|
||||
rule>
|
||||
</vn-textfield>
|
||||
</vn-vertical>
|
||||
|
|
Loading…
Reference in New Issue