Guest User

Untitled

a guest
Jan 18th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.52 KB | None | 0 0
  1. <div class="users form">
  2. <?php
  3. echo $this->Form->create('User', array (
  4. 'type' => 'post',
  5. 'inputDefaults' => array (
  6. 'div' => false
  7. )
  8. )
  9. );
  10. ?>
  11. <script>
  12. $(document).ready(function() {
  13. $('#UserFirstName').focus();
  14. });
  15. </script>
  16. <fieldset>
  17. <legend></legend>
  18. <h2>Registration</h2>
  19. <?php
  20. echo $this->Form->input('firstName');
  21. echo '<div class='clear'></div>';
  22. echo $this->Form->input('lastName');
  23. echo '<div class='clear'></div>';
  24. echo $this->Form->input('username');
  25. echo '<div class='clear'></div>';
  26. echo $this->Form->input('password', array ('class' => 'short'));
  27. echo '<div class='clear'></div>';
  28. echo $this->Form->input('password_confirm', array('type' => 'password', 'label' => 'Confirm Password: ', 'class' => 'short'));
  29. echo '<div class='clear'></div>';
  30. echo $this->Form->input('email', array('label' => 'Email: ', 'default' => $email));
  31. echo '<div class='clear'></div>';
  32. echo $this->Form->input('id', array('label' => 'id: ', 'type' => 'hidden', 'default' => 37));
  33. $qmark = $this->Html->image('qmark.png', array('height' => 15));
  34. echo '<div class='clear'></div>';
  35. echo $this->Form->input('number', array('label' => 'Number:', 'class' => 'short', 'after' => $qmark));
  36. echo '<div class='clear'></div>';
  37. ?>
  38.  
  39. echo $this->Form->input('number', array('label' => 'Number:', 'class' => 'short', 'after' => $qmark));
  40.  
  41. <input type="button" id="btnSignUp" value="SignUp" />
  42. <div id="popup">
  43. <div id="popupinfo">
  44. <p> Now, your registration form has been loaded...! </p>
  45. <p> You have field your required fields and submit form.</p>
  46. <p class="button"><a href="javascript:void(0);">OK</a></p>
  47. </div>
  48. </div>
  49. <div id="registerDiv">
  50. <p class="required">Fields with Mark (*) are required fields </p>
  51. <form name="frmregister" id="frmregister" method="post" action="#registerDiv">
  52. <table cellpadding="0" cellspacing="0" class="table" border="0">
  53. <tr>
  54. <td>*Name:</td>
  55. <td><input type="text" class="input" size="17" /></td>
  56. </tr>
  57. <tr>
  58. <td>*Username:</td>
  59. <td><input type="text" class="input" size="17" /></td>
  60. </tr>
  61. <tr>
  62. <td>*Password:</td>
  63. <td><input type="password" class="input" size="17" /></td>
  64. </tr>
  65. <tr>
  66. <td>*Confirm Password:</td>
  67. <td><input type="password" class="input" size="17" /></td>
  68. </tr>
  69. <tr>
  70. <td>Email:</td>
  71. <td><input type="text" class="input" size="17" /></td>
  72. </tr>
  73. <tr>
  74. <td colspan="2">&nbsp;</td>
  75. </tr>
  76. <tr>
  77. <td colspan="2" align="center"><input type="submit" value="Register" id="btnsubmit" /></td>
  78. </tr>
  79. </table>
  80. </form>
  81. </div>
  82.  
  83. .input{
  84. border:1px solid #333;
  85. }
  86. .required{
  87. color:red;
  88. font-size:12px;
  89. }
  90.  
  91. #registerDiv{
  92. display:none;
  93. margin-top:10px;
  94. margin-left:20px;
  95. border:2px solid #333;
  96. padding:3px;
  97. background:#cdcdcd;
  98. width:280px;
  99. text-align:center;
  100. }
  101. #popup{
  102. display:none;
  103. padding:10px;
  104. background:#969696;
  105. position:absolute;
  106. top:25%;
  107. left:25%;
  108. z-index: 99999;
  109. opacity:100%;
  110.  
  111. }
  112. #popupinfo{
  113. padding:2px;
  114. text-align:center;
  115. background:#cfcfcf;
  116. }
  117. #popupinfo p{
  118. font-size:14px;
  119. }
  120.  
  121. #popupinfo .button {
  122. text-align:center;
  123. }
  124. #popupinfo .button a{
  125. text-decoration:none;
  126. border:1px solid #333;
  127. width:20px;
  128. padding:5px;
  129. background:#1A1A1A;
  130. color:#eee;
  131. }
  132.  
  133. #popupinfo .button a:hover{
  134. background:#eee;
  135. color:#1a1a1a;
  136. }
  137.  
  138. #mask{
  139.  
  140. background: #000;
  141. position: fixed;
  142. left: 0;
  143. top: 0;
  144. z-index: 10;
  145. width: 100%;
  146. height: 100%;
  147. opacity: 0.8;
  148. z-index: 999;
  149.  
  150. }
  151.  
  152. $(function() {
  153. $("#btnSignUp").click(function() {
  154. $("#registerDiv").fadeIn(300);
  155. $("body").append("<div id='mask'></div>");
  156. $("#mask").fadeIn(300);
  157. $("#popup").fadeIn(300);
  158. });
  159. $("#popup .button a").click(function() {
  160. $("#popup").fadeOut(300, function() {
  161. $("#mask").remove();
  162. });
  163. $("#frmregister").find("input:first").focus();
  164. });
  165. });
  166.  
  167. $(document).ready(function() {
  168.  
  169. $('input[name="number"]').click(function() {
  170.  
  171. alert('Display your popup here...'); // maybe you should use another js library for popup
  172. });
  173. });
  174.  
  175. $('input[name="number"]').click(function() {
  176. // Your code here
  177.  
  178. }
  179.  
  180. <a href="#"></a>
  181.  
  182. $("#button").click(function(e){
  183. e.preventDefault();
  184. $("#popup").show();
  185. });
  186.  
  187. visible:none;
Add Comment
Please, Sign In to add comment