<?php
/**
 * @name          : Joomla Social Pinboard
 * @version	  : 1.5.0
 * @package       : apptha
 * @since         : Joomla 1.5
 * @author        : Apptha - http://www.apptha.com
 * @copyright     : Copyright (C) 2011 Powered by Apptha
 * @license       : http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
 * @abstract      : Social Pinboard Component register view
 * @Creation Date : March 2013
 * @Modified Date : March 2013
 * */
// No direct Access
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$document = JFactory::getDocument();
//$document->addStyleSheet('components/com_wishlogue/css/edit.css');
$document->addStyleSheet('templates/wishlogue/html/com_wishlogue/css/login.css');
//$document->addStyleSheet('components/com_wishlogue/css/reset.css');
$document->addStyleSheet('templates/wishlogue/html/com_wishlogue/css/pinboard.css');
$document->addScript('components/com_wishlogue/javascript/registration.js');


$config = JFactory::getConfig();
$templateparams = $app->getTemplate(true)->params; // get the tempalte
$sitetitle = $templateparams->get('sitetitle');
if (isset($sitetitle)) {
    $document->setDescription($sitetitle);
    $document->setTitle($sitetitle);
} else {
    $sitetitle = $config->get('sitename');
    $document->setDescription($sitetitle);
    $document->setTitle($sitetitle);
}
?>
<script type="text/javascript">
    var enter_email="<?php echo JText::_('COM_WISHLOGUE_PLEASE_ENTER_THE_EMAIL'); ?>";
    var blocked_email="<?php echo JText::_('COM_WISHLOGUE_BLOCKED_EMAIL_ID'); ?>";
    var email_available="<?php echo JText::_('COM_WISHLOGUE_EMAIL_AVAILABLE'); ?>";
    var username_available="<?php echo JText::_('COM_WISHLOGUE_USERNAME_AVAILBALE'); ?>";
    var blocked_email="<?php echo JText::_('COM_WISHLOGUE_BLOCKED_EMAIL_ID'); ?>";
    var username_not_available="<?php echo JText::_('COM_WISHLOGUE_USERNAME_NOT_AVAILBALE'); ?>";
    var email_blocked="<?php echo JText::_('COM_WISHLOGUE_EMAIL_BLOCKED'); ?>";
    var enter_username="<?php echo JText::_('COM_WISHLOGUE_PLEASE_ENTER_THE_USERNAME'); ?>";
    var enter_valid_email="<?php echo JText::_('COM_WISHLOGUE_PLEASE_ENTER_THE_VALID_EMAIL'); ?>";
    var min_username_charecter="<?php echo JText::_('COM_WISHLOGUE_USER_SHOULD_HAVE_MINIMUM_SIX_CHARACTERS'); ?>";
    var username_wo_special_charecter="<?php echo JText::_('COM_WISHLOGUE_PLEASE_ENTER_THE_USERNAME_WITHOUT_SPECIAL_CHARACTERS'); ?>";
    var username_wo_space="<?php echo JText::_('COM_WISHLOGUE_PLEASE_ENTER_THE_USERNAME_WITHOUT_SPACE'); ?>";
    var firstname_wo_space="<?php echo JText::_('COM_WISHLOGUE_FIRST_NAME_CANNOT_BE_SPACE'); ?>";
    var lastname_wo_space="<?php echo JText::_('COM_WISHLOGUE_LAST_NAME_CANNOT_BE_SPACE'); ?>";
</script>

<title><?php echo JText::_('COM_WISHLOGUE_SOCIAL_PIN_BOARD'); ?></title>

<style type="text/css">
    .banner_box{display: none;}
</style>

<div id="wrapper">
    <script type="text/javascript" src="<?php echo $this->baseurl ?>/components/com_wishlogue/javascript/jquery.min.js"></script>
    <style> #error-to1 , #error-to-email {color: #008000; font-size: 13px;  font-family: "helvetica neue",arial,sans-serif;word-wrap: break-word;}
        #error-to-false ,#error-to-email-false  {color: #FF1900; font-size: 13px;  font-family: "helvetica neue",arial,sans-serif;word-wrap: break-word;}
    </style>
</div>

