print_form_container_close(); echo form_close(); echo "</div></div>"; echo '<p style="color: red">Note: your login will only work for one session. Enter your email address in the form above to re-apply for access if your session has expired.</p>'; } else { echo form_open(base_url().'login', array('id' => 'login_form', 'class' => 'form-horizontal')); print_form_container_open(); print_input_element(array( 'label' => 'Username', 'name' => 'username', 'size' => 25, 'required' => true )); print_password_element(array( 'label' => 'Password', 'name' => 'password', 'size' => 25, 'required' => true )); print_static_form_element('', '<a href="login/reset_password">Forgot your username or password?</a>'); print_submit_container_open(); echo form_submit('button', 'Login', 'id="submit_button" class="btn btn-primary"'); print_submit_container_close(); print_form_container_close(); echo form_close(); } ?>
<?php print_hidden_element(array('name' => 'action'))?> <div class="panel-heading"><?=get_title($details_title_options)?></div> <div id="details" class="panel-body"> <div id="detailsmessage"></div> <?php if (!empty($user_id)) print_static_form_element('ID', $user_id); print_input_element(array('name' => 'first_name', 'label' => 'First Name', 'required' => true)); print_input_element(array('name' => 'last_name', 'label' => 'Last Name', 'required' => true)); $back_link = base_url()."users/user"; if ($type == 'staff') { print_input_element(array('name' => 'username', 'label' =>'Username')); // Only show password if admin has donanything for users if (empty($user_id) || (has_capability('site:doanything') || ($this->session->userdata('user_id') == $user_id && has_capability('users:editownaccount')))) { print_password_element(array('label' => 'Password', 'name' => 'password', 'required' => false)); } print_textarea_element(array('name' => 'signature', 'cols' => 40, 'rows' => 3, 'label' => 'Signature')); } else if ($type == 'contact') { $back_link = base_url()."users/contact"; } print_submit_container_open(); echo form_submit('submit', 'Submit', 'id="submit_button" class="btn btn-default"'); if (has_capability('users:viewallusers')) { echo form_button(array('name' => 'button', 'content' => 'Back to '.ucfirst($type).' list', 'class'=>'btn btn-default', 'onclick' => "window.location='".$back_link."';")); } print_submit_container_close(); ?> </div>