Skip to content

Commit

Permalink
fix: make some admin billing fields optional (#5114)
Browse files Browse the repository at this point in the history
  • Loading branch information
maze-runnar authored Sep 22, 2020
1 parent e98ab8d commit cb9178a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
20 changes: 1 addition & 19 deletions app/components/forms/admin/settings/billing.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,9 @@ export default class Billing extends Component.extend(FormMixin) {
delay : false,
on : 'blur',
fields : {
adminBillingContactName: {
identifier : 'adminBillingContactName',
rules : [
{
type : 'empty',
prompt : this.l10n.t('Please enter the Contact name')
}
]
},
adminBillingPhone: {
identifier : 'adminBillingPhone',
optional : true,
rules : [
{
type : 'regExp',
Expand Down Expand Up @@ -53,16 +45,6 @@ export default class Billing extends Component.extend(FormMixin) {
}
]
},

adminBillingTaxInfo: {
identifier : 'adminBillingTaxInfo',
rules : [
{
type : 'empty',
prompt : this.l10n.t('Please enter the tax id')
}
]
},
adminCompany: {
identifier : 'adminCompany',
rules : [
Expand Down
6 changes: 3 additions & 3 deletions app/templates/components/forms/admin/settings/billing.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
{{t 'Invoice Contact'}}
</h3>
<div class="field">
<label class="required" for="adminBillingContactName">{{t 'Contact Name'}}</label>
<label for="adminBillingContactName">{{t 'Contact Name'}}</label>
<Input @type="text" @id="adminBillingContactName" @value={{this.model.adminBillingContactName}} />
</div>
<div class="field">
<label class="required" for="adminBillingPhone">{{t 'Phone'}}</label>
<label for="adminBillingPhone">{{t 'Phone'}}</label>
<Input @type="text" @id="adminBillingPhone" @value={{this.model.adminBillingPhone}} />
</div>
<div class="field">
Expand All @@ -58,7 +58,7 @@
</UiDropdown>
</div>
<div class="field">
<label class="required" for="adminBillingTaxInfo">{{t 'Tax ID'}}</label>
<label for="adminBillingTaxInfo">{{t 'Tax ID'}}</label>
<Input @type="text" @id="adminBillingTaxInfo" @value={{this.model.adminBillingTaxInfo}} />
</div>
<div class="field">
Expand Down

1 comment on commit cb9178a

@vercel
Copy link

@vercel vercel bot commented on cb9178a Sep 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.