commit
b396771888
17
resources/assets/js/views/common/companies.js
vendored
17
resources/assets/js/views/common/companies.js
vendored
@ -30,5 +30,22 @@ const app = new Vue({
|
|||||||
form: new Form('company'),
|
form: new Form('company'),
|
||||||
bulk_action: new BulkAction('companies')
|
bulk_action: new BulkAction('companies')
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
// Form Submit
|
||||||
|
onSubmit() {
|
||||||
|
this.form.loading = true;
|
||||||
|
|
||||||
|
if (this.form.country === "") {
|
||||||
|
this.form.errors.set('country', [country_validation_required_message]);
|
||||||
|
|
||||||
|
this.form.loading = false;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.form.submit();
|
||||||
|
},
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
</x-slot>
|
</x-slot>
|
||||||
|
|
||||||
<x-slot name="body">
|
<x-slot name="body">
|
||||||
<x-form.group.textarea name="address" label="{{ trans('general.address') }}" v-model="form.address" />
|
<x-form.group.textarea name="address" label="{{ trans('general.address') }}" v-model="form.address" not-required />
|
||||||
|
|
||||||
<x-form.group.text name="city" label="{{ trans_choice('general.cities', 1) }}" value="{{ setting('company.city') }}" not-required />
|
<x-form.group.text name="city" label="{{ trans_choice('general.cities', 1) }}" value="{{ setting('company.city') }}" not-required />
|
||||||
|
|
||||||
@ -65,5 +65,11 @@
|
|||||||
</x-form.container>
|
</x-form.container>
|
||||||
</x-slot>
|
</x-slot>
|
||||||
|
|
||||||
|
@push('scripts_end')
|
||||||
|
<script type="text/javascript">
|
||||||
|
var country_validation_required_message = "{{ trans('validation.required', ['attribute' => trans_choice('general.countries', 1)]) }}";
|
||||||
|
</script>
|
||||||
|
@endpush
|
||||||
|
|
||||||
<x-script folder="common" file="companies" />
|
<x-script folder="common" file="companies" />
|
||||||
</x-layouts.admin>
|
</x-layouts.admin>
|
||||||
|
@ -69,5 +69,11 @@
|
|||||||
</x-form.container>
|
</x-form.container>
|
||||||
</x-slot>
|
</x-slot>
|
||||||
|
|
||||||
|
@push('scripts_end')
|
||||||
|
<script type="text/javascript">
|
||||||
|
var country_validation_required_message = "{{ trans('validation.required', ['attribute' => trans_choice('general.countries', 1)]) }}";
|
||||||
|
</script>
|
||||||
|
@endpush
|
||||||
|
|
||||||
<x-script folder="common" file="companies" />
|
<x-script folder="common" file="companies" />
|
||||||
</x-layouts.admin>
|
</x-layouts.admin>
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if (! $hideCountry)
|
@if (! $hideCountry)
|
||||||
<x-form.group.country form-group-class="sm:col-span-3 el-select-tags-pl-38" />
|
<x-form.group.country form-group-class="sm:col-span-3 el-select-tags-pl-38" not-required />
|
||||||
@endif
|
@endif
|
||||||
</x-slot>
|
</x-slot>
|
||||||
</x-form.section>
|
</x-form.section>
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
label="{!! trans_choice('general.countries', 1) !!}"
|
label="{!! trans_choice('general.countries', 1) !!}"
|
||||||
:options="trans('countries')"
|
:options="trans('countries')"
|
||||||
:selected="setting('company.country')"
|
:selected="setting('company.country')"
|
||||||
not-required
|
required="{{ $required }}"
|
||||||
|
not-required="{{ $notRequired }}"
|
||||||
model="form.country"
|
model="form.country"
|
||||||
form-group-class="{{ $formGroupClass }}"
|
form-group-class="{{ $formGroupClass }}"
|
||||||
/>
|
/>
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
<x-form.group.text name="state" label="{{ trans('general.state') }}" form-group-class="col-span-6" not-required />
|
<x-form.group.text name="state" label="{{ trans('general.state') }}" form-group-class="col-span-6" not-required />
|
||||||
|
|
||||||
<x-form.group.country form-group-class="col-span-6 el-select-tags-pl-38" />
|
<x-form.group.country form-group-class="col-span-6 el-select-tags-pl-38" not-required />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
<x-form.group.text name="state" label="{{ trans('general.state') }}" form-group-class="col-span-6" not-required />
|
<x-form.group.text name="state" label="{{ trans('general.state') }}" form-group-class="col-span-6" not-required />
|
||||||
|
|
||||||
<x-form.group.country form-group-class="col-span-6 el-select-tags-pl-38" />
|
<x-form.group.country form-group-class="col-span-6 el-select-tags-pl-38" not-required />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
<x-form.group.text name="state" label="{{ trans('general.state') }}" form-group-class="col-span-6" not-required />
|
<x-form.group.text name="state" label="{{ trans('general.state') }}" form-group-class="col-span-6" not-required />
|
||||||
|
|
||||||
<x-form.group.country form-group-class="col-span-6 el-select-tags-pl-38" />
|
<x-form.group.country form-group-class="col-span-6 el-select-tags-pl-38" not-required />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
<x-form.group.text name="state" label="{{ trans('general.state') }}" form-group-class="col-span-6" not-required />
|
<x-form.group.text name="state" label="{{ trans('general.state') }}" form-group-class="col-span-6" not-required />
|
||||||
|
|
||||||
<x-form.group.country form-group-class="col-span-6 el-select-tags-pl-38" />
|
<x-form.group.country form-group-class="col-span-6 el-select-tags-pl-38" not-required />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
<x-form.group.locale />
|
<x-form.group.locale />
|
||||||
|
|
||||||
<x-form.group.country :selected="$user->contact->country" />
|
<x-form.group.country :selected="$user->contact->country" not-required />
|
||||||
|
|
||||||
<x-form.group.text name="city" label="{{ trans_choice('general.cities', 1) }}" value="{{ $user->contact->city }}" not-required />
|
<x-form.group.text name="city" label="{{ trans_choice('general.cities', 1) }}" value="{{ $user->contact->city }}" not-required />
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user