Welcome Guest, Not a member yet? Register   Sign In
authorization form template for module ion_auth
#1

[eluser]seobot[/eluser]
Show you how to do it right. There is a form of authorization
Code:
<?php if(!$this->ion_auth->logged_in()): ?>

    <ul class="nav pull-right">
        <li><a href="/registration/">Registration</a></li>
        <li class="divider-vertical"></li>
        <li class="dropdown">
            <a class="dropdown-toggle" href="#" data-toggle="dropdown">Sign In<strong class="caret"></strong></a>
            <div class="dropdown-menu"  15px; padding-bottom: 0px;">
                &lt;?php
                    echo form_open("auth/login",array('class'=>'form-signin'));

                    echo form_input($login_auth);
                   // echo '&lt;input type="text" class="input-block-level" placeholder="Email address"&gt;';
                    echo form_input($pass_auth);

                    echo form_submit($submit_auth);
                ?&gt;
                <label class="checkbox">&lt;input type="checkbox" name="remember" id="remember"&gt; Remember Me</label>
                <div class="formLine"  center;"><a  #bbb;" href="/lostpassword">Я забыл пароль...</a>
                </div>
                &lt;?php echo form_close();?&gt;
            </div>
        </li>
    </ul>

&lt;?php else: ?&gt;

    <ul class="nav pull-right">
        <li><a href="&lt;?php echo base_url('category/logout');?&gt;">Hello mr.White!</a></li>
        <li class="divider-vertical"></li>
        <li class="dropdown">
            <div class="dropdown-menu"  15px; padding-bottom: 0px;">

            </div>
        </li>
    </ul>

&lt;?php endif; ?&gt;

All controllers for the correct load CSS prescribe the following:

Code:
if (!$this->ion_auth->logged_in())
        {

            $this->data['login_auth'] = array('name' => 'login_auth',
                'id' => 'login_auth',
                'type' => 'text',
                'class' => 'input-block-level',
                'paceholder' => 'Login'
            );
            $this->data['pass_auth'] = array('name' => 'pass_auth',
                'id' => 'pass_auth',
                'type' => 'password',
                'class' => 'input-block-level',
                'paceholder' => 'Password'
            );

            $this->data['submit_auth'] = array('name' => 'submit_auth',
                'id' => 'submit_auth',
                'type' => 'submit',
                'class' => 'btn pull-right',
                'value' => 'Enter',
                'style' => 'float: right;'
            );

            $this->load->view('v_category', $this->data);
        }

But I think that this is not correct, produce much the same when each controller. On this question - how do I correct?




Theme © iAndrew 2016 - Forum software by © MyBB