create.blade.php 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
  7. <meta name="csrf-token" content="{{ csrf_token() }}">
  8. <meta property="og:image" itemprop="image" content="https://admin.meemapp.net/public/assets/images/meem_meta.png"> <title>meem</title>
  9. <meta name="description" content="meem food ordering system">
  10. <meta property="og:type" content="website" />
  11. <!-- Favicon Icon -->
  12. <link rel="icon" type="image/png" href="{!! env('APP_ASSETS') !!}images/favicon.ico">
  13. <link rel="apple-touch-icon" sizes="128x128" href="{!! env('APP_ASSETS') !!}images/favicon.ico">
  14. <link rel="shortcut icon" sizes="128x128" href="{!! env('APP_ASSETS') !!}images/favicon.ico">
  15. <!-- Feather Icon-->
  16. <link href="{!! env('APP_ASSETS') !!}css/vendors_css.css" rel="stylesheet" type="text/css">
  17. <!-- Fontawesome Icon-->
  18. <link href="{!! env('APP_ASSETS') !!}css/style.css" rel="stylesheet" type="text/css">
  19. <link href="{!! env('APP_ASSETS') !!}css/style_new.css" rel="stylesheet" type="text/css">
  20. <style>
  21. .user-section{
  22. max-width: 440px; margin: 0 auto; width: 100%;
  23. }
  24. .register-form{
  25. display: -webkit-box;
  26. display: -ms-flexbox;
  27. display: flex;
  28. -webkit-box-align: center;
  29. -ms-flex-align: center;
  30. align-items: center;
  31. -webkit-box-flex: 1;
  32. -ms-flex: 1 0 500px;
  33. flex: 1 0 500px;
  34. max-width: 100%;
  35. padding: 3vmax 2.5vmax;
  36. min-height: 100vh;
  37. }
  38. .form-control, .form-select {
  39. height: 46px !important;
  40. border-color: #E4E6EB !important;
  41. border-radius: 7px !important;
  42. }
  43. label.error{
  44. color: #F00;
  45. }
  46. .alert{
  47. display: none;
  48. }
  49. </style>
  50. </head>
  51. <body class="light-skin sidebar-mini theme-primary fixed">
  52. <div class="wrapper" style="overflow-y: auto !important">
  53. <div class="row">
  54. <div class="col-md-6 register-form">
  55. @if(isset($user))
  56. @csrf
  57. <div class="user-section">
  58. <form id="create-user" action="{!! env('APP_URL') !!}create/user" method="POST" enctype="multipart/form-data">
  59. @csrf
  60. <input type="hidden" name="invite_id" value="{!! request()->route('id') !!}">
  61. <h3 class="mb-50"><img src="{!! env('APP_ASSETS') !!}images/logo-dashboard.png" style="margin-right: 10px;" />Meem</h3>
  62. <strong>{!! $resto->name !!}</strong> has invited you to Meem. Add your personal info below to sign up.
  63. <h3 class="mt-30 mb-15">Create account</h3>
  64. <div class="row">
  65. <div class="col-md-6">
  66. <div class="form-group">
  67. <label>First Name <span class="mandatory">*</span></label>
  68. <input type="text" class="form-control" required name="first_name" placeholder="Enter your first name" />
  69. </div>
  70. </div>
  71. <div class="col-md-6">
  72. <div class="form-group">
  73. <label>Last Name <span class="mandatory">*</span></label>
  74. <input type="text" class="form-control" name="last_name" required placeholder="Enter your last name" />
  75. </div>
  76. </div>
  77. </div>
  78. <div class="row">
  79. <div class="col-md-4">
  80. <div class="form-group">
  81. <label>Country Code <span class="mandatory">*</span></label>
  82. <select class="form-control" name="country_code">
  83. <option value="964">+964</option>
  84. <option value="971">+971</option>
  85. </select>
  86. </div>
  87. </div>
  88. <div class="col-md-8">
  89. <div class="form-group">
  90. <label>Mobile Number <span class="mandatory">*</span></label>
  91. <input type="text" class="form-control" name="mobile_number" required placeholder="Enter your mobile" />
  92. </div>
  93. </div>
  94. </div>
  95. <div class="row">
  96. <div class="col-md-12">
  97. <label>Email <span class="mandatory">*</span></label>
  98. <input type="text" class="form-control" name="email" value="{!! isset($user)?$user->email:"" !!}" readonly required placeholder="Enter your mobile" />
  99. </div>
  100. </div>
  101. <div class="row mt-10">
  102. <div class="col-md-12">
  103. <label>Create Password <span class="mandatory">*</span></label>
  104. <input type="password" class="form-control" id="password" name="password" required placeholder="*********" />
  105. </div>
  106. </div>
  107. <div class="row mt-10">
  108. <div class="col-md-12">
  109. <label>Confirm your Password <span class="mandatory">*</span></label>
  110. <input type="password" class="form-control" id="confirm_password" name="confirm_password" required placeholder="********" />
  111. </div>
  112. </div>
  113. <div class="row mt-10">
  114. <div class="col-sm-12">
  115. <div class="alert alert-success"></div>
  116. <div class="alert alert-danger"></div>
  117. </div>
  118. </div>
  119. <div class="row mt-10">
  120. <div class="col-md-12 text-center">
  121. <button class="btn btn-primary w-100 create-user" style="width: 100% !important;">Create User</button>
  122. </div>
  123. </div>
  124. </form>
  125. </div>
  126. @else
  127. <div class="user-section text-center">
  128. <p class="text-danger">Invitation link is expired.</p>
  129. </div>
  130. @endif
  131. </div>
  132. <div class="col-md-6" style="background: #ffab00;">
  133. </div>
  134. </div>
  135. </div>
  136. </body>
  137. <script src="{!! env('APP_ASSETS') !!}js/vendors.min.js"></script>
  138. <script src="{!! env('APP_ASSETS') !!}js/jquery.validate.min.js"></script>
  139. <script src="{!! env('APP_ASSETS') !!}js/jquery.form.js"></script>
  140. <script type="text/javascript">
  141. $(function(){
  142. $('#create-user').validate({
  143. rules : {
  144. password : {
  145. minlength : 8
  146. },
  147. confirm_password : {
  148. minlength : 8,
  149. equalTo : "#password"
  150. }
  151. }
  152. });
  153. $("body").on("click",".create-user",function(e){
  154. if($("#create-user").valid()){
  155. $("#create-user").ajaxForm(function(response){
  156. response = $.parseJSON(response);
  157. if(response){
  158. if(response.type=="success"){
  159. $(".alert-success").html(response.message);
  160. $(".alert-success").show();
  161. setTimeout(function(){
  162. if(response.role=="staff")
  163. window.location = "{!! env('APP_URL') !!}orders";
  164. else
  165. window.location = "{!! env('APP_URL') !!}dashboard";
  166. },2500);
  167. }else{
  168. $(".alert-danger").html(response.message);
  169. $(".alert-danger").show();
  170. }
  171. }
  172. }).submit();
  173. }
  174. e.preventDefault();
  175. });
  176. })
  177. </script>
  178. </head>