<form action="<?php echo JRoute::_('index.php?option=com_wishlogue&view=register'); ?>" method="post" enctype="multipart/form-data" name="uploadphotos">
    <div class="register_page clearfix">
        <div class="social_sign_up ">
                <?php
                $modules = JModuleHelper::getModules('wishlogue_login');
                foreach ($modules as $module) {
                    echo JModuleHelper::renderModule($module);
                }
                ?>

                <div class="inset twitter_login">
                    <a class="tw login_button" style="margin:0 0;" href="<?php echo JRoute::_('index.php?option=com_wishlogue&view=login_twitter', false); ?>">
                        <div class="logo_wrapper"><span class="logo"></span></div>
                        <span><?php echo JText::_('COM_WISHLOGUE_SIGNUP_WITH_TWITTER'); ?></span>
                    </a>
                </div>
        </div>
        <h2 class="defaulttitle"><?php echo JText::_('COM_WISHLOGUE_SIGN_UP'); ?></h2>
        <ul class="registerform clearfix">
              <li>
                    <label><?php echo JText::_('COM_WISHLOGUE_EMAIL'); ?> <em style="color:#FF1900">*</em></label>
                    <div class="input-type">
                        <input type="text" tabindex="1" name="email" autocomplete="off" value="" id="field1" onblur="return checkEmail();" onkeyup="return checkEmail();"  />
                        <div style="display: none" id="email_help1"> <span  class="help_text"><?php echo JText::_('COM_WISHLOGUE_FIELD_REQUIRED'); ?></span></div>
                        <div id="error-to-email"></div>
                        <div id="error-email-false" class="help_text"></div>
                    </div>
                </li>

                <li>
                    <label><?php echo JText::_('COM_WISHLOGUE_USER_NAME'); ?> <em style="color:#FF1900">*</em></label>
                    <div class="input-type">
                        <input type="text" tabindex="2" name="username" value="" id="field4" autocomplete="off" onblur="return checkusername();" onkeyup="return checkusername();"  />
                        <div id="error-to1"></div>
                        <div id="error-to-false" class="help_text"></div>
                        <div style="display: none" id="email_help4"><span class="help_text"><?php echo JText::_('COM_WISHLOGUE_FIELD_REQUIRED'); ?></span></div>
                    </div>
                </li>

                <li class="clearclass">
                    <label><?php echo JText::_('COM_WISHLOGUE_FIRST_NAME'); ?> <em style="color:#FF1900">*</em></label>
                    <div class="input-type">
                        <input type="text" tabindex="3"  name="first_name" value="" onblur="return valFirstName();" onkeyup="return valFirstName();" id="field2"/>
                        <div id="first_error-to-false" class="help_text"></div>
                        <div style="display: none" id="email_help2"> <span class="help_text"><?php echo JText::_('COM_WISHLOGUE_FIELD_REQUIRED'); ?></span></div>
                        <div style="display: none" id="first_name_error"><span   class="help_text"><?php echo JText::_('COM_WISHLOGUE_FIRST_NAME_CANNOT_BE_GREATER_THAN_THIRTY_CHARACTER'); ?></span></div>
                        <div style="display: none" id="first_name_space_error"><span class="help_text"><?php echo JText::_('COM_WISHLOGUE_FIRST_NAME_CANNOT_BE_SPACE'); ?></span></div>
                    </div>
                </li>

                <li>
                    <label><?php echo JText::_('COM_WISHLOGUE_LAST_NAME'); ?> <em style="color:#FF1900">*</em></label>
                    <div class="input-type">
                        <input type="text" tabindex="4" name="last_name" value="" onblur="return valLastName();" onkeyup="return valLastName();" id="field5" />
                        <div id="last_error-to-false" class="help_text"></div>
                        <div style="display: none" id="email_help5"> <span  class="help_text"><?php echo JText::_('COM_WISHLOGUE_FIELD_REQUIRED'); ?></span></div>
                        <div style="display: none" id="last_name_error"> <span class="help_text"><?php echo JText::_('COM_WISHLOGUE_LAST_NAME_CANNOT_BE_GREATER_THAN_THIRTY_CHARACTER'); ?></span></div>
                        <div style="display: none" id="last_name_space_error"><span  class="help_text"><?php echo JText::_('COM_WISHLOGUE_LAST_NAME_CANNOT_BE_SPACE'); ?></span></div>
                    </div>

                </li>

                <li class="clearclass">
                    <label><?php echo JText::_('COM_WISHLOGUE_PASSWORD'); ?> <em style="color:#FF1900">*</em></label>
                    <div class="input-type">
                        <input type="password" name="new_password" tabindex="5"  value="" id="field3" onblur="return valPasswordlength();" onkeyup="return valPasswordlength();" />
                         <div style="display: none" id="email_help3"> <span class="help_text"><?php echo JText::_('COM_WISHLOGUE_FIELD_REQUIRED'); ?></span></div>
                         <div style="display: none" id="password_error"> <span class="help_text"><?php echo JText::_('COM_WISHLOGUE_PASSWORD_CANNOT_BE_LESS_THAN_FIVE_CHARACTER'); ?></span></div>
                    </div>
                </li>
           
                <li>
                    <label><?php echo JText::_('COM_WISHLOGUE_CONFIRM_PASSWORD'); ?> <em style="color:#FF1900">*</em></label>
                    <div class="input-type">
                        <input type="password" tabindex="6" name="confirm_password" value="" id="field6" onblur="return valConfirmPassword();" onkeyup="return valConfirmPassword();"/>
                        <div style="display: none; " id="email_help6"> <span  class="help_text"><?php echo JText::_('COM_WISHLOGUE_FIELD_REQUIRED'); ?></span></div>
                        <div style="display: none" id="confirm_password_error"> <span class="help_text"><?php echo JText::_('COM_WISHLOGUE_CONFIRM_PASSWORD_CANNOT_BE_LESS_THAN_FIVE_CHARACTER'); ?></span></div>
                    </div>
                    <div style="display: none;" id="not_match"> <span class="help_text"><?php echo JText::_('COM_WISHLOGUE_PASSWORD_NOT_MATCH'); ?></span></div>
                </li>
        </ul>
        
        <div class="sign-submit">
            <input type="submit" onclick="return checkField();" value="<?php echo JText::_('COM_WISHLOGUE_SIGN_UP'); ?>" />
            <input type="hidden" value="registerComplete" id="registerComplete" name="registerComplete"  />
        </div>
    </div>
</form>