Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues/new 1529 #1537

Merged
merged 3 commits into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/mixins/fieldValidationMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ export function isValidText(str) {
return false;
}
}
export function isOnlyAlphaNumeric(str){
if(str.match(/^[a-zA-Z0-9]*$/)){
return true;
}else{
return false
}
}
export function isValidSlug(str){
if(str.match(/^([a-z0-9])*(-([a-z0-9])*)*$/)){
return true
Expand Down
29 changes: 29 additions & 0 deletions src/mixins/masterKeyPopupMixin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
export default{
methods:{
async masterPop(){
let masterKey;
await this.$swal
.fire({
html: `
<div><b style="color:red">Enter Master Key To Execute</div>
<input type="password" id="name" class="swal2-input" placeholder="***************">`,
confirmButtonText: '<span style="color:white">Confirm</span>',
confirmButtonColor: "red",
icon: "warning",
focusConfirm: false,
showCloseButton: true,
allowOutsideClick: false,
preConfirm: () => {
masterKey = this.$swal.getPopup().querySelector("#name").value;
if (masterKey === "") {
this.$swal.showValidationMessage(`Please enter the master key to proceed`);
}
return { masterKey };
},

})
console.log(masterKey);
return masterKey;
}
}
}
Loading