]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Add password generator to password fields
authorMarcin Haba <marcin.haba@bacula.pl>
Sun, 14 Nov 2021 01:47:00 +0000 (02:47 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:03:27 +0000 (09:03 +0100)
12 files changed:
gui/baculum/protected/Web/Lang/en/messages.mo
gui/baculum/protected/Web/Lang/en/messages.po
gui/baculum/protected/Web/Lang/ja/messages.mo
gui/baculum/protected/Web/Lang/ja/messages.po
gui/baculum/protected/Web/Lang/pl/messages.mo
gui/baculum/protected/Web/Lang/pl/messages.po
gui/baculum/protected/Web/Lang/pt/messages.mo
gui/baculum/protected/Web/Lang/pt/messages.po
gui/baculum/protected/Web/Lang/ru/messages.mo
gui/baculum/protected/Web/Lang/ru/messages.po
gui/baculum/protected/Web/Pages/Security.page
gui/baculum/protected/Web/Portlets/DirectivePassword.tpl

index 9b60339571dd4c8eb481fca8d4219972a7789b4c..c500516759deebf31e8ecd1032f5a2cbe266fa99 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/en/messages.mo and b/gui/baculum/protected/Web/Lang/en/messages.mo differ
index b0cc4e9ee14b540d4ade1d4e9d9dad1a2a0476c5..241bc69d11b7ad87cd86956c2a94d489e3ecdeb4 100644 (file)
@@ -3931,3 +3931,9 @@ msgstr "Dedicated Bconsole config"
 
 msgid "Get existing basic user name:"
 msgstr "Get existing basic user name:"
+
+msgid "Generate new password"
+msgstr "Generate new password"
+
+msgid "Show/hide password"
+msgstr "Show/hide password"
index 4c62efb98b3b0febe2d7c02c02c77a3e5d201cdd..b8e9fffa978eff4947af12208dc927de44629aed 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/ja/messages.mo and b/gui/baculum/protected/Web/Lang/ja/messages.mo differ
index 4ba08d11557a3bbac1caaebf310a8b500a8d6747..8ab99352258a8708a14a2e23dd81c870daab418e 100644 (file)
@@ -4017,3 +4017,9 @@ msgstr "Dedicated Bconsole config"
 
 msgid "Get existing basic user name:"
 msgstr "Get existing basic user name:"
+
+msgid "Generate new password"
+msgstr "Generate new password"
+
+msgid "Show/hide password"
+msgstr "Show/hide password"
index cc02a0565c153c202503950253a0fbd6bfd43bfc..5e6c702f35eaf878435bbb13386ca7ccb1608f3c 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/pl/messages.mo and b/gui/baculum/protected/Web/Lang/pl/messages.mo differ
index 7c5b24bb54f125fa36bdcccd7f40dffb19d8720b..a08a04228c357a375a4c2feb7c2b0e9ad47c8253 100644 (file)
@@ -3941,3 +3941,9 @@ msgstr "Dedykowana konfiguracja Bconsole"
 
 msgid "Get existing basic user name:"
 msgstr "Pobierz nazwę istniejącego użytkownika:"
+
+msgid "Generate new password"
+msgstr "Generate new password"
+
+msgid "Show/hide password"
+msgstr "Show/hide password"
index 66b4099f92b9dfa37b04e945c63f90be4349740a..273179fc943d368ae2288312fe2e008513c90ac8 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/pt/messages.mo and b/gui/baculum/protected/Web/Lang/pt/messages.mo differ
index e124aafec3ae41d616be32965c0d5398fd6ae312..b28a0aff59243833fc96e0bd4ff82ce746fb56c3 100644 (file)
@@ -3942,3 +3942,9 @@ msgstr "Dedicated Bconsole config"
 
 msgid "Get existing basic user name:"
 msgstr "Get existing basic user name:"
+
+msgid "Generate new password"
+msgstr "Generate new password"
+
+msgid "Show/hide password"
+msgstr "Show/hide password"
index dab717d0124cf3f8889bafe08036631d00e928fe..b369bf183c02fe59447d324f623424cc2301b08c 100644 (file)
Binary files a/gui/baculum/protected/Web/Lang/ru/messages.mo and b/gui/baculum/protected/Web/Lang/ru/messages.mo differ
index ba7c9e9858ca839134e4e0a49156a3828acf5798..5f778f79645846ec11c6f0fd39e6fc86004aa522 100644 (file)
@@ -3942,3 +3942,9 @@ msgstr "Dedicated Bconsole config"
 
 msgid "Get existing basic user name:"
 msgstr "Get existing basic user name:"
+
+msgid "Generate new password"
+msgstr "Generate new password"
+
+msgid "Show/hide password"
+msgstr "Show/hide password"
index 3860d21efdbcdab687a2e490d68f714c4a57537a..68c1ba7f575ed8575c6211321603775b939cd7c3 100644 (file)
@@ -1373,6 +1373,8 @@ $(function() {
                                                                CssClass="w3-input w3-border"
                                                        />
                                                </div>
+                                               <a href="javascript:void(0)" onclick="var el = document.getElementById('<%=$this->UserPassword->ClientID%>'); el.type = el.type == 'text' ? 'password' : 'text'" title="<%[ Show/hide password ]%>"><i class="fa fa-eye"></i></a>
+                                               &nbsp;<a href="javascript:void(0)" onclick="document.getElementById('<%=$this->UserPassword->ClientID%>').value = document.getElementById('<%=$this->RetypeAPIBasicUserPassword->ClientID%>').value = get_random_string('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_~!@#$%^&*()_+}{|?[]\\/.,', 10); return false;" title="<%[ Generate new password ]%>"><i class="fas fa-random"></i></a>
                                        </div>
                                        <div class="w3-row directive_field">
                                                <div class="w3-col w3-third"><com:TLabel ForControl="UserRoles" Text="<%[ Roles: ]%>"/></div>
@@ -2497,8 +2499,8 @@ $(function() {
                                                        Display="Dynamic"
                                                />
                                        </div> &nbsp;<i id="api_basic_user_password_req" class="fa fa-asterisk w3-text-red opt_req"></i>
-                                       &nbsp;<a href="javascript:void(0)" onclick="var el = document.getElementById('<%=$this->APIBasicUserPassword->ClientID%>'); el.type = el.type == 'text' ? 'password' : 'text'"><i class="fa fa-eye"></i></a>
-                                       &nbsp;<a href="javascript:void(0)" onclick="document.getElementById('<%=$this->APIBasicUserPassword->ClientID%>').value = document.getElementById('<%=$this->RetypeAPIBasicUserPassword->ClientID%>').value = get_random_string('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_~!@#$%^&*()_+}{|?[]\\/.,', 40); return false;" class="w3-text-black"><%[ generate ]%></a>
+                                       &nbsp;<a href="javascript:void(0)" onclick="var el = document.getElementById('<%=$this->APIBasicUserPassword->ClientID%>'); el.type = el.type == 'text' ? 'password' : 'text'" title="<%[ Show/hide password ]%>"><i class="fa fa-eye"></i></a>
+                                       &nbsp;<a href="javascript:void(0)" onclick="document.getElementById('<%=$this->APIBasicUserPassword->ClientID%>').value = document.getElementById('<%=$this->RetypeAPIBasicUserPassword->ClientID%>').value = get_random_string('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_~!@#$%^&*()_+}{|?[]\\/.,', 40); return false;" title="<%[ Generate new password ]%>"><i class="fas fa-random"></i></a>
                                </div>
                                <div class="w3-row directive_field">
                                        <div class="w3-col w3-third"><com:TLabel ForControl="RetypeAPIBasicUserPassword" Text="<%[ Retype password: ]%>" /></div>
@@ -2538,7 +2540,7 @@ $(function() {
                                                        Text="<%[ Passwords must be the same. ]%>"
                                                />
                                        </div> &nbsp;<i id="api_basic_user_retype_password_req" class="fa fa-asterisk w3-text-red opt_req"></i>
-                                       &nbsp;<a href="javascript:void(0)" onclick="var el = document.getElementById('<%=$this->RetypeAPIBasicUserPassword->ClientID%>'); el.type = el.type == 'text' ? 'password' : 'text'"><i class="fa fa-eye"></i></a>
+                                       &nbsp;<a href="javascript:void(0)" onclick="var el = document.getElementById('<%=$this->RetypeAPIBasicUserPassword->ClientID%>'); el.type = el.type == 'text' ? 'password' : 'text'" title="<%[ Show/hide password ]%>"><i class="fa fa-eye"></i></a>
 
                                </div>
                                <div class="w3-row directive_field" id="api_basic_user_bconsole_create">
index a70533f6be4522551f7cd98399e48da470ba31c7..a8ef03aa4b37a34ac547d0391e6245b7c1007f8e 100644 (file)
@@ -11,7 +11,8 @@
                        AutoTrim="true"
                /> &nbsp;<i class="fa fa-asterisk w3-text-red directive_required" style="visibility: <%=$this->getRequired() ? 'visible' : 'hidden'%>;"></i>
                <i class="fas fa-info-circle help_icon w3-text-green" style="display: <%=($this->doc ? 'inline-block': 'none')%>;" onclick="var h = $(this).nextAll('div.directive_help'); var disp = h.get(0).style.display; $('div.directive_help').slideUp('fast'); if (disp == 'none') { h.slideDown('fast'); }"></i>
-               <a href="javascript:void(0)" onclick="var el = document.getElementById('<%=$this->Directive->ClientID%>'); el.type = el.type == 'text' ? 'password' : 'text'"><i class="fa fa-eye"></i></a>
+               <a href="javascript:void(0)" onclick="var el = document.getElementById('<%=$this->Directive->ClientID%>'); el.type = el.type == 'text' ? 'password' : 'text'" title="<%[ Show/hide password ]%>"><i class="fa fa-eye"></i></a>
+               <a href="javascript:void(0)" onclick="document.getElementById('<%=$this->Directive->ClientID%>').value = get_random_string('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-\/_', 40); return false;" title="<%[ Generate new password ]%>"><i class="fas fa-random"></i></a>
                <i class="fa fa-undo reset_btn<%=!$this->ShowResetButton ? ' hide' : ''%>" onclick="document.getElementById('<%=$this->Directive->ClientID%>').value = '<%=$this->getDefaultValue() === 0 ? '' : $this->getDefaultValue()%>';" alt="<%[ Reset to default value ]%>" title="<%[ Reset to default value ]%>"></i>
                <i class="fa fa-trash-alt remove_btn<%=!$this->ShowRemoveButton ? ' hide' : ''%>" onclick="document.getElementById('<%=$this->Directive->ClientID%>').value = '';" alt="<%[ Remove directive ]%>" title="<%[ Remove directive ]%>"></i>
                <com:TRequiredFieldValidator