Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if (!Mage::getSingleton('customer/session')->isLoggedIn()): ?>
- <div id="ajaxlogin-login-window" style="display: none;">
- <div class="page-title">
- <span><?php echo $this->__('Login into your Account 4') ?></span>
- </div>
- <form action="<?php echo $this->getUrl('example/amasty/createSimpleProductAndRedirect', array('_secure'=>(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS']==='on'), 'id' => Mage::registry('current_product')->getId())) ?>">
- <div class="content">
- <ul class="form-list">
- <li>
- <input type="hidden" id="likeproduct_id" name="product_id" value=""/>
- <label for="email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
- <div class="input-box">
- <input type="text" name="login[username]" value="<?php echo $this->htmlEscape($this->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" />
- </div>
- </li>
- <li>
- <label for="pass" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
- <div class="input-box">
- <input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />
- </div>
- </li>
- <?php echo $this->getChildHtml('form.additional.info'); ?>
- </ul>
- </div>
- <div class="buttons-set">
- <button type="button" class="button" onclick="setproductregisteration();" title="<?php echo $this->__('Register') ?>" name="noaccount" id="noaccount"><span><span><?php echo $this->__('Register') ?></span></span></button>
- <button type="submit" class="button" title="<?php echo $this->__('Login') ?>" name="send" id="send2"><span><span><?php echo $this->__('Login') ?></span></span></button>
- <div class="progress-indicator">
- <span class="please-wait" id="login-please-wait" style="display:none;">
- <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" class="v-middle" alt=""/>
- </span>
- </div>
- <a href="<?php echo $this->getForgotPasswordUrl() ?>" class="f-left ajaxlogin-forgot"><?php echo $this->__('Forgot Your Password?') ?></a>
- </div>
- </form>
- <script type="text/javascript">
- //<![CDATA[
- var ajaxLoginForm = new VarienForm('ajaxlogin-login-form', true);
- jQuery("#ajaxlogin-login-form").submit(function(e) {
- e.preventDefault();
- if (myForm.validator.validate()) {
- jQuery.ajax({
- type: "POST",
- url: jQuery('#ajaxlogin-login-form').attr('action'),
- }).done(function(result) {
- alert(result);
- }).fail(function() {
- alert('There is some error saving your design.');
- });
- }
- });
- //]]>
- </script>
- </div>
- <?php endif; ?>
- <script type="text/javascript">
- function setproductlogin(pid)
- {
- document.getElementById("likeproduct_id").value=pid;
- jQuery("#productlistlogin").trigger("click");
- }
- function setproductregisteration()
- {
- var pid=document.getElementById("likeproduct_id").value;
- document.getElementById("likeproductreg_id").value=pid;
- }
- document.observe("dom:loaded", function() {
- var triggers = {
- login: {
- el : $$('.ajaxlogin-login'),
- event : 'click',
- window: $('ajaxlogin-login-window'),
- size: {
- maxWidth: 300
- }
- },
- create: {
- el : $$('#noaccount'),
- event : 'click',
- window: $('ajaxlogin-create-window')
- },
- forgot: {
- el : $$('.ajaxlogin-forgot'),
- event : 'click',
- window: $('ajaxlogin-forgot-window'),
- size: {
- maxWidth: 300
- }
- },
- logout: {
- el : $$('.ajaxlogin-logout'),
- event : 'click',
- window: $('ajaxlogin-logout-window'),
- size: {
- maxWidth: 300
- }
- }
- };
- ajaxLoginWindow = new AjaxLogin({
- triggers: triggers
- });
- });
- </script>
Add Comment
Please, Sign In to add comment