Advertisement
wingman007

PHP_ZF2_register.phtml

Apr 2nd, 2014
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.02 KB | None | 0 0
  1. <?php
  2. // prepare the headers stylesheets
  3. $this->headLink()->appendStylesheet($this->basePath('assets/css/pages/page_log_reg_v1.css'));
  4.  
  5. $script = 'jQuery(document).ready(function() {' . PHP_EOL;
  6. $script .= '    App.init();' . PHP_EOL;
  7. $script .= '});' . PHP_EOL;
  8. $this->inlineScript()->appendScript($script);
  9.  
  10. $form = $this->form;
  11. $form->setAttribute('action', $this->url('registration'));
  12. $form->setAttribute('class', 'reg-page');
  13. $form->prepare();
  14.  
  15. // Get the form label plugin
  16. $formLabel = $this->plugin('formLabel');
  17. ?>
  18.  
  19. <?php echo $this->partial('csn-user/index/breadcrumbs-partial', array(
  20.     'title' => 'Registration')); ?>
  21.  
  22. <!--=== Content Part ===-->
  23. <div class="container">
  24.     <div class="row">
  25.         <div class="col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
  26.             <!-- form class="reg-page" -->
  27.             <?php echo $this->form()->openTag($form); ?>
  28.                 <div class="reg-header">
  29.                     <h2>Register a new account</h2>
  30.                     <p>Already Signed Up? Click <a href="<?php echo $this->url('login');?>" class="color-green">Sign In</a> to login your account.</p>                    
  31.                 </div>
  32.  
  33.                 <!-- label>First Name</label>
  34.                 <input type="text" class="form-control margin-bottom-20" -->
  35.                 <?php
  36.                     $element = $form->get('username');
  37.                     $element->setAttribute('class', 'form-control margin-bottom-20');
  38.                     $element->setLabel('User Name'); // First Name
  39.                     $element->removeAttribute('placeholder');
  40.                    
  41.                     echo $formLabel->openTag();
  42.                     echo $element->getLabel(); // $element->getOption('label'); - doesn't work 4 some reason
  43.                     echo ' <span class="color-red">*</span>';
  44.                     echo $formLabel->closeTag();
  45.                     echo $this->formInput($element);
  46.                     echo $this->formElementErrors($element);
  47.                     // or but I don't have control on the display
  48.                     // echo $this->formRow($element);
  49.                 ?>
  50.  
  51.                 ...
  52.  
  53.                 <div class="row">
  54.                     <div class="col-lg-6">
  55.                         <label class="checkbox">
  56.                             <!-- input type="checkbox">
  57.                             I read <a href="page_terms.html" class="color-green">Terms and Conditions</a -->
  58.                         </label>                        
  59.                     </div>
  60.                     <div class="col-lg-6 text-right">
  61.                         <!-- button class="btn-u" type="submit">Register</button -->
  62.                         <?php
  63.                             $element = $form->get('submit');
  64.                             // $element->setLabel($element->getAttribute('placeholder'));
  65.                             $element->setValue('Register');
  66.                             $element->removeAttribute('placeholder');
  67.                             $element->removeAttribute('style');
  68.                             $element->setAttribute('class', 'btn-u');
  69.                            
  70.                             echo $this->formSubmit($form->get('submit'));
  71.                         ?>                     
  72.                     </div>
  73.                 </div>
  74.             <?php echo $this->form()->closeTag(); ?>
  75.             <!-- /form -->
  76.         </div>
  77.     </div>
  78. </div><!--/container-->    
  79. <!--=== End Content Part ===-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement