PageRenderTime 26ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/application/views/admin/user/useradd.php

https://gitlab.com/surya.ayrus22/Matrimony
PHP | 199 lines | 180 code | 16 blank | 3 comment | 29 complexity | 7c37a047d9ae1290ee4eed276a9ee1da MD5 | raw file
  1. <script src="<?php echo base_url() . 'assets/admin/js/register.js'; ?>"></script>
  2. <div id="page-wrapper">
  3. <div class="graphs bgimage" style="min-height:600px;">
  4. <content-top>
  5. <div class="content-top clearfix">
  6. <h1 class="al-title"><?php echo sprintf($this->lang->line('add'), $this->lang->line('profile_admin')); ?></h1>
  7. <ul class="breadcrumb al-breadcrumb">
  8. <li><a href="<?php echo base_url() . 'index.php/admin/dashboard'; ?>"><?php echo $this->lang->line('home'); ?></a></li>
  9. <li><a href="<?php echo base_url() . 'index.php/admin/UsersAddInfo'; ?>"><?php echo sprintf($this->lang->line('add'), $this->lang->line('users')); ?> </a></li>
  10. <li class=""><?php echo sprintf($this->lang->line('add'), $this->lang->line('member_admin_register')), $this->lang->line('profile_admin'); ?></li>
  11. </ul>
  12. </div>
  13. </content-top>
  14. <div class="col-md-9 box-content">
  15. <?php if (!empty($message)) { ?>
  16. <div class="alert alert-danger" style="margin-top:10px; text-align:center;"><?php echo $message; ?></div>
  17. <?php } ?>
  18. <!--col-md-4-->
  19. <form action="<?php echo base_url() . 'index.php/admin/userRegistration'; ?>" method="post">
  20. <div class="col-md-6 text-left margintop"><h3><?php echo sprintf($this->lang->line('add'), $this->lang->line('member_admin_register')), $this->lang->line('profile_admin'); ?></h3></div>
  21. <div class="col-md-10 text-left">
  22. <table class="table">
  23. <tbody>
  24. <tr class="opened">
  25. <td class="day_label"><?php echo sprintf($this->lang->line('search_profile_create'), $this->lang->line('by_text')); ?> </td>
  26. <td class="day_value">
  27. <select class="form-control" id="profile_created" name="profile_created" required >
  28. <option value=""> -- Select Profile for -- </option>
  29. <option value="myself">Myself</option>
  30. <option value="son">Son</option>
  31. <option value="daughter">Daughter</option>
  32. <option value="brother">Brother</option>
  33. <option value="sister">Sister</option>
  34. <option value="relative">Relative</option>
  35. <option value="friend">Friend</option>
  36. </select>
  37. </td>
  38. </tr>
  39. <tr class="opened">
  40. <td class="day_label"><label id="label_name"><?php echo $this->lang->line('register_profile_for_name'); ?> </label></td>
  41. <td class="day_value"><input type="text" id="username" name="username" class="form-control" required></td>
  42. </tr>
  43. <tr class="opened">
  44. <td class="day_label"><?php echo $this->lang->line('register_profile_for_gender'); ?> </td>
  45. <td class="day_value">
  46. <div class="">
  47. <div class="radio-inline"><label><input type="radio" name="gender" id="male" value="M"> Male</label></div>
  48. <div class="radio-inline"><label><input type="radio" name="gender" id="female" value="F" > Female</label></div>
  49. <input type="hidden" name="gender_hidden" id="gender_hidden" value="0" >
  50. </div>
  51. </td>
  52. </tr>
  53. <tr class="opened">
  54. <td class="day_label"><?php echo $this->lang->line('register_profile_for_dob'); ?> </td>
  55. <td class="day_value">
  56. <div class="col-md-4 dob"><select id="dobday" name="date" class="form-control input-sm" required></select></div>
  57. <div class="col-md-4 dob"><select id="dobmonth" name="month" class="form-control input-sm" required><div class="col-md-4 dob"></select></div>
  58. <div class="col-md-4 dob"><select id="dobyear" name="year" class="form-control input-sm" required><div class="col-md-4 dob"></select></div>
  59. </td>
  60. </tr>
  61. <tr class="opened_1">
  62. <td class="day_label"><?php echo $this->lang->line('register_profile_for_religion'); ?> </td>
  63. <td class="day_value">
  64. <select class="form-control" id="religion" name="religion" required >
  65. <!--<option value=""> -- Select Profile for -- </option>-->
  66. <option value="hindu">Hindu</option>
  67. </select>
  68. </td>
  69. </tr>
  70. <tr class="opened">
  71. <td class="day_label"><?php echo $this->lang->line('register_profile_for_tongue'); ?> </td>
  72. <td class="day_value">
  73. <select class="form-control" id="mother_tongue" name="mother_tongue" required>
  74. <option value="">- Select your Mother Tongue -</option>
  75. <option value="tamil">Tamil</option>
  76. <option value="bengali">Bengali</option>
  77. <option value="english">English</option>
  78. <option value="gujarati">Gujarati</option>
  79. <option value="hindi">Hindi</option>
  80. <option value="kannada">Kannada</option>
  81. <option value="konkani">Konkani</option>
  82. <option value="malayalam">Malayalam</option>
  83. <option value="marathi">Marathi</option>
  84. <option value="marwari">Marwari</option>
  85. <option value="oriya">Oriya</option>
  86. <option value="punjabi">Punjabi</option>
  87. <option value="sindhi">Sindhi</option>
  88. <option value="telugu">Telugu</option>
  89. <option value="urdu">Urdu
  90. <option value="others">Others</option></option>
  91. </select>
  92. </td>
  93. </tr>
  94. <tr class="opened">
  95. <td class="day_label"><?php echo $this->lang->line('register_profile_for_email'); ?> </td>
  96. <td class="day_value">
  97. <input type="text" style="text-transform: lowercase;" class="form-control" id="email" name="email" value="" placeholder="Email Id" onblur="emailavailablility()" required pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$" oninvalid="this.setCustomValidity('Please enter valid email format')" oninput="setCustomValidity('')">
  98. </td>
  99. </tr>
  100. <tr class="opened">
  101. <td class="day_label"><?php echo $this->lang->line('register_profile_for_password'); ?> </td>
  102. <td class="day_value">
  103. <input type="password" class="form-control" id="password" name="password" placeholder="Password" pattern=".{6,}" required oninvalid="this.setCustomValidity('Please enter password minimum 6 character')" oninput="setCustomValidity('')">
  104. </td>
  105. </tr>
  106. <tr class="opened">
  107. <td class="day_label"><?php echo sprintf($this->lang->line('mobile_admin_register'), $this->lang->line('number_admin_register')); ?> </td>
  108. <td class="day_value">
  109. <input type="text" class="form-control" title="Enter numbers only" maxlength="12" id="mobile" name="mobile" placeholder="Mobile Number" required oninvalid="this.setCustomValidity('Please enter mobile number')" oninput="setCustomValidity('')">
  110. </td>
  111. </tr>
  112. </tbody>
  113. </table>
  114. <div class=" text-right">
  115. <button type="submit" class="btn btn-primary" name="step1"><?php echo $this->lang->line('register_profile_for_next'); ?></button>
  116. <button class="btn btn-danger"><?php echo $this->lang->line('cancel_admin_register'); ?></button>
  117. </div>
  118. </div>
  119. </form>
  120. </div><!--row end-->
  121. <div class="clearfix"> </div>
  122. </div>
  123. <script>
  124. $(document).ready(function () {
  125. $.dobPicker({
  126. daySelector: '#dobday', /* Required */
  127. monthSelector: '#dobmonth', /* Required */
  128. yearSelector: '#dobyear', /* Required */
  129. dayDefault: 'DD', /* Optional */
  130. monthDefault: 'MM', /* Optional */
  131. yearDefault: 'YY', /* Optional */
  132. minimumAge: 18, /* Optional */
  133. maximumAge: 40 /* Optional */
  134. });
  135. });
  136. $("#profile_created").change(function () {
  137. var create = $(this).val();
  138. if (create == "son" || create == "brother") {
  139. $("#male").prop("checked", true);
  140. $("#male").prop("disabled", true);
  141. $("#female").prop("disabled", true);
  142. $("#gender_hidden").val("M");
  143. if (create == "son") {
  144. $("#label_name").html("Son's Name");
  145. } else {
  146. $("#label_name").html("Groom's Name");
  147. }
  148. }
  149. if (create == "daughter" || create == "sister") {
  150. $("#female").prop("checked", true);
  151. $("#male").prop("disabled", true);
  152. $("#female").prop("disabled", true)
  153. $("#gender_hidden").val("F");
  154. if (create == "daughter") {
  155. $("#label_name").html("Daughter's Name");
  156. } else {
  157. $("#label_name").html("Bride's Name");
  158. }
  159. }
  160. if (create == "myself" || create == "friend" || create == "relative") {
  161. $("#male").prop("disabled", false);
  162. $("#female").prop("disabled", false);
  163. $("#male").prop("checked", false);
  164. $("#female").prop("checked", false);
  165. $("#label_name").html("Name");
  166. $("#gender_hidden").val("");
  167. }
  168. return false;
  169. });
  170. $("#mobile").keypress(function (e) {
  171. //if the letter is not digit then display error and don't type anything
  172. if (e.which != 8 && e.which != 0 && ((e.which < 48) || (e.which > 57))) {
  173. //display error message
  174. // $("#mobile").html('<label for="mobile" class="error">Numbers Only</label>').show().fadeOut("slow");
  175. return false;
  176. }
  177. });
  178. </script>
  179. <style>
  180. label {
  181. font-weight: 700 !important;
  182. }
  183. </style>