Example #1
0
 /**
  * @covers Form::password
  */
 public function testPassword()
 {
     $pass = $this->myForm->password('password');
     $this->assertInstanceOf('Password', $pass);
     $this->assertEquals('password', $pass->getName());
     $this->assertSame($this->myForm, $pass->getForm());
 }
Example #2
0
 public function input_edit($value)
 {
     if (isset($this->item['repeat'])) {
         return Form::password($this->item['name'], '1111111111111111') . Form::password($this->item['name'] . '_confirm', '1111111111111111');
     } else {
         return Form::password($this->item['name'], '1111111111111111');
     }
 }
/**
 * @param array                    $params
 * @param Smarty_Internal_Template $smarty
 *
 * @throws SmartyException
 * @return string
 *
 * @author KovƔcs Vince
 */
function smarty_function_form_password($params, Smarty_Internal_Template &$smarty)
{
    if (!isset($params['_name'])) {
        throw new SmartyException('Missing _name attribute for form_password tag');
    }
    $name = $params['_name'];
    unset($params['_name']);
    return Form::password($name, $params);
}
Example #4
0
 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     $usuario = new User();
     $roles = Role::all()->lists('display_name', 'id');
     $myroles = [];
     $title = 'Agregar usuario';
     $form_data = ['route' => 'usuario.store', 'class' => 'form-horizontal'];
     $password_field = \Form::label('password', 'ContraseƱa') . \Form::password('password', ['class' => 'form-control']);
     return view('usuario.form')->with(compact('title', 'usuario', 'form_data', 'password_field', 'roles', 'myroles'));
 }
function page()
{
    global $db, $session;
    //lets get a user
    $user = $db->from('users')->where('id', 1);
    $formOptions = array('action' => $_SERVER['PHP_SELF'], 'id' => 'testForm', 'data' => $user, 'files' => true, 'class' => 'form-horizontal', 'sidebar' => true, 'title' => '', 'description' => '');
    $form = new Form($formOptions, $session);
    $sidebar = array('class' => 'warning', 'title' => 'Be careful!', 'body' => 'Be sure you complete all fields');
    $form->setSidebar($sidebar);
    $emailValidation = array('required' => 'true', 'error' => 'Please supply a valid email address');
    $email = array('field' => 'email', 'label' => "Email", 'description' => '', 'validation' => $emailValidation);
    $form->email($email);
    $firstNameValidation = array();
    $firstName = array('field' => 'firstname', 'label' => "First Name", 'description' => '', 'validation' => $firstNameValidation);
    $form->text($firstName);
    $lastName = array('field' => 'lastname', 'label' => "Last Name", 'description' => 'Fill in your last name');
    $form->text($lastName);
    $taName = array('field' => 'descriptionField', 'label' => "Last Name", 'description' => 'Fill in your last name');
    $form->textarea($taName);
    $phoneOptions = array('field' => 'phone', 'label' => "Phone", 'description' => 'Home Phone');
    $form->phone($phoneOptions);
    $checkOptions = array('field' => 'checkTest', 'label' => "Check here", 'description' => 'You authorize everything');
    $form->checkbox($checkOptions);
    $passwordValidation = array('pattern' => '(?=^.{6,}$)((?=.*\\d)|(?=.*\\W+))(?![.\\n])(?=.*[A-Z])(?=.*[a-z]).*$');
    $passwordOptions = array('field' => 'password', 'label' => "Password", 'description' => 'Enter a password at least 6 characters, with at least one symbol and number.', 'validation' => $passwordValidation);
    $form->password($passwordOptions);
    /*
        $dateValidation = array('disabledDays'=>'0,1','disabledDates'=>array("11/23/2015", "12/25/2015"), 'minDate'=>'11/1/2015', 'maxDate'=>'1/30/2016');
        $secondDateValidation = array('disabledDays'=>'0,1','disabledDates'=>array("11/23/2015", "12/25/2015"), 'minDate'=>'11/1/2015', 'maxDate'=>'1/30/2016');
        $dateOptions = array('field'=>'startdate', 'label'=>'Start/Stop Dates', 'description' =>'Enter a start  and stop date', 'validation' => $dateValidation,
            'second_field'=>'enddate',  'second_validation' => $secondDateValidation );
        $form->date($dateOptions);
    
        $timeValidation = array('stepping'=>5,'disabledDays'=>'0,1','disabledDates'=>array("11/23/2015", "12/25/2015"), 'minDate'=>'11/1/2015', 'maxDate'=>'1/30/2016');
        $secondTimeValidation = array('disabledDays'=>'0,1','disabledDates'=>array("11/23/2015", "12/25/2015"), 'minDate'=>'11/1/2015', 'maxDate'=>'1/30/2016');
        $dateOptions = array('field'=>'starttime', 'label'=>'Start/Stop Times', 'description' =>'Enter a start  and stop time', 'validation' => $timeValidation,
            'second_field'=>'endtime',  'second_validation' => $secondTimeValidation );
        $form->time($dateOptions);
    */
    $timeValidation = array('stepping' => 5, 'disabledDays' => '0,1', 'disabledDates' => array("11/23/2015", "12/25/2015"), 'minDate' => '11/1/2015', 'maxDate' => '1/30/2016');
    $secondTimeValidation = array('stepping' => 5, 'disabledDays' => '0,1', 'disabledDates' => array("11/23/2015", "12/25/2015"), 'minDate' => '11/1/2015', 'maxDate' => '1/30/2016');
    $dateOptions = array('field' => 'startdatetime', 'label' => 'Start/Stop Date Times', 'description' => 'Enter a start  and stop date time', 'validation' => $timeValidation, 'second_field' => 'enddatetime', 'second_validation' => $secondTimeValidation);
    $form->datetime($dateOptions);
    $options = array('field' => 'department', 'options' => array(0 => 'Advertising', 1 => "Circulation", 2 => 'Production'), 'label' => 'Department', 'description' => 'Select your department');
    $form->select($options);
    $options = array('field' => 'publications', 'url' => '/ajax/forms/publications.php', 'label' => 'Publication', 'description' => 'Select a publication');
    $form->remoteSelect($options);
    $form->generate();
    //var_dump($this->formScripts);
    //grab any form scripts and append them to the global scripts array
    $GLOBALS['scripts'] = array_merge($GLOBALS['scripts'], $form->formScripts);
}
Example #6
0
 public function buildControl($type, $name, $value = null, $attibutes = array(), $options = array())
 {
     switch ($type) {
         case 'select':
             return \Form::select($name, $options, $value, $attributes);
         case 'password':
             return \Form::password($name);
         case 'checkbox':
             return \Form::checkbox($name);
         default:
             return \Form::input($type, $name, $value);
     }
 }
Example #7
0
 /** inheritdoc */
 public static function displayForm($value, &$settings, $model)
 {
     $include_label = isset($settings['label']) ? $settings['label'] : true;
     $required = isset($settings['required']) ? $settings['required'] : false;
     $errors = $model->getErrorsForField($settings['mapping']['fieldName']);
     $has_errors = count($errors) > 0;
     $input_attributes = isset($settings['input_attributes']) ? $settings['input_attributes'] : array('class' => 'input-xxlarge');
     $label = !$include_label ? '' : \Form::label($settings['title'] . ($required ? ' *' : '') . ($has_errors && !empty($errors[0]) ? ' - ' . $errors[0] : ''), $settings['mapping']['fieldName']);
     $input = \Form::password($settings['mapping']['fieldName'], strval($value), $input_attributes);
     if (isset($settings['wrap']) && $settings['wrap'] === false) {
         return $label . $input;
     }
     return html_tag('div', array('class' => 'controls control-group' . ($has_errors ? ' error' : '')), $label . $input);
 }
Example #8
0
    /**
     * Render view.
     *
     * @return  string
     */
    public function content()
    {
        ob_start();
        echo Form::open();
        ?>

<fieldset>
	<legend><?php 
        echo __('Almost there!');
        ?>
</legend>

	<?php 
        echo Form::control_group(Form::input('username', $this->user->userame, array('class' => 'input-small', 'placeholder' => __('JohnDoe'))), array('username' => __('Username')), Arr::get($this->errors, 'username'), __('Choose a unique username with at least <var>:length</var> characters. No special characters, thank you.', array(':length' => Kohana::$config->load('visitor.username.length_min'))));
        ?>

	<?php 
        echo Form::control_group(Form::password('password'), array('password' => __('Password')), Arr::get($this->errors, 'password'));
        ?>

	<?php 
        echo Form::control_group(Form::password('password_confirm'), array('password_confirm' => __('Confirm')), Arr::get($this->errors, 'password_confirm'), __('Try to use letters, numbers and special characters for a stronger password, with at least <var>8</var> characters.'));
        ?>

	<?php 
        echo Form::control_group(Form::input('email', $this->user->email, array('disabled' => 'disabled', 'class' => 'input-xxlarge', 'placeholder' => __('*****@*****.**'))), array('email' => __('Email')), Arr::get($this->errors, 'email'), __('Please remember: sign up is available only with a valid, invited email.'));
        ?>

</fieldset>

<fieldset>
	<?php 
        echo Form::hidden('code', $this->code);
        ?>
	<?php 
        echo Form::button('register', __('Sign up!'), array('type' => 'submit', 'class' => 'btn btn-primary btn-large'));
        ?>
	<?php 
        echo HTML::anchor(Request::back('/', true), __('Cancel'), array('class' => 'cancel'));
        ?>
</fieldset>

<?php 
        echo Form::close();
        return ob_get_clean();
    }
Example #9
0
 private static function generatePassword($id, $attributes_input, $model, $attributes)
 {
     if (is_string($attributes)) {
         $attributes = $attributes_input;
     }
     $field = array();
     $field[] = Form::password($attributes_input["name"], $attributes);
     $field[] = '<span class="error"> ' . $model->first_error(strtolower($id)) . '</span>';
     return join($field);
 }
Example #10
0
<?php

echo Form::password($name, $value, $attributes + array('id' => 'field-' . $name));
 public function actionEditProfile()
 {
     $message_avatar_name = "avatar";
     $message_name_name = "name";
     $message_password_name = "password";
     if ($this->request->change_avatar) {
         $img = $this->fp->uploadIMG($message_avatar_name, $_FILES["avatar"], Config::MAX_SIZE_AVATAR, Config::DIR_AVATAR);
         if ($img) {
             $tmp = $this->auth_user->getAvatar();
             $obj = $this->fp->process($message_avatar_name, $this->auth_user, array(array("avatar", $img)), array(), "SUCCESS_AVATAR_CHANGE");
             if ($obj instanceof UserDB) {
                 if ($tmp) {
                     File::delete(Config::DIR_AVATAR . $tmp);
                 }
                 $this->redirect(URL::current());
             }
         }
     } elseif ($this->request->change_name) {
         $checks = array(array($this->auth_user->checkPassword($this->request->password_current_name), true, "ERROR_PASSWORD_CURRENT"));
         $user_temp = $this->fp->process($message_name_name, $this->auth_user, array("name"), $checks, "SUCCESS_NAME_CHANGE");
         if ($user_temp instanceof UserDB) {
             $this->redirect(URL::current());
         }
     } elseif ($this->request->change_password) {
         $checks = array(array($this->auth_user->checkPassword($this->request->password_current), true, "ERROR_PASSWORD_CURRENT"));
         $checks[] = array($this->request->password, $this->request->password_conf, "ERROR_PASSWORD_CONF");
         $user_temp = $this->fp->process($message_password_name, $this->auth_user, array(array("setPassword()", $this->request->password)), $checks, "SUCCESS_PASSWORD_CHANGE");
         if ($user_temp instanceof UserDB) {
             $this->auth_user->login();
             $this->redirect(URL::current());
         }
     }
     $this->title = "Š ŠµŠ“Š°ŠŗтŠøрŠ¾Š²Š°Š½ŠøŠµ ŠæрŠ¾Ń„ŠøŠ»Ń";
     $this->meta_desc = "Š ŠµŠ“Š°ŠŗтŠøрŠ¾Š²Š°Š½ŠøŠµ ŠæрŠ¾Ń„ŠøŠ»Ń ŠæŠ¾Š»ŃŒŠ·Š¾Š²Š°Ń‚ŠµŠ»Ń.";
     $this->meta_key = "рŠµŠ“Š°ŠŗтŠøрŠ¾Š²Š°Š½ŠøŠµ ŠæрŠ¾Ń„ŠøŠ»Ń, рŠµŠ“Š°ŠŗтŠøрŠ¾Š²Š°Š½ŠøŠµ ŠæрŠ¾Ń„ŠøŠ»Ń ŠæŠ¾Š»ŃŒŠ·Š¾Š²Š°Ń‚ŠµŠ»Ń, рŠµŠ“Š°ŠŗтŠøрŠ¾Š²Š°Š½ŠøŠµ ŠæрŠ¾Ń„ŠøŠ»Ń ŠæŠ¾Š»ŃŒŠ·Š¾Š²Š°Ń‚ŠµŠ»Ń сŠ°Š¹Ń‚";
     $form_avatar = new Form();
     $form_avatar->name = "change_avatar";
     $form_avatar->action = URL::current();
     $form_avatar->enctype = "multipart/form-data";
     $form_avatar->message = $this->fp->getSessionMessage($message_avatar_name);
     $form_avatar->file("avatar", "ŠŠ²Š°Ń‚Š°Ń€:");
     $form_avatar->submit("Š”Š¾Ń…Ń€Š°Š½Šøть");
     $form_avatar->addJSV("avatar", $this->jsv->avatar());
     $form_name = new Form();
     $form_name->name = "change_name";
     $form_name->header = "Š˜Š·Š¼ŠµŠ½Šøть ŠøŠ¼Ń";
     $form_name->action = URL::current();
     $form_name->message = $this->fp->getSessionMessage($message_name_name);
     $form_name->text("name", "Š’Š°ŃˆŠµ ŠøŠ¼Ń:", $this->auth_user->name);
     $form_name->password("password_current_name", "Š¢ŠµŠŗущŠøŠ¹ ŠæŠ°Ń€Š¾Š»ŃŒ:");
     $form_name->submit("Š”Š¾Ń…Ń€Š°Š½Šøть");
     $form_name->addJSV("name", $this->jsv->name());
     $form_name->addJSV("password_current_name", $this->jsv->password(false, false, "ERROR_PASSWORD_CURRENT_EMPTY"));
     $form_password = new Form();
     $form_password->name = "change_password";
     $form_password->header = "Š˜Š·Š¼ŠµŠ½Šøть ŠæŠ°Ń€Š¾Š»ŃŒ";
     $form_password->action = URL::current();
     $form_password->message = $this->fp->getSessionMessage($message_password_name);
     $form_password->password("password", "ŠŠ¾Š²Ń‹Š¹ ŠæŠ°Ń€Š¾Š»ŃŒ:");
     $form_password->password("password_conf", "ŠŸŠ¾Š²Ń‚Š¾Ń€ŠøтŠµ ŠæŠ°Ń€Š¾Š»ŃŒ:");
     $form_password->password("password_current", "Š¢ŠµŠŗущŠøŠ¹ ŠæŠ°Ń€Š¾Š»ŃŒ:");
     $form_password->submit("Š”Š¾Ń…Ń€Š°Š½Šøть");
     $form_name->addJSV("password", $this->jsv->password("password_conf"));
     $form_name->addJSV("password_current", $this->jsv->password(false, false, "ERROR_PASSWORD_CURRENT_EMPTY"));
     $hornav = $this->getHornav();
     $hornav->addData("Š ŠµŠ“Š°ŠŗтŠøрŠ¾Š²Š°Š½ŠøŠµ ŠæрŠ¾Ń„ŠøŠ»Ń");
     $this->render($this->renderData(array("hornav" => $hornav, "form_avatar" => $form_avatar, "form_name" => $form_name, "form_password" => $form_password), "profile", array("avatar" => $this->auth_user->avatar, "max_size" => Config::MAX_SIZE_AVATAR / KB_B)));
 }
Example #12
0
	</div>

	<div class="form-group">
		<?php 
echo Form::label('password', 'Password');
?>
		<?php 
echo Form::password('password', '', ['class' => 'form-control']);
?>
	</div>

	<div class="form-group">
		<?php 
echo Form::label('confirm_password', 'Confirm Password');
?>
		<?php 
echo Form::password('confirm_password', '', ['class' => 'form-control']);
?>
	</div>
	
	<div class="form-group">
		<?php 
echo Form::submit('Register', ['class' => 'btn btn-primary']);
?>
	</div>
	
	<?php 
echo Form::close();
?>

</div>
echo e($errors->has('password') ? ' has-error' : '');
?>
">
							    	<label class="col-md-4 control-label" for="password">Contrase&ntilde;a</label>
							    	<div class="col-md-6">
							    		<?php 
echo Form::password('password', array('class' => 'form-control'));
?>

							    	</div>
							    </div>
							    <div class="form-group">
							    	<label class="col-md-4 control-label" for="password_confirmation">Confirmaci&oacute;n de contrase&ntilde;a</label>
							    	<div class="col-md-6">
							    		<?php 
echo Form::password('password_confirmation', array('class' => 'form-control'));
?>

							    	</div>
							    </div>

							    <div class="form-group">
							    	<label class="col-md-4 control-label" for="role">Rol</label>
							    	<div class="col-md-6">
							    		<?php 
echo Form::select('role', array('USER' => 'Usuario', 'ADMIN' => 'Administrador', 'COLLECTOR' => 'Cobrador', 'DIRECTIVE' => 'Junta directiva'), ['class' => 'form-control']);
?>

							    	</div>
							    </div>
							    <div class="form-group">
Example #14
0
echo FORM::input('username', Arr::get($values, 'username'));
?>
</td>
            <td><?php 
echo Message::show_once_error($errors, 'username');
?>
</td>
        </tr>
        <tr>
            <td><?php 
echo __('f_password');
?>
</td>
            <td>
                <?php 
echo Form::password('password', NULL, array('class' => 's_inp', 'id' => 'form_password', 'data-typetoggle' => '#reg_pass_view'));
?>
                <br />
                <?php 
echo Form::checkbox(NULL, NULL, FALSE, array('id' => 'reg_pass_view'));
?>
ŠŸŠ¾ŠŗŠ°Š·Š°Ń‚ŃŒ ŠæŠ°Ń€Š¾Š»ŃŒ
            </td>
            <td><?php 
echo Message::show_once_error($errors, 'password') . Message::show_once_error(Arr::get($errors, '_external', array()), 'password');
?>
</td>
        </tr>
        <tr>
            <td><?php 
echo __('f_email');
					<?php 
echo Form::label('correo', 'Correo:');
?>

					<?php 
echo Form::email('email', null, ['class' => 'form-control', 'placeholder' => 'Ingresa tu correo:']);
?>

				</div>
				<div class="form-group">
					<?php 
echo Form::label('contrasena', 'ContraseƱa:');
?>

					<?php 
echo Form::password('password', ['class' => 'form-control', 'placeholder' => 'Ingresa tu contraseƱa:']);
?>

				</div>
				<?php 
echo Form::submit('Iniciar', ['class' => 'btn btn-primary']);
?>

				<?php 
echo Form::close();
?>

			</div>
			
<!-- 			<div class="header-info">
				<h1>BIG HERO 6</h1>
     break;
 case 'file':
     $field = Form::file($element->name, $element->attributes);
     break;
 case 'image':
     $field = Form::image($element->name, $element->value, $element->attributes, false);
     break;
 case 'text':
 case 'text_small':
 case 'input':
 case 'input_small':
 case 'email':
     $field = Form::input($element->name, $element->value, $element->attributes);
     break;
 case 'password':
     $field = Form::password($element->name, $element->value, $element->attributes);
     break;
 case 'submit':
     $label = isset($element->label) ? $element->label : text('label.' . $element->key);
     $field = Form::submit($element->name, $label, $element->attributes);
     break;
 case 'select':
     // check if is assoc array
     $assoc = Arr::is_assoc($element->options);
     if ($assoc == FALSE) {
         $options = array();
         // add labels to the options
         foreach ($element->options as $option) {
             $options[$option] = text('option.' . $element->key . '.' . $option);
         }
     } else {
Example #17
0
 public function render($errors = false)
 {
     $params = array('method' => $this->method);
     if ($this->has_files) {
         $params['enctype'] = 'multipart/form-data';
     }
     $params['class'] = 'modal-form';
     $form = Form::open($this->action, $params);
     if (!$errors) {
         $values = array();
         foreach ($this->elements as $value) {
             $values[$value['name']] = $value['type'] == Form::SELECT ? Arr::path($value, 'attr.value') : $value['value'];
         }
         $errors = $this->validate($values);
     } else {
         $form .= '<div class="alert alert-danger">' . (is_array($errors) ? implode("\n", $errors) : $errors) . '</div>';
     }
     foreach ($this->elements as $element) {
         if (Arr::get($element, 'type') == self::BOOL && Arr::path($element, 'attr.default')) {
             $form .= Form::input($element['name'], 0, array('type' => 'hidden'));
             unset($element['attr']['default']);
         }
         if (strpos(Arr::path($element, 'attr.class', ''), 'has-success') !== false) {
             $element['attr']['class'] = str_replace('has-success', '', $element['attr']['class']);
             $warning = ' has-success';
         } else {
             $warning = '';
         }
         $form .= '<div class="' . Arr::path($element, 'attr.parent', '') . ($element['type'] == Form::BOOL ? 'checkbox' : 'form-group') . (Arr::get($errors, $element['name']) ? ' required' : $warning) . '">';
         //$element['descr'] .= Arr::path($element, 'attr.parent', '');
         if (!isset($element['attr']['id'])) {
             $element['attr']['id'] = 'form-' . $element['name'];
         }
         if ($element['type'] != Form::BOOL) {
             $element['descr'] = $element['descr'] . (in_array('not_empty', Arr::get($this->validator, $element['name'], array())) ? '*' : '') . ': ';
             $form .= Form::label('form-' . $element['name'], $element['descr'], array('class' => 'control-label'));
             if ($element['type'] != Form::FILE) {
                 if (isset($element['attr']['class'])) {
                     $element['attr']['class'] .= ' form-control';
                 } else {
                     $element['attr']['class'] = 'form-control';
                 }
             }
         }
         if (!isset($element['attr']['placeholder']) && !$element['descr']) {
             $element['attr']['placeholder'] = $element['descr'];
         }
         switch ($element['type']) {
             case self::DATE:
                 $element['attr']['class'] = Arr::get($element['attr'], 'class') . ' datepicker';
                 $element['attr']['placeholder'] = "DD-MM-YYYY";
                 $form .= Form::input($element['name'], $element['value'] ? date('d-m-Y', $element['value']) : '', $element['attr']);
                 break;
             case self::IMAGE:
                 $form .= '<div class="custom-canvas-logo">';
                 $form .= Form::hidden($element['name'], $element['value'], array('id' => 'image-src'));
                 $form .= Form::file(NULL, array('class' => 'hiddenfile dynamic-file', 'id' => 'file-' . $element['name'], 'accept' => "image/*"));
                 $form .= '<a class=" btn btn-info dynamic-file-btn" id="dynamic-file-btn" data-id="' . $element['name'] . '" src="' . $element['value'] . '">No image selected</a>';
                 $form .= '<img class="form-image" data-id="' . $element['name'] . '" src="' . $element['value'] . '"/>';
                 $form .= '</div>';
                 break;
             case self::STRING:
                 $form .= Form::input($element['name'], $element['value'], $element['attr']);
                 break;
             case self::NUMBER:
                 $form .= Form::input($element['name'], $element['value'], $element['attr']);
                 break;
             case self::TEXT:
                 $form .= Form::textarea($element['name'], $element['value'], $element['attr']);
                 break;
             case self::SELECT:
                 $selected = Arr::get($element['attr'], 'value', NULL);
                 if ($selected) {
                     unset($element['attr']['value']);
                 }
                 $form .= Form::select($element['name'], $element['value'], $selected, $element['attr']);
                 break;
             case self::BOOL:
                 $form .= Form::label(NULL, Form::checkbox($element['name'], Arr::get($element['attr'], 'value'), (bool) $element['value'], $element['attr']) . ' ' . $element['descr']);
                 break;
             case self::FILE:
                 $form .= Form::file($element['name'], $element['attr']);
                 break;
             case self::PASSWORD:
                 $form .= Form::password($element['name'], NULL, $element['attr']);
                 break;
             case self::INFO:
                 $form .= '<p class="form-control-static">' . HTML::chars($element['value']) . '</p>';
                 break;
             case self::URL:
                 $value = HTML::chars($element['value']);
                 $form .= '<a href="' . $value . '">' . $value . '</a>';
                 break;
         }
         $form .= '</div>';
     }
     $form .= '<div class="form-group buttons-group">' . Form::submit(NULL, 'Save', array('class' => 'btn btn-primary ajax-submit'));
     if ($this->back_button) {
         $form .= '&nbsp;' . Form::button(NULL, 'Back', array('class' => 'btn btn-danger back-button', 'type' => 'button', 'data-dismiss' => "modal"));
     }
     $form .= '</div>';
     $form .= Form::close();
     return $form;
 }
Example #18
0
    Response::redirect('login/login');
}
?>

    </div>
</div>

<div class="grid-8-12">
    <div class="grid-4-12">
        <?php 
echo Form::label('Old Password <em class="formee-req">*</em>', 'old_password');
?>
    </div>    
    <div class="grid-4-12">
        <?php 
echo Form::password('old_password', '', array('class' => 'formee-large', 'required', 'placeholder' => 'Old Password'));
?>
    </div>  
                

</div>
<div class='grid-8-12'>
    <div class='grid-4-12'>
        <?php 
echo Form::label('New Password <em class="formee-req">*</em>', 'password');
?>
    </div>
    <div class='grid-4-12'>
        <input type="password" name="password" id="password" required placeholder="New Password"/>
    </div></div>
<div class='grid-8-12'>
Example #19
0
<?php

defined('SYSPATH') or die('No direct script access.');
?>
<div class="form-group">
<? echo Form::label($name, isset($label)?$label:$name,$label_params) ?>
<div class="col-lg-9">

<?echo Form::password($name, NULL,$params);?>

<?if(isset($errors)):?>
<span class="error"><? echo $errors ?> </span>;
<? endif; ?>
</div>
</div>
Example #20
0
File: page.php Project: anqh/core
    /**
     * Login form.
     *
     * @return  string
     */
    protected function _signin()
    {
        ob_start();
        ?>

	<nav id="visitor">
		<?php 
        echo Form::open(Route::url('sign', array('action' => 'in')), array('class' => 'navbar-form form-inline'));
        ?>
		<?php 
        echo Form::input('username', null, array('class' => 'input-mini', 'placeholder' => __('Username'), 'title' => __('HOT TIP: You can also use your email')));
        ?>
		<?php 
        echo Form::password('password', null, array('class' => 'input-mini', 'placeholder' => __('Password'), 'title' => __('Forgot it? Just leave me empty')));
        ?>
		<?php 
        echo Form::button(null, __('Sign in'), array('class' => 'btn btn-primary', 'title' => __('Remember to sign out if on a public computer!')));
        ?>
		<?php 
        echo Form::hidden('remember', 'true');
        ?>
		<?php 
        echo HTML::anchor(Route::url('sign', array('action' => 'up')), __('Sign up') . ' <i class="icon-heart icon-white"></i>', array('class' => 'btn btn-lovely', 'title' => __("Did we mention it's FREE!")));
        ?>
		<?php 
        echo Form::close();
        ?>
	</nav>

<?php 
        return ob_get_clean();
    }
Example #21
0
					<span class="control-label"><?php 
    echo $val->error('email')->get_message('You must provide a username or email');
    ?>
</span>
				<?php 
}
?>
			</div>

			<div class="control-group <?php 
echo !$val->error('password') ?: 'has-error';
?>
">
				<label for="password">Password:</label>
				<?php 
echo Form::password('password', null, array('class' => 'form-control', 'placeholder' => 'Password'));
?>

				<?php 
if ($val->error('password')) {
    ?>
					<span class="control-label"><?php 
    echo $val->error('password')->get_message(':label cannot be blank');
    ?>
</span>
				<?php 
}
?>
			</div>

			<div class="actions">
Example #22
0
<div class="login">

	<?php 
echo Form::open('', 'post', ['class' => 'col-md-4 col-md-offset-4', 'id' => 'resetForm']);
?>

	<h3>Reset Password</h3>
	<a href="/login">Back to Login</a>

	<hr>

	<div class="form-group">
		<?php 
echo Form::label('password', 'Password');
?>
		<?php 
echo Form::password('password', Sticky::get('password'), ['class' => 'form-control']);
?>
	</div>

	<div class="form-group">
		<?php 
echo Form::submit('Send', ['class' => 'btn btn-primary']);
?>
	</div>

	<?php 
echo Form::close();
?>

</div>
Example #23
0
	<hr />
	<h2 class="center">Sign into your<br /> Bracket account</h2>
	<hr />
</div>
<div class="mediaBreak mediaBreakLeft45">
	<?php 
echo Form::open('home/login', 'POST', array('id' => 'loginForm', 'autocomplete' => 'off'));
?>
		<fieldset>
			<?php 
echo Form::email('email', Input::old('email'), array('placeholder' => 'Your email address', 'class' => 'lg center', 'autocomplete' => 'off'));
?>
		</fieldset>
		<fieldset>
			<?php 
echo Form::password('password', array('placeholder' => 'Top Secret Password', 'class' => 'lg center', 'autocomplete' => 'off'));
?>
		</fieldset>

		<fieldset>
			<?php 
echo Form::submit('Let Me In', array('class' => 'btn med success span100'));
?>
		</fieldset>
	<?php 
echo Form::close();
?>
</div>
<div class="mediaBreak mediaBreakRight45">

	<hr />
Example #24
0
<?php if ($message) : ?>
    <div class="alert alert-danger" role="alert"><?= $message; ?></div>
<? endif; ?>



<div class="panel panel-default" id="login-form">
    <div class="panel-heading"><?= __('login'); ?></div>
    <div class="panel-body">
        <?= Form::open('admin/auth/login', array('role' => 'form')); ?>
        <div class="form-group">
            <?= Form::label('username', __('username')); ?>
            <?= Form::input('username', HTML::chars(Arr::get($_POST, 'username')), array('class' => 'form-control', 'id' => 'username')); ?>
        </div>

        <div class="form-group">
            <?= Form::label('password', __('password')); ?>
            <?= Form::password('password', HTML::chars(Arr::get($_POST, 'v')), array('class' => 'form-control', 'id' => 'password')); ?>
        </div>

        <?= Form::submit('login', __('login'), array('class' => 'btn btn-default')); ?>
        <?= Html::anchor('admin/auth/forgotten', __('forgotten'), array('class' => 'pull-right')); ?>
        <?= Form::close(); ?>
    </div>
</div>
Example #25
0
					<?php 
echo Form::text('documents_dir', '', array('id' => 'documents_dir1', 'style' => 'width:500px', 'class' => 'text documents_dir', 'title' => 'Format: /directory/subdirectory/subdirectory/', 'readonly'));
?>
				</div>
				<div class="pure-control-group">
					<?php 
echo Form::label('smtp_user1', 'Gmail Username for Sending E-mail:');
?>
					<?php 
echo Form::text('smtp_user', '', array('id' => 'smtp_user1', 'required', 'style' => 'width:500px', 'class' => 'text'));
?>
				</div>
				<div class="pure-control-group">
					<?php 
echo Form::label('smtp_pass1', 'Gmail Password for Sending E-mail:');
?>
					<?php 
echo Form::password('smtp_pass', array('id' => 'smtp_pass1', 'required', 'style' => 'width:500px', 'class' => 'text'));
?>
				</div>
				<br>
				<button type='button' id='install_submit1'>Install NOSH ChartingSystem</button>
			</div>
		</form>
	</div>
	<div id="install_choose_dialog" title="Choose Installation Type">
		<button type='button' id='install_practice' title="Choose this method if you are a medical practice" style="width:310px">Install Practice Centric NOSH ChartingSystem</button><br><br>
		<button type='button' id='install_patient' title="Choose this method if you are a patient" style="width:310px">Install Patient Centric NOSH ChartingSystem</button>
	</div>
</div>
Example #26
0
	<p>
		<label for="username">Username</label>
		<?php 
echo Form::input('username', $user->username);
?>
	</p>
	<p>
		<label for="full_name">Full Name</label>
		<?php 
echo Form::input('full_name', $user->full_name);
?>
	</p>
	<p>
		<label for="email">Email</label>
		<?php 
echo Form::input('email', $user->email);
?>
	</p>
	<p>
		<label for="password">Password</label>
		<?php 
echo Form::password('password');
?>
	</p>
	<?php 
echo Form::submit('submit');
?>

<?php 
echo Form::close();
Example #27
0
?>
				</div>
				<div class="pure-control-group">
					<?php 
echo Form::label('pt_password', 'Portal Password:'******'pt_password', array('id' => 'pt_password', 'required', 'style' => 'width:500px', 'class' => 'text'));
?>
				</div>
				<div class="pure-control-group">
					<?php 
echo Form::label('pt_conf_password', 'Portal Password Confirm:');
?>
					<?php 
echo Form::password('pt_conf_password', array('id' => 'pt_conf_password', 'required', 'style' => 'width:500px', 'class' => 'text'));
?>
				</div>
				<div class="pure-control-group">
					<?php 
echo Form::label('lastname', 'Last Name:');
?>
					<?php 
echo Form::text('lastname', '', array('id' => 'lastname', 'required', 'style' => 'width:500px', 'class' => 'text'));
?>
				</div>
				<div class="pure-control-group">
					<?php 
echo Form::label('firstname', 'First Name:');
?>
					<?php 
Example #28
0
		<p>
		<ul class="errors">
		<?php 
        foreach ($errors as $message) {
            ?>
			<li><?php 
            echo $message;
            ?>
</li>
		<?php 
        }
        ?>
		</ul>
		</p>
	<?php 
    }
    ?>
	
	<?php 
    echo Form::open();
    echo '<p>' . __('New password:'******' ' . Form::password('password', $post['password']) . '</p>';
    echo Form::hidden('username', $user->username);
    echo Form::hidden('token', $_GET['token']);
    echo Form::hidden('email', $_GET['email']);
    echo Form::submit(NULL, __('Set new password'));
    echo Form::close();
} else {
    ?>
	Link inactive
<?php 
}
Form::macro('timeField', function ($name, $label = null, $value = null) {
    $attributes = ['class' => 'form-control timepicker'];
    $element = Form::text($name, $value, fieldAttributes($name, $attributes));
    $out = '<div class="bootstrap-timepicker"><div class="form-group';
    $out .= fieldError($name) . '">';
    $out .= fieldLabel($name, $label);
    $out .= '<div class="input-group">';
    $out .= $element;
    $out .= '<div class="input-group-addon"><i class="fa fa-clock-o"></i></div>';
    $out .= '</div>';
    $out .= fieldMsg($name);
    $out .= "</div></div>";
    return $out;
});
Form::macro('passwordField', function ($name, $label = null, $attributes = array()) {
    $element = Form::password($name, fieldAttributes($name, $attributes));
    return fieldWrapper($name, $label, $element);
});
Form::macro('textareaField', function ($name, $label = null, $value = null, $attributes = array()) {
    $element = Form::textarea($name, $value, fieldAttributes($name, $attributes));
    return fieldWrapper($name, $label, $element);
});
Form::macro('selectField', function ($name, $label = null, $options, $value = null, $attributes = array()) {
    $attributes = $attributes + ['class' => 'selectize'];
    $element = Form::select($name, [null => 'Select One'] + $options, $value, fieldAttributes($name, $attributes));
    return fieldWrapper($name, $label, $element);
});
Form::macro('selectMultipleField', function ($name, $label = null, $options, $value = null, $attributes = array()) {
    $attributes = array_merge($attributes, ['multiple' => true]);
    $element = Form::select($name, $options, $value, fieldAttributes($name, $attributes));
    return fieldWrapper($name, $label, $element);
Example #30
0
                        <?php 
echo Form::label('password', 'Password', array('class' => 'control-label'));
?>
                        <div class="controls">
                            <?php 
echo Form::password('password', array('placeholder' => 'Ingrese una Nueva ContraseƱa...'));
?>
                        </div>
                    </div>
                    <div class="control-group">
                        <?php 
echo Form::label('password_confirmation', 'Confirmacion del Password', array('class' => 'control-label'));
?>
                        <div class="controls">
                            <?php 
echo Form::password('password_confirmation', array('placeholder' => 'Confirme la Nueva ContraseƱa...'));
?>
                        </div>
                    </div>

                    <div class="control-group">
                        <?php 
echo Form::label('admin', 'Administrador?', array('class' => 'control-label'));
?>
                        <div class="controls">
                            <label class="checkbox">
                                <?php 
echo Form::checkbox('admin', '1', Input::old('admin') || $create ? Input::old('admin') : ($user->admin ? true : false));
?>
                            </label>
                        </div>