This commit is contained in:
parent
5203c33483
commit
471da18a6c
|
@ -14,7 +14,10 @@
|
|||
translate-attr="{title: 'Clear'}">
|
||||
</vn-icon>
|
||||
</div>
|
||||
<label class="mdl-textfield__label" translate>{{::$ctrl.label}}</label>
|
||||
<label class="mdl-textfield__label">
|
||||
<span translate>{{::$ctrl.label}}</span>
|
||||
<span translate ng-show="::$ctrl.required">(*)</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<vn-drop-down
|
||||
|
|
|
@ -294,6 +294,7 @@ ngModule.component('vnAutocomplete', {
|
|||
label: '@',
|
||||
field: '=?',
|
||||
disabled: '<?',
|
||||
required: '@?',
|
||||
showField: '@?',
|
||||
valueField: '@?',
|
||||
initialData: '<?',
|
||||
|
|
|
@ -37,6 +37,10 @@ vn-autocomplete {
|
|||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
label span:nth-child(2) {
|
||||
color: $color-alert
|
||||
}
|
||||
}
|
||||
|
||||
ul.vn-autocomplete {
|
||||
|
|
|
@ -149,6 +149,10 @@ vn-textfield {
|
|||
.infix.invalid + .underline {
|
||||
background-color: #d50000;
|
||||
}
|
||||
|
||||
label span:nth-child(2) {
|
||||
color: $color-alert
|
||||
}
|
||||
}
|
||||
|
||||
vn-table {
|
||||
|
|
|
@ -14,7 +14,10 @@
|
|||
ng-focus="$ctrl.hasFocus = true"
|
||||
ng-blur="$ctrl.hasFocus = false"
|
||||
tabindex="{{$ctrl.input.tabindex}}"/>
|
||||
<label class="label" translate>{{::$ctrl.label}}</label>
|
||||
<label class="label">
|
||||
<span translate>{{::$ctrl.label}}</span>
|
||||
<span translate ng-show="::$ctrl.required">(*)</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="underline"></div>
|
||||
<div class="selected underline"></div>
|
||||
|
|
|
@ -84,6 +84,7 @@ ngModule.component('vnTextfield', {
|
|||
label: '@?',
|
||||
name: '@?',
|
||||
disabled: '<?',
|
||||
required: '@?',
|
||||
readonly: '<?',
|
||||
rule: '@?',
|
||||
type: '@?',
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
module.exports = Self => {
|
||||
Self.validatesPresenceOf('name', {
|
||||
message: 'Name cannot be blank'
|
||||
});
|
||||
};
|
|
@ -98,28 +98,33 @@
|
|||
<vn-horizontal>
|
||||
<vn-textfield vn-one
|
||||
label="Name"
|
||||
model="$ctrl.newBankEntity.name">
|
||||
model="$ctrl.newBankEntity.name"
|
||||
required="true">
|
||||
</vn-textfield>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete vn-one
|
||||
<vn-autocomplete vn-id="country" vn-one
|
||||
label="Country"
|
||||
field="$ctrl.newBankEntity.countryFk"
|
||||
fields="['id', 'country', 'code']"
|
||||
url="/client/api/Countries"
|
||||
value-field="id"
|
||||
show-field="country">
|
||||
show-field="country"
|
||||
required="true">
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-one
|
||||
label="Code"
|
||||
model="$ctrl.newBankEntity.id">
|
||||
label="Entity Code"
|
||||
model="$ctrl.newBankEntity.id"
|
||||
ng-show="country.selection.code === 'ES'">
|
||||
</vn-textfield>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-one
|
||||
label="Swift / BIC"
|
||||
model="$ctrl.newBankEntity.bic">
|
||||
model="$ctrl.newBankEntity.bic"
|
||||
required="true">
|
||||
</vn-textfield>
|
||||
</vn-horizontal>
|
||||
</tpl-body>
|
||||
|
|
|
@ -59,8 +59,6 @@ export default class Controller {
|
|||
try {
|
||||
if (!this.newBankEntity.name)
|
||||
throw new Error(`Name can't be empty`);
|
||||
if (!this.newBankEntity.id)
|
||||
throw new Error(`Code can't be empty`);
|
||||
if (!this.newBankEntity.bic)
|
||||
throw new Error(`Swift / BIC can't be empty`);
|
||||
|
||||
|
|
|
@ -16,4 +16,4 @@ Save: Guardar
|
|||
New bank entity: Nueva entidad bancaria
|
||||
Name can't be empty: El nombre no puede quedar vacío
|
||||
Swift / BIC can't be empty: El Swift / BIC no puede quedar vacío
|
||||
Code: Código
|
||||
Entity Code: Código
|
Loading…
Reference in New Issue