]> wagnertech.de Git - timetracker.git/commitdiff
More usage of PasswordField element type.
authoranuko <support@anuko.com>
Wed, 1 Mar 2017 21:59:03 +0000 (21:59 +0000)
committeranuko <support@anuko.com>
Wed, 1 Mar 2017 21:59:03 +0000 (21:59 +0000)
15 files changed:
WEB-INF/lib/form/Form.class.php
WEB-INF/lib/form/TextArea.class.php
WEB-INF/lib/form/TextField.class.php
WEB-INF/templates/footer.tpl
admin_options.php
admin_team_add.php
admin_team_edit.php
mobile/login.php
mobile/user_add.php
mobile/user_edit.php
password_change.php
profile_edit.php
register.php
user_add.php
user_edit.php

index 868a3b3c92d4737c204d33b58ae1cc7b6f360884..1beb590c6d10e8fc480459db7761147652acfb48 100644 (file)
@@ -59,7 +59,6 @@ class Form {
         import('form.TextField');
         $el = new TextField($arguments['name']);
         $el->setMaxLength(@$arguments['maxlength']);
-        if (isset($arguments['aspassword'])) $el->setAsPassword($arguments['aspassword']);
         break;
 
       case 'password':
@@ -69,8 +68,7 @@ class Form {
         break;
 
 // TODO: refactoring ongoing down from here.
-// aspassword - change this name to something better? Perhaps.
-// Change $arguments to something better too (maybe). $args or $params?
+// Change $arguments to something better (maybe). $args or $params?
                        case "datefield":
                            import('form.DateField');
                            $el = new DateField($arguments["name"]);
index 728f4629d86da66bdb7f6e6145695f41d7e6d96a..ea1009a85b1153b7615fe50efae84e85c599e421 100644 (file)
@@ -29,7 +29,6 @@
 import('form.FormElement');
        
 class TextArea extends FormElement {
-    var $mPassword     = false;
     var $mColumns      = "";
     var $mRows         = "";
     var $class = 'TextArea';
index b4b1c5d6af1b89e0a1bbef7be52d3aac1d66e861..45455d0d35e4e81f562e79399cc7e94ef7c14c32 100644 (file)
@@ -29,8 +29,6 @@
 import('form.FormElement');
        
 class TextField extends FormElement {
-    var $mPassword     = false;
-    //var $class = 'TextField';
 
        function __construct($name,$value="")
        {
@@ -38,9 +36,6 @@ class TextField extends FormElement {
                $this->name = $name;
                $this->value = $value;
        }
-       
-       function setAsPassword($name)   { $this->mPassword = $name;     }
-       function getAsPassword()        { return $this->mPassword; }
 
        function getHtml() {
                if (!$this->isEnabled()) {
@@ -49,8 +44,7 @@ class TextField extends FormElement {
                        
                    if ($this->id=="") $this->id = $this->name;
                    
-                       $html = "\n\t<input";
-                       $html .= ( $this->mPassword ? " type=\"password\"" : " type=\"text\"");
+                       $html = "\n\t<input type=\"text\"";
                        $html .= " name=\"$this->name\" id=\"$this->id\"";
                        
                        if ($this->size!="")
index 69c06a386558186862a499f89e1c3bfe04e67c5c..13443f6da5dc8413925cb8941854b7fdd410e043 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.10.38.3614 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.10.38.3615 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index 5431b22aa2324fbd995516e3d5a7c74f1011f8a9..ae901d6d3a6439e45957e5e3fb4faea4bddaaa77 100644 (file)
@@ -54,8 +54,8 @@ $form = new Form('optionsForm');
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name));
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'login','value'=>$cl_login));
 if (!$auth->isPasswordExternal()) {
-  $form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'password1','aspassword'=>true,'value'=>$cl_password1));
-  $form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'password2','aspassword'=>true,'value'=>$cl_password2));
+  $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'password1','value'=>$cl_password1));
+  $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'password2','value'=>$cl_password2));
 }
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'email','value'=>$cl_email));
 $form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->getKey('button.submit')));
index d17f864f1e5f255b7a30c4ddb0b5c7d46e6c7b4c..de18950bb37cb1618a38415f140f52607a03e27e 100644 (file)
@@ -52,8 +52,8 @@ $form->addInput(array('type'=>'text','maxlength'=>'200','name'=>'team_name','val
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'manager_name','value'=>$cl_manager_name));
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'manager_login','value'=>$cl_manager_login));
 if (!$auth->isPasswordExternal()) {
-  $form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'password1','aspassword'=>true,'value'=>$cl_password1));
-  $form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'password2','aspassword'=>true,'value'=>$cl_password2));
+  $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'password1','value'=>$cl_password1));
+  $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'password2','value'=>$cl_password2));
 }
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'manager_email','value'=>$cl_manager_email));
 $form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->getKey('button.submit')));
index 09ef866daa060552e2bbc214ea594cc483535c5e..6f44ee9a7d99ae60bcf82089a3da09b1226ad4fb 100644 (file)
@@ -64,8 +64,8 @@ $form->addInput(array('type'=>'text','maxlength'=>'80','name'=>'team_name','valu
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'manager_name','value'=>$cl_manager_name));
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'manager_login','value'=>$cl_manager_login));
 if (!$auth->isPasswordExternal()) {
-  $form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'password1','aspassword'=>true,'value'=>$cl_password1));
-  $form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'password2','aspassword'=>true,'value'=>$cl_password2));
+  $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'password1','value'=>$cl_password1));
+  $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'password2','value'=>$cl_password2));
 }
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'manager_email','value'=>$cl_manager_email));
 $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$team_id));
index a0747deb8a7af758da5302b6f8029d722d19a790..538a0b544894ee1e27448646e3546bc9afc65175 100644 (file)
@@ -40,7 +40,7 @@ $cl_password = $request->getParameter('password');
 
 $form = new Form('loginForm');
 $form->addInput(array('type'=>'text','size'=>'25','maxlength'=>'100','name'=>'login','style'=>'width: 220px;','value'=>$cl_login));
-$form->addInput(array('type'=>'text','size'=>'25','maxlength'=>'50','name'=>'password','style'=>'width: 220px;','aspassword'=>true,'value'=>$cl_password));
+$form->addInput(array('type'=>'password','size'=>'25','maxlength'=>'50','name'=>'password','style'=>'width: 220px;','value'=>$cl_password));
 $form->addInput(array('type'=>'hidden','name'=>'browser_today','value'=>'')); // User current date, which gets filled in on btn_login click.
 $form->addInput(array('type'=>'submit','name'=>'btn_login','onclick'=>'browser_today.value=get_date()','value'=>$i18n->getKey('button.login')));
 
index 681ddd5c7bd14c7346406aa934459b08a833db29..c1f7e291e731eb855ce0253753bec61a7c293a1c 100644 (file)
@@ -77,8 +77,8 @@ $form = new Form('userForm');
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name));
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'login','value'=>$cl_login));
 if (!$auth->isPasswordExternal()) {
-  $form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'pas1','aspassword'=>true,'value'=>$cl_password1));
-  $form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'pas2','aspassword'=>true,'value'=>$cl_password2));
+  $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'pas1','value'=>$cl_password1));
+  $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'pas2','value'=>$cl_password2));
 }
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'email','value'=>$cl_email));
 
index 06cfdf95e57cdbbb03665013a5d5bef8c186ec84..204e7137b5a49b22d05aabfbc49b184a0010c68b 100644 (file)
@@ -107,8 +107,8 @@ $form = new Form('userForm');
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name));
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'login','value'=>$cl_login));
 if (!$auth->isPasswordExternal()) {
-  $form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'pas1','aspassword'=>true,'value'=>$cl_password1));
-  $form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'pas2','aspassword'=>true,'value'=>$cl_password2));
+  $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'pas1','value'=>$cl_password1));
+  $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'pas2','value'=>$cl_password2));
 }
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'email','value'=>$cl_email));
 
index b6fd4dd9a5adfce2b5c0e9ee1db708a2d9b2e457..89e79c7ff3197ea2fd88a216bf71a42ebe9df113 100644 (file)
@@ -59,8 +59,8 @@ $cl_password1 = $request->getParameter('password1');
 $cl_password2 = $request->getParameter('password2');
 
 $form = new Form('newPasswordForm');
-$form->addInput(array('type'=>'text','maxlength'=>'120','name'=>'password1','aspassword'=>true,'value'=>$cl_password1));
-$form->addInput(array('type'=>'text','maxlength'=>'120','name'=>'password2','aspassword'=>true,'value'=>$cl_password2));
+$form->addInput(array('type'=>'password','maxlength'=>'120','name'=>'password1','value'=>$cl_password1));
+$form->addInput(array('type'=>'password','maxlength'=>'120','name'=>'password2','value'=>$cl_password2));
 $form->addInput(array('type'=>'hidden','name'=>'ref','value'=>$cl_ref));
 $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->getKey('button.save')));
 
index 3bf547acba0b292b5b6a58442b7201587cd545a4..3504dcef1454986c006e02199f448c166a12b55c 100644 (file)
@@ -108,8 +108,8 @@ $form = new Form('profileForm');
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$cl_name));
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'login','value'=>$cl_login,'enable'=>$can_change_login));
 if (!$auth->isPasswordExternal()) {
-  $form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'password1','aspassword'=>true,'value'=>$cl_password1));
-  $form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'password2','aspassword'=>true,'value'=>$cl_password2));
+  $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'password1','value'=>$cl_password1));
+  $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'password2','value'=>$cl_password2));
 }
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'email','value'=>$cl_email,'enable'=>$can_change_login));
 if ($user->canManageTeam()) {
index 9984460cc733d5a8d0698dd33873cdecc8d52333..99e9539b75eeb86bb577ee40d1e6b51701b9bd2e 100644 (file)
@@ -56,8 +56,8 @@ $form->addInput(array('type'=>'text','maxlength'=>'200','name'=>'team_name','val
 $form->addInput(array('type'=>'text','maxlength'=>'7','name'=>'currency','value'=>$cl_currency));
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'manager_name','value'=>$cl_manager_name));
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'manager_login','value'=>$cl_manager_login));
-$form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'password1','aspassword'=>true,'value'=>$cl_password1));
-$form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'password2','aspassword'=>true,'value'=>$cl_password2));
+$form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'password1','value'=>$cl_password1));
+$form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'password2','value'=>$cl_password2));
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'manager_email','value'=>$cl_manager_email));
 $form->addInput(array('type'=>'submit','name'=>'btn_submit','value'=>$i18n->getKey('button.submit')));
 
index 82e55cf104c3417f88df7bb1e21f61ac94a94b0a..a38ef4f89f5ad55a8380c8275c8e03e67cfd78df 100644 (file)
@@ -77,8 +77,8 @@ $form = new Form('userForm');
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','style'=>'width: 300px;','value'=>$cl_name));
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'login','style'=>'width: 300px;','value'=>$cl_login));
 if (!$auth->isPasswordExternal()) {
-  $form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'pas1','aspassword'=>true,'value'=>$cl_password1));
-  $form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'pas2','aspassword'=>true,'value'=>$cl_password2));
+  $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'pas1','value'=>$cl_password1));
+  $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'pas2','value'=>$cl_password2));
 }
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'email','value'=>$cl_email));
 
index 5fd3b7ec3868e20ebe2a36a898d60624703f9fe4..406d3135416a4215ba18a658f217c6f43d640a33 100644 (file)
@@ -107,8 +107,8 @@ $form = new Form('userForm');
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','style'=>'width: 300px;','value'=>$cl_name));
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'login','style'=>'width: 300px;','value'=>$cl_login));
 if (!$auth->isPasswordExternal()) {
-  $form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'pas1','aspassword'=>true,'value'=>$cl_password1));
-  $form->addInput(array('type'=>'text','maxlength'=>'30','name'=>'pas2','aspassword'=>true,'value'=>$cl_password2));
+  $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'pas1','value'=>$cl_password1));
+  $form->addInput(array('type'=>'password','maxlength'=>'30','name'=>'pas2','value'=>$cl_password2));
 }
 $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'email','style'=>'width: 300px;','value'=>$cl_email));