File indexing completed on 2024-12-29 05:24:37

0001 <?php
0002 /**
0003  *  ocs-webserver
0004  *
0005  *  Copyright 2016 by pling GmbH.
0006  *
0007  *    This file is part of ocs-webserver.
0008  *
0009  *    This program is free software: you can redistribute it and/or modify
0010  *    it under the terms of the GNU Affero General Public License as
0011  *    published by the Free Software Foundation, either version 3 of the
0012  *    License, or (at your option) any later version.
0013  *
0014  *    This program is distributed in the hope that it will be useful,
0015  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
0016  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0017  *    GNU Affero General Public License for more details.
0018  *
0019  *    You should have received a copy of the GNU Affero General Public License
0020  *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
0021  **/
0022 ?>
0023 
0024 <style>
0025 
0026   main#reg-page section#register-wrap {
0027     z-index: 1000;
0028   }
0029 
0030   @media (max-width:767px) {
0031     main#reg-page section#register-wrap {
0032       position: absolute;
0033       top: 150px;
0034       margin: 0;
0035       width: 90%;
0036       left: 5%;
0037     }
0038     main#reg-page section#register-wrap button#login {
0039       margin-top: 8px;
0040       width: 100%;
0041     }
0042 
0043     main#reg-page section#register-wrap #register #register-box {
0044       width: 100%;
0045     }
0046 
0047     main#reg-page section#register-wrap #register #social-register {
0048       float: right;
0049       width: 100%;
0050       padding: 0;
0051     }
0052     main#reg-page section#register-wrap #register #social-register #social-login-elements {
0053       margin: 0;
0054     }
0055   }
0056 
0057   .container-checkbox-remember-me input[type="checkbox"] {
0058       opacity: 0;
0059       position: absolute;
0060   }
0061 
0062   .container-checkbox-remember-me label {
0063       position: relative;
0064       display: inline-block;
0065       /*16px width of fake checkbox + 6px distance between fake checkbox and text*/
0066       padding-left: 22px;
0067       height: 22px;
0068       line-height: 22px;
0069   }
0070 
0071   .container-checkbox-remember-me label::before,
0072   .container-checkbox-remember-me label::after {
0073       position: absolute;
0074       content: "";
0075 
0076       /*Needed for the line-height to take effect*/
0077       display: inline-block;
0078   }
0079 
0080   /*Outer box of the fake checkbox*/
0081   .container-checkbox-remember-me label::before{
0082       height: 16px;
0083       width: 16px;
0084       border: 1px solid;
0085       left: 0px;
0086       /*(24px line-height - 16px height of fake checkbox) / 2 - 1px for the border
0087        *to vertically center it.
0088        */
0089       top: 3px;
0090       border-radius: 4px;
0091       border-color: #c2c2c2;
0092   }
0093 
0094   /*Checkmark of the fake checkbox*/
0095   .container-checkbox-remember-me label::after {
0096       height: 5px;
0097       width: 9px;
0098       border-left: 2px solid;
0099       border-bottom: 2px solid;
0100       transform: rotate(-45deg);
0101       left: 4px;
0102       top: 7px;
0103   }
0104 
0105   /*Hide the checkmark by default*/
0106   .container-checkbox-remember-me input[type="checkbox"] + label::after {
0107       content: none;
0108   }
0109 
0110   /*Unhide on the checked state*/
0111   .container-checkbox-remember-me input[type="checkbox"]:checked + label::after {
0112       content: "";
0113   }
0114 
0115 </style>
0116 
0117 <div id="login-form-box" class="well">
0118     <h3><?= $this->translate('Log into your account') ?></h3>
0119 
0120     <div id="error" class="center text-error help-block">
0121         <?php if ($this->error && isset($this->errorText)): ?>
0122             <p class="errors">
0123                 <?= $this->translate($this->errorText) ?>
0124             </p>
0125         <?php endif; ?>
0126     </div>
0127     <form class="standard-form row-fluid center partialjson"
0128           action="<?= $this->formLogin->getAction(); ?>"
0129           method="<?= $this->formLogin->getMethod(); ?>"
0130           data-target="#register-box"
0131           data-load-state="#login"
0132     >
0133         
0134         <input type="hidden" name="ipv4" id="ipv4" value="">
0135         <input type="hidden" name="ipv6" id="ipv6" value="">
0136         
0137         <?=Default_Model_CsrfProtection::getFormCsrf('login_csrf'); ?>
0138         <?= $this->formLogin->redirect ?>
0139         <?= $this->formLogin->dologin ?>
0140         <?php
0141         if ($this->error) {
0142             $this->formLogin->mail->class = $this->formLogin->mail->class . ' has-error';
0143         }
0144         ?>
0145         <?= $this->formLogin->mail->setAttrib('placeholder', 'Email or Username')->setAttrib('class', 'inputbox email')->setAttrib('required','required') ?>
0146         <?= $this->formLogin->password->setAttrib('placeholder', 'Password')->setAttrib('class', 'inputbox password')->setAttrib('required', 'required') ?>
0147         <?= $this->formLogin->remember_me->setAttrib('class', 'btn btn-min-width btn-native')->setAttrib('type', 'submit'); ?>
0148         <?php /*$this->formLogin->login */ ?>
0149         <button name="<?= $this->formLogin->login->getName() ?>" id="<?= $this->formLogin->login->getId() ?>" type="submit" class="btn btn-min-width btn-native"><?= $this->formLogin->login->getLabel() ?> <i id="load-state" class="fa fa-spinner fa-pulse hidden" aria-hidden="true"></i></button>
0150     </form>
0151 
0152     <div class="small light lightgrey center margin-top-15">
0153         <a href="/password/request" class="lightblue" rel="nofollow"><?= $this->translate('Forgot your password?') ?></a>
0154     </div>
0155 
0156     <div class="small light lightgrey margin-top-15">
0157         * for github login, please use "<a href="/password/request" class="lightblue" rel="nofollow"><?= $this->translate('reset password') ?></a>" and then login with your username and new password
0158 
0159     </div>
0160 
0161 </div>