Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
19d1bb3a
Unverified
Commit
19d1bb3a
authored
Jul 22, 2020
by
gloriarodriguez
Committed by
GitHub
Jul 22, 2020
Browse files
solve some console errors in about and user setting section (#1380)
Co-authored-by:
frankiejol
<
frankie@telecos.upc.edu
>
parent
bc87142f
Changes
3
Hide whitespace changes
Inline
Side-by-side
script/rvd_front
View file @
19d1bb3a
...
...
@@ -1367,10 +1367,10 @@ sub user_settings {
}
_translations($c);
my @errors;
if ($c->param('
button_click')
) {
if ($c->param('
password-form')
&&
$c->req->method eq 'POST'
) {
my $auth_ok;
eval { $auth_ok = Ravada::Auth::login($USER->name, $c->param('current_password'))};
if (!$auth_ok || $@) {
if (!$auth_ok || $@
|| ($c->param('current_password') eq "")
) {
push @errors, ("Current password is wrong");
}
else {
...
...
templates/bootstrap/user_settings.html.ep
View file @
19d1bb3a
...
...
@@ -7,16 +7,16 @@
<div
id=
"page-wrapper"
>
<!--BASES AND DOMAINS LIST-->
<div
ng-controller=
"user_settings"
>
<div>
<div
class=
"page-header"
>
<div
class=
"card card-dark"
>
<div
class=
"card-header"
>
<h2
class=
"text-center"
><
%=
l
'
User
Settings
'
%
></h2>
</div>
<div>
<div
class=
"card-body"
>
<div
class=
"card-body"
>
<h3
class=
"mb-3"
><
%=
l
'
Setting
your
default
language
'
%
></h3>
<form>
<form
method=
'post'
enctype=
"multipart/form-data"
>
<
%=
l
'
Language:
'
%
>
<select
onchange=
"this.form.submit();"
id=
"language"
name=
"language"
>
% for my $code (sort { $i18n->localize($lang_name->{$a}) cmp $i18n->localize($lang_name->{$b}) } keys %$lang_name) {
...
...
@@ -26,12 +26,11 @@
</option>
% }
</select>
% if ($changed_lang) {
<font
color=
"green"
>
<
%=
l
'
Your
language
has
been
changed
successfully
'
%
></font>
% }
</form>
</div>
</form>
</div>
% if (!$_user->is_external) {
<div
class=
"card-body"
>
<h3><
%=
l
'
Change
password
'
%
></h3>
...
...
@@ -54,7 +53,8 @@
% }
<div
class=
"form-group row mt-3 ml-2"
>
<button
type=
"reset"
class=
"btn btn-outline-secondary mr-2"
onclick =
"location='/'"
><
%=
l
'
Cancel
'
%
></button>
<input
class=
"btn btn-primary"
type=
'submit'
onclick=
'this.form.submit();'
id=
'button_click'
name=
'button_click'
value=
'<%=l '
Update
password
'
%
>
'>
<input
type=
"hidden"
name=
"password-form"
value=
"1"
>
<input
class=
"btn btn-primary"
type=
'submit'
onclick=
'this.form.submit();'
id=
'button_click'
name=
'button_click'
value=
'<%=l '
Update
password
'
%
>
'>
% if ($changed_pass) {
<font
color=
"green"
>
<
%=
l
'
Your
password
has
been
changed
successfully
'
%
></font>
% }
...
...
templates/main/about.html.ep
View file @
19d1bb3a
...
...
@@ -5,7 +5,7 @@
<div
id=
"wrapper"
>
%= include 'bootstrap/navigation'
<div
id=
"page-wrapper"
>
<div
ng-controller=
"about"
>
<div>
<div
class=
"page-title"
>
<div
class=
"card col-lg-8 offset-md-2 bg-light"
>
<h2
class=
"text-center"
><
%=
l
'
About
'
%
></h2>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment