<?php
/**
 * appRain CMF
 *
 * LICENSE
 *
 * This source file is subject to the MIT license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.opensource.org/licenses/mit-license.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@apprain.com so we can send you a copy immediately.
 *
 * @copyright  Copyright (c) 2010 appRain, Team. (http://www.apprain.com)
 * @license    http://www.opensource.org/licenses/mit-license.php MIT license
 *
 * HELP
 *
 * Official Website
 * http://www.apprain.com/
 *
 * Download Link
 * http://www.apprain.com/download
 *
 * Documents Link
 * http ://www.apprain.com/docs
 */
?>

<strong><?php echo $this->__("Login"); ?></strong>
<div class="message"><?php echo $message; ?></div>

<form method="post" id="login_form" action="<?php echo $this->baseurl("/member/login"); ?>">
<ul>
<?php
    $username = isset($this->data["Member"]["login_id"]) ? $this->data["Member"]["login_id"] : "";
    echo App::Load("Helper/Html")->get_from_row("Email Address",App::Load("Helper/Html")->inputTag("data[Member][login_id]",$username,array("size"=>"35","class"=>"input",'id'=>'email')) );
    echo App::Load("Helper/Html")->get_from_row("Password",App::Load("Helper/Html")->passwordTag("data[Member][password]","",array("size"=>"35","class"=>"input appPassword",'id'=>'login_password')) );
    echo App::Load("Helper/Html")->get_from_row(App::Load("Helper/Html")->submitTag("data[Member][submit]","Login",array("class" => "button")) );
?>
</ul>
</form>
<?php

	echo App::Load("Helper/Javascript")->validation_map(
															Array(
																	'_errBg'=>ERROR_BACKGROUND,
																	'_dflBg'=>DEFAULT_BACKGROUND,
																	'_autoSubmit'=>'false',
																	'_errToolTips'=>'false',
																	'_errorMark' => 'inline'
																)
														);

    // Configure the ajax submit form
    echo App::Load("Helper/Javascript")->ajax_submit(array("form_name"=>"#flogin_form","debug"=>"false","auto_hide"=>"true","message_element"=>"#fl_message"));
?>

<br />
<strong><?php echo $this->__("Forgot Login"); ?></strong>
<span class="message" id="fl_message"></span>

<form method="post" id="flogin_form" class="app_validation" action="<?php echo $this->baseurl("/member/forgotlogin"); ?>">
    <ul>
    <?php
        echo App::Load("Helper/Html")->get_from_row("Email", App::Load("Helper/Html")->inputTag("data[Forgotlogin][login_name]","",array("id"=>"flogin_name","class"=>"input check_email")));
        echo App::Load("Helper/Html")->get_from_row(App::Load("Helper/Html")->submitTag("data[Forgotlogin][button]","Send",array("class"=>"button")));
    ?>
    </ul>
</form>