form_wizard.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. <!-- start: PAGE TITLE -->
  2. <section id="page-title">
  3. <div class="row">
  4. <div class="col-sm-8">
  5. <h1 class="mainTitle" translate="sidebar.nav.forms.WIZARD">{{ mainTitle }}</h1>
  6. <span class="mainDescription">Using simple Angular.js guidelines you can turn a form into a multi-step form wizard</span>
  7. </div>
  8. <div ncy-breadcrumb></div>
  9. </div>
  10. </section>
  11. <!-- end: PAGE TITLE -->
  12. <!-- start: WIZARD DEMO -->
  13. <div class="container-fluid container-fullw bg-white">
  14. <div class="row">
  15. <div class="col-md-12">
  16. <h5 class="over-title margin-bottom-15">Wizard <span class="text-bold">demo</span></h5>
  17. <p>
  18. Some textboxes in this example is required.
  19. </p>
  20. <!-- /// controller: 'WizardCtrl' - localtion: assets/js/controllers/wizardCtrl.js /// -->
  21. <div ng-controller="WizardCtrl">
  22. <!-- start: WIZARD FORM -->
  23. <form name="Form" id="form" novalidate>
  24. <div id="wizard" class="swMain">
  25. <!-- start: WIZARD SEPS -->
  26. <ul>
  27. <li ng-click="form.goTo(Form, 1)">
  28. <a href ng-class="{'selected' : currentStep >= 1, 'done' : currentStep > 1}">
  29. <div class="stepNumber">
  30. 1
  31. </div>
  32. <span class="stepDesc text-small"> Personal Information </span>
  33. </a>
  34. </li>
  35. <li ng-click="form.goTo(Form, 2)">
  36. <a href ng-class="{'selected' : currentStep >= 2, 'done' : currentStep > 2}">
  37. <div class="stepNumber">
  38. 2
  39. </div>
  40. <span class="stepDesc text-small"> Create an account </span>
  41. </a>
  42. </li>
  43. <li ng-click="form.goTo(Form, 3)">
  44. <a href ng-class="{'selected' : currentStep >= 3, 'done' : currentStep > 3}">
  45. <div class="stepNumber">
  46. 3
  47. </div>
  48. <span class="stepDesc text-small"> Billing details </span>
  49. </a>
  50. </li>
  51. <li ng-click="form.goTo(Form, 4)">
  52. <a href ng-class="{'selected' : currentStep >= 4, 'done' : currentStep > 4}">
  53. <div class="stepNumber">
  54. 4
  55. </div>
  56. <span class="stepDesc text-small"> Complete </span>
  57. </a>
  58. </li>
  59. </ul>
  60. <!-- end: WIZARD SEPS -->
  61. <!-- start: WIZARD STEP 1 -->
  62. <div id="step-1" ng-show="currentStep == 1">
  63. <div class="row">
  64. <div class="col-md-5">
  65. <div class="padding-30">
  66. <h2 class="StepTitle"><i class="ti-face-smile fa-2x text-primary block margin-bottom-10"></i> Enter your personal information</h2>
  67. <p>
  68. This is an added measure against fraud and to help with billing issues.
  69. </p>
  70. <p class="text-small">
  71. Enter security questions in case you lose access to your account.
  72. </p>
  73. </div>
  74. </div>
  75. <div class="col-md-7">
  76. <fieldset>
  77. <legend>
  78. Personal Information
  79. </legend>
  80. <div class="row">
  81. <div class="col-md-6">
  82. <div class="form-group" ng-class="{'has-error':Form.firstName.$dirty && Form.firstName.$invalid, 'has-success':Form.firstName.$valid}">
  83. <label>
  84. First Name <span class="symbol required"></span>
  85. </label>
  86. <input type="text" placeholder="Enter your First Name" class="form-control" name="firstName" ng-model="myModel.firstName" ng-required="currentStep == 1"/>
  87. <span class="error text-small block" ng-if="Form.firstName.$dirty && Form.firstName.$invalid">First Name is required</span>
  88. <span class="success text-small" ng-if="Form.firstName.$valid">Thank You!</span>
  89. </div>
  90. </div>
  91. <div class="col-md-6">
  92. <div class="form-group" ng-class="{'has-error':Form.lastName.$dirty && Form.lastName.$invalid, 'has-success':Form.lastName.$valid}">
  93. <label class="control-label">
  94. Last Name <span class="symbol required"></span>
  95. </label>
  96. <input type="text" placeholder="Enter your Last Name" class="form-control" name="lastName" ng-model="myModel.lastName" ng-required="currentStep == 1" />
  97. <span class="error text-small block" ng-if="Form.lastName.$dirty && Form.lastName.$invalid">Last Name is required</span>
  98. <span class="success text-small" ng-if="Form.lastName.$valid">Wonderful!</span>
  99. </div>
  100. </div>
  101. </div>
  102. <div class="row">
  103. <div class="col-md-6">
  104. <div class="form-group">
  105. <label class="block">
  106. Gender
  107. </label>
  108. <div class="clip-radio radio-primary">
  109. <input type="radio" id="wz-female" name="gender" value="female" ng-model="myModel.gender">
  110. <label for="wz-female">
  111. Female
  112. </label>
  113. <input type="radio" id="wz-male" name="gender" value="male" ng-model="myModel.gender">
  114. <label for="wz-male">
  115. Male
  116. </label>
  117. </div>
  118. </div>
  119. </div>
  120. <div class="col-md-6">
  121. <div class="form-group">
  122. <label>
  123. Choose your country or region
  124. </label>
  125. <select class="form-control" name="country" ng-model="myModel.country">
  126. <option value="">&nbsp;</option>
  127. <option value="AL">Alabama</option>
  128. <option value="AK">Alaska</option>
  129. <option value="AZ">Arizona</option>
  130. <option value="AR">Arkansas</option>
  131. <option value="CA">California</option>
  132. <option value="CO">Colorado</option>
  133. <option value="CT">Connecticut</option>
  134. <option value="DE">Delaware</option>
  135. <option value="FL">Florida</option>
  136. <option value="GA">Georgia</option>
  137. <option value="HI">Hawaii</option>
  138. <option value="ID">Idaho</option>
  139. <option value="IL">Illinois</option>
  140. <option value="IN">Indiana</option>
  141. <option value="IA">Iowa</option>
  142. <option value="KS">Kansas</option>
  143. <option value="KY">Kentucky</option>
  144. <option value="LA">Louisiana</option>
  145. <option value="ME">Maine</option>
  146. <option value="MD">Maryland</option>
  147. <option value="MA">Massachusetts</option>
  148. <option value="MI">Michigan</option>
  149. <option value="MN">Minnesota</option>
  150. <option value="MS">Mississippi</option>
  151. <option value="MO">Missouri</option>
  152. <option value="MT">Montana</option>
  153. <option value="NE">Nebraska</option>
  154. <option value="NV">Nevada</option>
  155. <option value="NH">New Hampshire</option>
  156. <option value="NJ">New Jersey</option>
  157. <option value="NM">New Mexico</option>
  158. <option value="NY">New York</option>
  159. <option value="NC">North Carolina</option>
  160. <option value="ND">North Dakota</option>
  161. <option value="OH">Ohio</option>
  162. <option value="OK">Oklahoma</option>
  163. <option value="OR">Oregon</option>
  164. <option value="PA">Pennsylvania</option>
  165. <option value="RI">Rhode Island</option>
  166. <option value="SC">South Carolina</option>
  167. <option value="SD">South Dakota</option>
  168. <option value="TN">Tennessee</option>
  169. <option value="TX">Texas</option>
  170. <option value="UT">Utah</option>
  171. <option value="VT">Vermont</option>
  172. <option value="VA">Virginia</option>
  173. <option value="WA">Washington</option>
  174. <option value="WV">West Virginia</option>
  175. <option value="WI">Wisconsin</option>
  176. <option value="WY">Wyoming</option>
  177. </select>
  178. </div>
  179. </div>
  180. </div>
  181. <p>
  182. <a href popover="Your personal information is not required for unlawful purposes, but only in order to proceed in this tutorial" popover-placement="top" popover-title="Don't worry!">
  183. Why do you need my personal information?
  184. </a>
  185. </p>
  186. </fieldset>
  187. <fieldset>
  188. <legend>
  189. Security question
  190. </legend>
  191. <p>
  192. Enter security questions in case you lose access to your account. <span class="text-small block">Be sure to pick questions that you will remember the answers to.</span>
  193. </p>
  194. <accordion close-others="oneAtATime" class="accordion">
  195. <accordion-group is-open="question1.open">
  196. <accordion-heading>
  197. What was the name of your first stuffed animal? <i class="pull-right" ng-class="{'ti-angle-down': question1.open, 'ti-angle-right': !question1.open}"></i>
  198. </accordion-heading>
  199. <div class="form-group">
  200. <input type="text" class="form-control" name="stuffedAnimal" ng-model="myModel.stuffedAnimal" placeholder="Enter the the name of your first stuffed animal">
  201. </div>
  202. </accordion-group>
  203. <accordion-group is-open="question2.open">
  204. <accordion-heading>
  205. What is your grandfather's first name? <i class="pull-right" ng-class="{'ti-angle-down': question2.open, 'ti-angle-right': !question2.open}"></i>
  206. </accordion-heading>
  207. <div class="form-group">
  208. <input type="text" class="form-control" name="grandfatherName" ng-model="myModel.grandfatherName" placeholder="Enter your grandfather's first name">
  209. </div>
  210. </accordion-group>
  211. <accordion-group is-open="question3.open">
  212. <accordion-heading>
  213. In what city your grandmother live? <i class="pull-right" ng-class="{'ti-angle-down': question3.open, 'ti-angle-right': !question3.open}"></i>
  214. </accordion-heading>
  215. <div class="form-group">
  216. <input type="text" class="form-control" name="grandmotherCity" ng-model="myModel.grandmotherCity" placeholder="Enter your grandfather's first name">
  217. </div>
  218. </accordion-group>
  219. </accordion>
  220. </fieldset>
  221. <div class="form-group">
  222. <button class="btn btn-primary btn-o next-step btn-wide pull-right" ng-click="form.next(Form)">
  223. Next <i class="fa fa-arrow-circle-right"></i>
  224. </button>
  225. </div>
  226. </div>
  227. </div>
  228. </div>
  229. <!-- end: WIZARD STEP 1 -->
  230. <!-- start: WIZARD STEP 2 -->
  231. <div id="step-2" ng-show="currentStep == 2">
  232. <div class="row">
  233. <div class="col-md-5">
  234. <div class="padding-30">
  235. <h2 class="StepTitle">Create an account <span class="text-large block">to manage everything you do with ng-Clip</span></h2>
  236. <p>
  237. You’ll enjoy personal services and great benefits including:
  238. </p>
  239. <p class="text-small">
  240. <ul class="no-margin">
  241. <li>
  242. Access to exclusive releases and limited products.
  243. </li>
  244. <li>
  245. ng-Clip services, benefits and promotions.
  246. </li>
  247. </ul>
  248. </p>
  249. </div>
  250. </div>
  251. <div class="col-md-7">
  252. <fieldset>
  253. <legend>
  254. Account Credential
  255. </legend>
  256. <div class="form-group" ng-class="{'has-error':Form.email.$dirty && Form.email.$invalid, 'has-success':Form.email.$valid}">
  257. <label class="control-label">
  258. Email <span class="symbol required"></span>
  259. </label>
  260. <input type="email" placeholder="Enter a valid E-mail" class="form-control" name="email" ng-model="myModel.email" ng-required="currentStep == 2">
  261. <span class="error text-small block" ng-if="Form.email.$dirty && Form.email.$error.required">Email is required.</span>
  262. <span class="error text-small block" ng-if="Form.email.$error.email">Please, enter a valid email address.</span>
  263. <span class="success text-small" ng-if="Form.email.$valid">It's a valid e-mail!</span>
  264. </div>
  265. <div class="row">
  266. <div class="col-md-6">
  267. <div class="form-group" ng-class="{'has-error':Form.password.$dirty && Form.password.$invalid, 'has-success':Form.password.$valid}">
  268. <label class="control-label">
  269. Password <span class="symbol required"></span>
  270. </label>
  271. <span class="error text-small block" ng-if="Form.password.$dirty && Form.password.$error.required">Password is required.</span>
  272. <span class="success text-small block" ng-if="Form.password.$valid">Ok!</span>
  273. </div>
  274. </div>
  275. <div class="col-md-6">
  276. <div class="form-group" ng-class="{'has-error':Form.password2.$dirty && Form.password2.$error.compareTo || Form.password2.$dirty && Form.password2.$invalid, 'has-success':Form.password2.$valid}">
  277. <label class="control-label">
  278. Repeat Password <span class="symbol required"></span>
  279. </label>
  280. <span class="error text-small block" ng-if="Form.password2.$dirty && Form.password2.$error.required">Repeat password is required!</span>
  281. <span class="error text-small block" ng-if="Form.password2.$dirty && Form.password2.$error.compareTo">Passwords do not match!</span>
  282. <span class="success text-small block" ng-if="Form.password2.$valid">Passwords match!</span>
  283. </div>
  284. </div>
  285. </div>
  286. </fieldset>
  287. <div class="form-group">
  288. <button class="btn btn-primary btn-o back-step btn-wide pull-left" ng-click="form.prev(Form)">
  289. <i class="fa fa-circle-arrow-left"></i> Back
  290. </button>
  291. <button class="btn btn-primary btn-o next-step btn-wide pull-right" ng-click="form.next(Form)">
  292. Next <i class="fa fa-arrow-circle-right"></i>
  293. </button>
  294. </div>
  295. </div>
  296. </div>
  297. </div>
  298. <!-- end: WIZARD STEP 2 -->
  299. <!-- start: WIZARD STEP 3 -->
  300. <div id="step-3" ng-show="currentStep == 3">
  301. <div class="row">
  302. <div class="col-md-5">
  303. <div class="padding-30">
  304. <h2 class="StepTitle">Enter billing details</h2>
  305. <p class="text-large">
  306. You will need to enter your billing address and select your payment method.
  307. </p>
  308. <p class="text-small">
  309. You can use most major credit card, as well as PayPal.
  310. </p>
  311. </div>
  312. </div>
  313. <div class="col-md-7">
  314. <fieldset>
  315. <legend>
  316. Payment Method
  317. </legend>
  318. <label>
  319. Payment type
  320. </label>
  321. <div class="form-group">
  322. <div class="btn-group">
  323. <label class="btn btn-primary btn-sm" ng-model="myModel.paymentMethod" btn-radio="'creditcard'">
  324. <i class="fa fa-cc-visa" ></i> <i class="fa fa-cc-mastercard" ></i> Credit Card
  325. </label>
  326. <label class="btn btn-primary btn-sm" ng-model="myModel.paymentMethod" btn-radio="'paypal'">
  327. <i class="fa fa-cc-paypal" ></i> PayPal
  328. </label>
  329. </div>
  330. </div>
  331. <div class="form-group">
  332. <label>
  333. Card Number
  334. </label>
  335. <input type="text" class="form-control" name="cardNumber" ng-model="myModel.cardNumber" placeholder="Enter Your Card Number">
  336. </div>
  337. <label>
  338. Expires
  339. </label>
  340. <div class="row">
  341. <div class="col-md-4 col-sm-6">
  342. <div class="form-group">
  343. <select class="cs-select cs-skin-slide" ng-model="myModel.expiresMonth">
  344. <option value="" disabled>Month</option>
  345. <option value="January">January</option>
  346. <option value="February">February</option>
  347. <option value="March">March</option>
  348. <option value="April">April</option>
  349. <option value="May">May</option>
  350. <option value="June">June</option>
  351. <option value="July">July</option>
  352. <option value="August">August</option>
  353. <option value="September">September</option>
  354. <option value="October">October</option>
  355. <option value="November">November</option>
  356. <option value="December">December</option>
  357. </select>
  358. </div>
  359. </div>
  360. <div class="col-md-4 col-sm-6">
  361. <div class="form-group">
  362. <select class="cs-select cs-skin-slide" ng-model="myModel.expiresYear">
  363. <option value="" disabled>Year</option>
  364. <option value="2015">2015</option>
  365. <option value="2016">2016</option>
  366. <option value="2017">2017</option>
  367. <option value="2018">2018</option>
  368. <option value="2019">2019</option>
  369. <option value="2020">2020</option>
  370. </select>
  371. </div>
  372. </div>
  373. </div>
  374. <div class="row">
  375. <div class="col-xs-12">
  376. <label>
  377. Security code
  378. </label>
  379. <div class="row">
  380. <div class="col-xs-3">
  381. <div class="form-group">
  382. <input type="text" class="form-control" name="securityCode" placeholder="Security code" ng-model="myModel.securityCode">
  383. </div>
  384. </div>
  385. <span class="help-inline col-xs-4"> <a href popover="The security code is a three-digit number on the back of your credit card, immediately following your main card number." popover-placement="top" popover-title="How to find the security code"><i class="ti-help-alt text-large text-primary"></i></a> </span>
  386. </div>
  387. </div>
  388. </div>
  389. </fieldset>
  390. <div class="form-group">
  391. <button class="btn btn-primary btn-o back-step btn-wide pull-left" ng-click="form.prev(Form)">
  392. <i class="fa fa-circle-arrow-left"></i> Back
  393. </button>
  394. <button class="btn btn-primary btn-o next-step btn-wide pull-right" ng-click="form.next(Form)">
  395. Next <i class="fa fa-arrow-circle-right"></i>
  396. </button>
  397. </div>
  398. </div>
  399. </div>
  400. </div>
  401. <!-- end: WIZARD STEP 3 -->
  402. <!-- start: WIZARD STEP 4 -->
  403. <div id="step-4" ng-show="currentStep == 4">
  404. <div class="row">
  405. <div class="col-md-12">
  406. <div class="text-center">
  407. <h1 class=" ti-check block text-primary"></h1>
  408. <h2 class="StepTitle">Congratulations!</h2>
  409. <p class="text-large">
  410. Your tutorial is complete.
  411. </p>
  412. <p class="text-small">
  413. Thank you for your registration. Your transaction has been completed, and a receipt for your purchase has been emailed to you. You may log into your account to view details of this transaction.
  414. </p>
  415. <a class="btn btn-primary btn-o" href ng-click="form.goTo(Form, 1)">
  416. Back to first step
  417. </a>
  418. </div>
  419. </div>
  420. </div>
  421. </div>
  422. <!-- end: WIZARD STEP 4 -->
  423. </div>
  424. <pre class="code margin-top-20">{{ myModel | json }}</pre>
  425. </form>
  426. <!-- end: WIZARD FORM -->
  427. </div>
  428. </div>
  429. </div>
  430. </div>
  431. <!-- start: WIZARD DEMO -->