/** * Creates a password form input. * * @param string input name * @param string input value * @param array html attributes * @return string */ public function password($name, $value = NULL, array $attributes = NULL) { $attributes = Appform::add_class($attributes, 'password'); $attributes['id'] = $name; $this->load_values($name, $value, $attributes); return Kohana_Form::password($name, $value, $attributes) . $this->addAlertSpan(isset($this->errors[$name]) ? $this->errors[$name] : NULL, $attributes); }
echo __('register'); ?> </h1> <div class="content"> <div class="info" style="width: 415px;"><small><?php echo __('?already.have.account') . ' ' . Html::anchor('user/login', __('login.here')); ?> </small></div> <br> <p><?php echo __('enter.info.to.register'); ?> </p> <?php $form = new Appform(); if (isset($errors)) { $form->errors = $errors; } if (isset($defaults)) { $form->defaults = $defaults; } else { unset($_POST['password']); unset($_POST['password_confirmation']); $form->defaults = $_POST; } echo $form->open('user/register'); ?> <ul>
<?php $form = new Appform(); if (isset($errors)) { $form->errors = $errors; } if (isset($data)) { unset($data['password']); unset($data['password_confirm']); $form->values = $data; } echo $form->open('admin_user/edit/' . $id); ?> <?php echo $form->hidden('id', $id); ?> <div class="block"> <h1><?php echo __('Edit/add user'); ?> </h1> <div class="content"> <ul> <li><label><?php echo __('Username');
<?php $form = new Appform(); if (isset($errors)) { $form->errors = $errors; } if (isset($username)) { $form->values['username'] = $username; } // set custom classes to get labels moved to bottom: $form->error_class = 'error block'; $form->info_class = 'info block'; ?> <div id="box"> <div class="block"> <h1><?php echo __('Login'); ?> </h1> <div class="content"> <?php echo $form->open('user/login'); echo '<table><tr><td style="vertical-align: top;">'; echo '<ul>'; echo '<li>' . $form->label('username', __('Email or Username')) . '</li>'; echo $form->input('username', null, array('class' => 'text twothirds')); echo '<li>' . $form->label('password', __('Password')) . '</li>'; echo $form->password('password', null, array('class' => 'text twothirds')); echo '</ul>'; echo $form->submit(NULL, __('Login')); echo '<small> ' . Html::anchor('user/forgot', __('Forgot your password?')) . '<br></small>';
<?php $form = new Appform(); if (isset($errors)) { $form->errors = $errors; } if (isset($username)) { $form->values['username'] = $username; } // set custom classes to get labels moved to bottom: $form->error_class = 'error block'; $form->info_class = 'info block'; ?> <div id="box"> <div class="block"> <h1><?php echo __('login'); ?> </h1> <div class="content"> <?php echo $form->open('user/login'); echo '<table><tr><td style="vertical-align: top;">'; echo '<ul>'; echo '<li>' . $form->label('username', __('email.or.username')) . '</li>'; echo $form->input('username', null, array('class' => 'text twothirds')); echo '<li>' . $form->label('password', __('password'), array('style' => 'display: inline; margin-right:10px;')) . '<small> ' . Html::anchor('user/forgot', __('?forgot.password')) . '<br></small>' . '</li>'; echo $form->password('password', null, array('class' => 'text twothirds')); $authClass = new ReflectionClass(get_class(Auth::instance())); //set a valid salt in useradmin config or your bootstrap.php if ($authClass->hasMethod('auto_login') and Cookie::$salt) {
/** * Creates a submit form input. * * @param string input name * @param string input value * @param array html attributes * @return string */ public function submit($name, $value, array $attributes = NULL) { return Kohana_Form::submit($name, $value, Appform::add_class($attributes, 'submit')); }
<h1><?php echo __('Register'); ?> </h1> <div class="info"><small><?php echo __('Already have a user account?') . ' ' . Html::anchor('user/login', __('Log in here.')); ?> </small></div> <p><?php echo __('Fill in the information below to register.'); ?> </p> <?php $form = new Appform(); if (isset($errors)) { $form->errors = $errors; } if (isset($defaults)) { $form->defaults = $defaults; } else { unset($_POST['password']); unset($_POST['password_confirmation']); $form->defaults = $_POST; } echo $form->open('user/register'); ?> <ul> <li><label><?php
<?php $form = new Appform(); if (isset($errors)) { //$form->errors = $errors; } if (isset($username)) { $form->values['username'] = $username; } // set custom classes to get labels moved to bottom: $form->error_class = 'error block'; $form->info_class = 'info block'; ?> <div class="span7"> <?php if (!empty($errors['password'])) { echo '<div class="alert-message error"><p>'; echo $errors['password']; echo '</p></div>'; } ?> <form method="post" action="" accept-charset="utf-8"> <fieldset> <div class="clearfix"> <?php echo $form->label('username', __('Email')); ?> <div class="input"> <?php echo $form->input('username', null, array('type' => 'email', 'required' => 'required', 'placeholder' => '*****@*****.**', 'autofocus' => 'autofocus'));
<div class="span12"> <p>Already have a user account? <a href="/user/login">Log in here</a>.</p> <?php if (@$_GET['firstname'] && !@$_POST['firstname']) { $_POST['firstname'] = $_GET['firstname']; } if (@$_GET['surname'] && !@$_POST['surname']) { $_POST['surname'] = $_GET['surname']; } if (@$_GET['email'] && !@$_POST['email']) { $_POST['email'] = $_GET['email']; } $form = new Appform(); if (isset($errors)) { $form->errors = $errors; } if (isset($defaults)) { $form->defaults = $defaults; } else { unset($_POST['password']); unset($_POST['password_confirmation']); $form->defaults = $_POST; } echo $form->open(''); ?> <fieldset>
<?php $form = new Appform(); if (isset($errors)) { $form->errors = $errors; } if (isset($username)) { $form->values['username'] = $username; } // set custom classes to get labels moved to bottom: $form->error_class = 'error block'; $form->info_class = 'info block'; ?> <div id="box"> <div class="block"> <h1><?php echo $title; ?> </h1> <div class="content meal_info"> <?php echo $form->open(); echo '<ul>'; echo '<li class="li_label">' . $form->label('shakes', __('Shakes:')) . '</li>'; echo $form->select('shakes', array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)); echo '<li class="li_label">' . $form->label('entree', __('Entrees:')) . '</li>'; echo $form->select('entree', array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)); echo '<li class="li_label">' . $form->label('bars', __('Bars:')) . '</li>'; echo $form->select('Bars', array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)); echo '<li class="li_label">' . $form->label('vegetables', __('Vegetables:')) . '</li>'; echo $form->select('Vegetables', array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20));
<?php $form = new Appform(); if (isset($errors)) { $form->errors = $errors; } if (isset($data)) { unset($data['password']); $form->values = $data; } echo $form->open('user/profile_edit'); ?> <div class="block"> <h1><?php echo __('edit.profile'); ?> </h1> <div class="content"> <ul> <?php echo View::factory('user/user_edit_form')->set(array('form' => $form)); ?> <li><h2><?php echo __('roles'); ?> </h2></li> <li><table class="content"> <tr class="heading"><td><?php echo __('role');
<?php $form = new Appform(); if (isset($errors)) { $form->errors = $errors; } if (isset($data)) { unset($data['password']); unset($data['password_confirm']); $form->values = $data; } echo $form->open('admin_user/edit/' . $id); echo $form->hidden('id', $id); ?> <div class="block"> <h1><?php echo __('?edit.or.add.user'); ?> </h1> <div class="content"> <ul> <?php echo View::factory('user/user_edit_form')->set(array('form' => $form)); ?> <li><h2><?php echo __('roles'); ?> </h2></li> <li><table class="content">
<div class="span12"> <a class="danger pull-right" href="/user/unregister">Delete your account</a> <?php $form = new Appform(); if (isset($errors)) { $form->errors = $errors; } if (isset($data)) { unset($data['password']); $data['dob'] = strtotime($data['dob']); $data['dob'] = $data['dob'] ? date('d/m/Y', $data['dob']) : ''; $form->values = $data; } echo $form->open('user/profile_edit'); ?> <div class="clearfix"> <label>First name</label> <div class="input"><?php echo $form->input('firstname', null, array('required' => 'required')); ?> </div> </div> <div class="clearfix"> <label>Surname</label> <div class="input"><?php echo $form->input('surname', null, array('required' => 'required')); ?>
<h1><?php echo __('Login'); ?> </h1> <?php $form = new Appform(); if (isset($errors)) { $form->errors = $errors; } if (isset($username)) { $form->values['username'] = $username; } // set custom classes to get labels moved to bottom: $form->error_class = 'error block'; $form->info_class = 'info block'; echo '<table width="850">'; echo '<tr><td width="428">'; echo $form->open('user/login'); echo '<ul>'; echo '<li>' . $form->label('username', __('Email or Username')) . '</li>'; echo $form->input('username'); echo '<li>' . $form->label('password', __('Password')) . '</li>'; echo $form->password('password'); echo '</ul>'; echo $form->submit(NULL, __('Login')); echo '<small> ' . Html::anchor('user/forgot', __('Forgot your password?')) . '<br></small>'; echo $form->close(); echo '</td><td width="22"> </td><td style="vertical-align: top;"><div id="fb-root"></div>'; echo '<ul>'; echo '<li>' . __('Don\'t have an account?') . ' ' . Html::anchor('user/register', __('Register new account here.')) . '<br></li>'; // Facebook
<div data-role="header" data-position="inline"> <a href="index.html" data-iconpos="notext" data-icon="arrow-l"></a> <h1><?php echo $header; ?> </h1> <a href="index.html" data-iconpos="notext" data-icon="arrow-r"></a> </div><!-- /header --> <div data-role="content"> <?php $form = new Appform(); if (isset($errors)) { $form->errors = $errors; } if (isset($username)) { $form->values['username'] = $username; } // set custom classes to get labels moved to bottom: $form->error_class = 'error block'; $form->info_class = 'info block'; ?> <div data-role="fieldcontain"> <?php $numbers = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20); echo $form->open(); ?> <div data-role="fieldcontain"> <?php echo $form->label('shakes', __('Shakes:')); echo $form->select('shakes', $numbers, NULL, array('id' => 'shakes'));