diff --git a/app/views/console/account/index.phtml b/app/views/console/account/index.phtml
index 6ec70fe6e8..ce0186321b 100644
--- a/app/views/console/account/index.phtml
+++ b/app/views/console/account/index.phtml
@@ -32,7 +32,8 @@ use Utopia\Locale\Locale;
data-success-param-alert-text="Your name was updated successfully"
data-success-param-trigger-events="account.update,modal-close"
data-failure="alert"
- data-failure-param-alert-text="Failed to update your name">
+ data-failure-param-alert-text="Failed to update your name"
+ data-failure-param-alert-classname="error">
@@ -60,7 +61,8 @@ use Utopia\Locale\Locale;
data-success-param-alert-text="Email address updated successfully"
data-success-param-trigger-events="account-update,modal-close"
data-failure="alert"
- data-failure-param-alert-text="Failed updating email address">
+ data-failure-param-alert-text="Failed updating email address"
+ data-failure-param-alert-classname="error">
@@ -93,7 +95,8 @@ use Utopia\Locale\Locale;
data-success-param-trigger-events="account-update,modal-close"
data-success-param-alert-text="Password updated successfully"
data-failure="alert"
- data-failure-param-alert-text="Failed updating password">
+ data-failure-param-alert-text="Failed updating password"
+ data-failure-param-alert-classname="error">
@@ -116,7 +119,9 @@ use Utopia\Locale\Locale;
data-success="trigger"
data-success-param-trigger-events="logout"
data-failure="alert"
- data-failure-param-alert-text="Logout failed">
+ data-failure-param-alert-text="Logout failed"
+ data-failure-param-alert-classname="error">
+
@@ -156,7 +161,8 @@ use Utopia\Locale\Locale;
data-success="trigger"
data-success-param-trigger-events="deactivated"
data-failure="alert"
- data-failure-param-alert-text="Account deactivation failed">
+ data-failure-param-alert-text="Account deactivation failed"
+ data-failure-param-alert-classname="error">
@@ -171,7 +174,8 @@ use Utopia\Locale\Locale;
data-success-param-alert-text=""
data-success-param-trigger-events="membership-delete"
data-failure="alert"
- data-failure-param-alert-text="">
+ data-failure-param-alert-text=""
+ data-failure-param-alert-classname="error">
@@ -188,7 +192,8 @@ use Utopia\Locale\Locale;
data-success-param-alert-text=""
data-success-param-trigger-events="membership-resend"
data-failure="alert"
- data-failure-param-alert-text="">
+ data-failure-param-alert-text=""
+ data-failure-param-alert-classname="error">
@@ -220,7 +225,8 @@ use Utopia\Locale\Locale;
data-success-param-alert-text=""
data-success-param-trigger-events="membership-create,modal-close"
data-failure="alert"
- data-failure-param-alert-text="">
+ data-failure-param-alert-text=""
+ data-failure-param-alert-classname="error">
diff --git a/app/views/console/tasks/index.phtml b/app/views/console/tasks/index.phtml
index cc893dae0f..4e609cb240 100644
--- a/app/views/console/tasks/index.phtml
+++ b/app/views/console/tasks/index.phtml
@@ -87,7 +87,8 @@ use Utopia\Locale\Locale;
data-success-param-alert-text="Updated task successfully"
data-success-param-trigger-events="task-update,modal-close"
data-failure="alert"
- data-failure-param-alert-text="Failed to update task">
+ data-failure-param-alert-text="Failed to update task"
+ data-failure-param-alert-classname="error">
@@ -192,7 +193,8 @@ use Utopia\Locale\Locale;
data-success-param-alert-text="Deleted task successfully"
data-success-param-trigger-events="task-delete,modal-close"
data-failure="alert"
- data-failure-param-alert-text="Failed to delete task">
+ data-failure-param-alert-text="Failed to delete task"
+ data-failure-param-alert-classname="error">
@@ -220,7 +222,8 @@ use Utopia\Locale\Locale;
data-success-param-alert-text="Created task successfully"
data-success-param-trigger-events="task-create,modal-close"
data-failure="alert"
- data-failure-param-alert-text="Failed to create task">
+ data-failure-param-alert-text="Failed to create task"
+ data-failure-param-alert-classname="error">
diff --git a/app/views/console/users/index.phtml b/app/views/console/users/index.phtml
index 5fabf9fbc7..40388ec20a 100644
--- a/app/views/console/users/index.phtml
+++ b/app/views/console/users/index.phtml
@@ -30,7 +30,8 @@ $providers = $this->getParam('providers', []);
data-success-param-alert-text="Created user successfully"
data-success-param-trigger-events="user-create,modal-close"
data-failure="alert"
- data-failure-param-alert-text="Failed to create user">
+ data-failure-param-alert-text="Failed to create user"
+ data-failure-param-alert-classname="error">
@@ -157,7 +158,8 @@ $providers = $this->getParam('providers', []);
data-success-param-alert-text="Created team successfully"
data-success-param-trigger-events="filter-teams-changed,team-create,modal-close"
data-failure="alert"
- data-failure-param-alert-text="Failed to create team">
+ data-failure-param-alert-text="Failed to create team"
+ data-failure-param-alert-classname="error">
@@ -220,7 +222,8 @@ $providers = $this->getParam('providers', []);
data-success-param-alert-text="Updated team successfully"
data-success-param-trigger-events="team-update,modal-close"
data-failure="alert"
- data-failure-param-alert-text="Failed to update team">
+ data-failure-param-alert-text="Failed to update team"
+ data-failure-param-alert-classname="error">
@@ -283,7 +286,8 @@ $providers = $this->getParam('providers', []);
data-success-param-alert-text="Updated project OAuth settings successfully"
data-success-param-trigger-events="project-update,modal-close"
data-failure="alert"
- data-failure-param-alert-text="Failed to update project OAuth settings">
+ data-failure-param-alert-text="Failed to update project OAuth settings"
+ data-failure-param-alert-classname="error">
diff --git a/app/views/console/users/view.phtml b/app/views/console/users/view.phtml
index fbb504da2b..7881bd3ecc 100644
--- a/app/views/console/users/view.phtml
+++ b/app/views/console/users/view.phtml
@@ -99,7 +99,8 @@ use Utopia\Locale\Locale;
data-success-param-alert-text="Blocked User Successfully"
data-success-param-trigger-events="user-update"
data-failure="alert"
- data-failure-param-alert-text="Failed to Block User">
+ data-failure-param-alert-text="Failed to Block User"
+ data-failure-param-alert-classname="error">
@@ -114,7 +115,8 @@ use Utopia\Locale\Locale;
data-success-param-alert-text="Blocked Activated Successfully"
data-success-param-trigger-events="user-update"
data-failure="alert"
- data-failure-param-alert-text="Failed to Activate User">
+ data-failure-param-alert-text="Failed to Activate User"
+ data-failure-param-alert-classname="error">
@@ -146,7 +148,9 @@ use Utopia\Locale\Locale;
data-success="trigger"
data-success-param-trigger-events="user-update"
data-failure="alert"
- data-failure-param-alert-text="Failed to logout session">
+ data-failure-param-alert-text="Failed to logout session"
+ data-failure-param-alert-classname="error">
+
@@ -171,7 +175,9 @@ use Utopia\Locale\Locale;
data-success="trigger"
data-success-param-trigger-events="user-update"
data-failure="alert"
- data-failure-param-alert-text="Failed to logout all sessions">
+ data-failure-param-alert-text="Failed to logout all sessions"
+ data-failure-param-alert-classname="error">
+
diff --git a/app/views/console/webhooks/index.phtml b/app/views/console/webhooks/index.phtml
index ac5363ba06..fff3f4a672 100644
--- a/app/views/console/webhooks/index.phtml
+++ b/app/views/console/webhooks/index.phtml
@@ -54,7 +54,8 @@ $events = [
data-success-param-alert-text="Updated webhook successfully"
data-success-param-trigger-events="webhook-update,modal-close"
data-failure="alert"
- data-failure-param-alert-text="Failed to update webhook">
+ data-failure-param-alert-text="Failed to update webhook"
+ data-failure-param-alert-classname="error">
@@ -121,7 +122,8 @@ $events = [
data-success-param-alert-text="Deleted webhook successfully"
data-success-param-trigger-events="webhook-delete"
data-failure="alert"
- data-failure-param-alert-text="Failed to delete webhook">
+ data-failure-param-alert-text="Failed to delete webhook"
+ data-failure-param-alert-classname="error">
@@ -152,7 +154,8 @@ $events = [
data-success-param-alert-text="Created webhook successfully"
data-success-param-trigger-events="webhook-create,modal-close"
data-failure="alert"
- data-failure-param-alert-text="Failed to create webhook">
+ data-failure-param-alert-text="Failed to create webhook"
+ data-failure-param-alert-classname="error">
diff --git a/app/views/home/auth/confirm.phtml b/app/views/home/auth/confirm.phtml
index dccdee9031..95de81a3fe 100644
--- a/app/views/home/auth/confirm.phtml
+++ b/app/views/home/auth/confirm.phtml
@@ -13,7 +13,8 @@ use Utopia\Locale\Locale;
data-success-alert="escape(Locale::getText('home.auth.confirm.success')); ?>"
data-success-triggers="account.update"
data-failure="alert"
- data-failure-alert="escape(Locale::getText('home.auth.confirm.failure')); ?>">
+ data-failure-param-alert-text="escape(Locale::getText('home.auth.confirm.failure')); ?>"
+ data-failure-param-alert-classname="error">
escape(Locale::getText('home.auth.confirm.title')); ?>
escape(Locale::getText('home.auth.confirm.subtitle')); ?>
diff --git a/app/views/home/auth/join.phtml b/app/views/home/auth/join.phtml
index 2d63e562d0..6a8eb4c08b 100644
--- a/app/views/home/auth/join.phtml
+++ b/app/views/home/auth/join.phtml
@@ -14,7 +14,8 @@ use Utopia\Locale\Locale;
data-success-alert="escape(Locale::getText('home.auth.join.success')); ?>"
data-success-triggers="account.update"
data-failure="alert"
- data-failure-alert="escape(Locale::getText('home.auth.join.failure')); ?>">
+ data-failure-param-alert-text="escape(Locale::getText('home.auth.join.failure')); ?>"
+ data-failure-param-alert-classname="error">
escape(Locale::getText('home.auth.join.failure')); ?>
diff --git a/app/views/home/auth/recovery.phtml b/app/views/home/auth/recovery.phtml
index a32565ea17..6025b6820b 100644
--- a/app/views/home/auth/recovery.phtml
+++ b/app/views/home/auth/recovery.phtml
@@ -15,7 +15,8 @@ use Utopia\Locale\Locale;
data-success="alert"
data-success-alert="escape(Locale::getText('home.auth.recovery.success')); ?>"
data-failure="alert"
- data-failure-alert="escape(Locale::getText('home.auth.recovery.failure')); ?>">
+ data-failure-param-alert-text="escape(Locale::getText('home.auth.recovery.failure')); ?>"
+ data-failure-param-alert-classname="error">
diff --git a/app/views/home/auth/recovery/reset.phtml b/app/views/home/auth/recovery/reset.phtml
index ea96568fdb..14d42e0e2b 100644
--- a/app/views/home/auth/recovery/reset.phtml
+++ b/app/views/home/auth/recovery/reset.phtml
@@ -19,7 +19,8 @@ use Utopia\Locale\Locale;
data-success-alert="escape(Locale::getText('home.auth.reset.success')); ?>"
data-success-redirect-url="/auth/signin"
data-failure="alert"
- data-failure-alert="escape(Locale::getText('home.auth.reset.failure')); ?>">
+ data-failure-param-alert-text="escape(Locale::getText('home.auth.reset.failure')); ?>"
+ data-failure-param-alert-classname="error">
diff --git a/app/views/home/auth/signin.phtml b/app/views/home/auth/signin.phtml
index 2c0974acc6..6241869f24 100644
--- a/app/views/home/auth/signin.phtml
+++ b/app/views/home/auth/signin.phtml
@@ -31,7 +31,8 @@ use Utopia\Locale\Locale;
data-success-param-trigger-events="login"
data-success-param-redirect-url="/console"
data-failure="alert"
- data-failure-param-alert-text="escape(Locale::getText('home.auth.signin.failure')); ?>">
+ data-failure-param-alert-text="escape(Locale::getText('home.auth.signin.failure')); ?>"
+ data-failure-param-alert-classname="error">
diff --git a/app/views/home/auth/signup.phtml b/app/views/home/auth/signup.phtml
index b2045be159..85d69915c1 100644
--- a/app/views/home/auth/signup.phtml
+++ b/app/views/home/auth/signup.phtml
@@ -21,7 +21,8 @@ use Utopia\Locale\Locale;
data-success-param-trigger-events="auth-register"
data-success-redirect-url="/console/setup"
data-failure="alert"
- data-failure-param-alert-text="escape(Locale::getText('home.auth.signup.failure')); ?>">
+ data-failure-param-alert-text="escape(Locale::getText('home.auth.signup.failure')); ?>"
+ data-failure-param-alert-classname="error">
diff --git a/public/dist/scripts/app-all.js b/public/dist/scripts/app-all.js
index ecef502d24..f319eccb78 100644
--- a/public/dist/scripts/app-all.js
+++ b/public/dist/scripts/app-all.js
@@ -2370,7 +2370,7 @@ document.body.classList.add(prefix+'-'+value);cookie.set('language-'+prefix,valu
let config={type:'line',data:{labels:[],datasets:[{label:'Requests',backgroundColor:'rgba(230, 248, 253, 0.3)',borderColor:'#29b5d9',borderWidth:2,data:[0,0,0,0,0,0,0],fill:true}]},options:{responsive:true,title:{display:false,text:'Stats'},legend:{display:false},tooltips:{mode:'index',intersect:false,caretPadding:0},hover:{mode:'nearest',intersect:true},scales:{xAxes:[{display:false}],yAxes:[{display:false,}]}}};for(let i=0;i
)|{)/m;const REGEX_PARAMETERS_VALUES=/\s*([\w\\$]+)\s*(?:=\s*((?:(?:(['"])(?:\3|(?:.*?[^\\]\3)))((\s*\+\s*)(?:(?:(['"])(?:\6|(?:.*?[^\\]\6)))|(?:[\w$]*)))*)|.*?))?\s*(?:,|$)/gm;let functionAsString=func.toString();let params=[];let match;functionAsString=functionAsString.replace(REGEX_COMMENTS,'');functionAsString=functionAsString.match(REGEX_FUNCTION_PARAMS)[1];if(functionAsString.charAt(0)==='('){functionAsString=functionAsString.slice(1,-1);}
while(match=REGEX_PARAMETERS_VALUES.exec(functionAsString)){params.push(match[1]);}
return params;}
diff --git a/public/dist/scripts/app.js b/public/dist/scripts/app.js
index 752cc5c229..724fd2ae5f 100644
--- a/public/dist/scripts/app.js
+++ b/public/dist/scripts/app.js
@@ -277,7 +277,7 @@ document.body.classList.add(prefix+'-'+value);cookie.set('language-'+prefix,valu
let config={type:'line',data:{labels:[],datasets:[{label:'Requests',backgroundColor:'rgba(230, 248, 253, 0.3)',borderColor:'#29b5d9',borderWidth:2,data:[0,0,0,0,0,0,0],fill:true}]},options:{responsive:true,title:{display:false,text:'Stats'},legend:{display:false},tooltips:{mode:'index',intersect:false,caretPadding:0},hover:{mode:'nearest',intersect:true},scales:{xAxes:[{display:false}],yAxes:[{display:false,}]}}};for(let i=0;i)|{)/m;const REGEX_PARAMETERS_VALUES=/\s*([\w\\$]+)\s*(?:=\s*((?:(?:(['"])(?:\3|(?:.*?[^\\]\3)))((\s*\+\s*)(?:(?:(['"])(?:\6|(?:.*?[^\\]\6)))|(?:[\w$]*)))*)|.*?))?\s*(?:,|$)/gm;let functionAsString=func.toString();let params=[];let match;functionAsString=functionAsString.replace(REGEX_COMMENTS,'');functionAsString=functionAsString.match(REGEX_FUNCTION_PARAMS)[1];if(functionAsString.charAt(0)==='('){functionAsString=functionAsString.slice(1,-1);}
while(match=REGEX_PARAMETERS_VALUES.exec(functionAsString)){params.push(match[1]);}
return params;}
diff --git a/public/scripts/views/service.js b/public/scripts/views/service.js
index 94bbdbdbf9..6c679c1307 100644
--- a/public/scripts/views/service.js
+++ b/public/scripts/views/service.js
@@ -33,9 +33,9 @@
}
},
- 'alert': function (text) {
+ 'alert': function (text, classname) {
return function (alerts) {
- alerts.add({ text: text, class: 'success' }, 3000);
+ alerts.add({ text: text, class: (classname || 'success') }, 3000);
}
},