button disabled when submit for Wizard
This commit is contained in:
parent
209551bb7a
commit
cf9c335912
@ -105,12 +105,12 @@
|
||||
<button
|
||||
type="submit"
|
||||
id="button"
|
||||
:disabled="button_loading"
|
||||
:disabled="button_loading_company"
|
||||
class="w-1/2 relative flex items-center justify-center bg-green hover:bg-green-700 text-white px-6 py-1.5 text-base rounded-lg disabled:bg-green-100"
|
||||
@click="onEditSave($event)"
|
||||
>
|
||||
<i v-if="button_loading" class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"></i>
|
||||
<span :class="[{'opacity-0': button_loading}]">
|
||||
<i v-if="button_loading_company" class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"></i>
|
||||
<span :class="[{'opacity-0': button_loading_company}]">
|
||||
{{ translations.company.save }}
|
||||
</span>
|
||||
</button>
|
||||
@ -186,6 +186,7 @@ export default {
|
||||
real_date: "",
|
||||
lang_data: '',
|
||||
sorted_countries: [],
|
||||
button_loading_company: false
|
||||
};
|
||||
},
|
||||
|
||||
@ -288,6 +289,8 @@ export default {
|
||||
|
||||
onEditSave(event) {
|
||||
event.preventDefault();
|
||||
|
||||
this.button_loading_company = true;
|
||||
|
||||
FormData.prototype.appendRecursive = function (data, wrapper = null) {
|
||||
for (var name in data) {
|
||||
@ -362,9 +365,11 @@ export default {
|
||||
this.onSuccessMessage(response);
|
||||
|
||||
this.$router.push("/wizard/currencies");
|
||||
this.button_loading_company = false;
|
||||
}, this)
|
||||
.catch((error) => {
|
||||
this.onFailError(error);
|
||||
this.button_loading_company = false;
|
||||
}, this);
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user