new.jade 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  1. extends ../layout
  2. block scripts
  3. script(src="https://js.recurly.com/v3/recurly.js")
  4. script(type='text/javascript').
  5. window.recomendedCurrency = '#{currency}'
  6. window.countryCode = '#{countryCode}'
  7. window.plan_code = '#{plan_code}'
  8. window.recurlyApiKey = "!{settings.apis.recurly.publicKey}"
  9. window.couponCode = "#{couponCode}"
  10. block content
  11. - locals.supressDefaultJs = true
  12. script(data-main=jsPath+'main.js', src=jsPath+'libs/require.js', baseurl=jsPath)
  13. .content.content-alt
  14. .container(ng-controller="NewSubscriptionController" ng-cloak)
  15. .row.card-group
  16. .col-md-5.col-md-push-4
  17. .card.card-highlighted
  18. .page-header
  19. .row
  20. .col-xs-9
  21. h2 {{planName}}
  22. .col-xs-3
  23. div.dropdown.changePlanButton.pull-right(ng-cloak, dropdown)
  24. a.btn.btn-default.dropdown-toggle(
  25. href="#",
  26. data-toggle="dropdown",
  27. dropdown-toggle
  28. )
  29. | {{currencyCode}} ({{plans[currencyCode]['symbol']}})
  30. span.caret
  31. ul.dropdown-menu(role="menu")
  32. li(ng-repeat="(currency, value) in plans")
  33. a(
  34. ng-click="changeCurrency(currency)",
  35. ) {{currency}} ({{value['symbol']}})
  36. hr.thin
  37. .row
  38. .col-md-12.text-center
  39. div(ng-if="trialLength")
  40. span !{translate("first_few_days_free", {trialLen:'{{trialLength}}'})}
  41. span(ng-if="discountMonths && discountRate")   - {{discountMonths}} #{translate("month")}s {{discountRate}}% Off
  42. div(ng-if="price")
  43. strong {{price.currency.symbol}}{{price.next.total}}
  44. span(ng-if="monthlyBilling") #{translate("every")} #{translate("month")}
  45. span(ng-if="!monthlyBilling") #{translate("every")} #{translate("year")}
  46. div(ng-if="normalPrice")
  47. span.small Normally {{price.currency.symbol}}{{normalPrice}}
  48. .row
  49. .col-md-12
  50. form(ng-show="planName")
  51. .row
  52. .col-md-12
  53. .form-group
  54. .row
  55. .col-md-6
  56. label.radio-inline
  57. input.paymentTypeOption(type="radio",value="credit_card", ng-model="paymentMethod")
  58. i.fa.fa-cc-mastercard.fa-3x
  59. span  
  60. i.fa.fa-cc-visa.fa-3x
  61. .col-md-6
  62. label.radio-inline
  63. input.paymentTypeOption(type="radio", value="paypal", ng-model="paymentMethod")
  64. i.fa.fa-cc-paypal.fa-3x
  65. .alert.alert-warning.small(ng-show="genericError")
  66. strong {{genericError}}
  67. span(ng-hide="paymentMethod == 'paypal'")
  68. .row
  69. .col-md-12
  70. .form-group
  71. div.alert.alert-warning.small(ng-hide="validation.correctCvv") #{translate("invalid")} CVV
  72. div.alert.alert-warning.small(ng-hide="validation.correctCardNumber") #{translate("invalid")} #{translate("credit_card_number")}
  73. .row
  74. .col-md-6
  75. .form-group(ng-class="validation.number == false || validation.errorFields.number ? 'has-error' : ''")
  76. input.form-control(ng-model='data.number', ng-blur="validateCardNumber()", placeholder="#{translate('credit_card_number')}")
  77. .col-md-3
  78. .form-group(ng-class="validation.correctCvv == false || validation.errorFields.cvv ? 'has-error' : ''")
  79. input.form-control(ng-model='data.cvv', ng-blur="validateCvv()", placeholder="CVV")
  80. .row
  81. .col-md-12
  82. div.alert.alert-warning.small(ng-hide="validation.correctExpiry") #{translate("invalid")} #{translate("expiry")}
  83. .row
  84. .col-md-3
  85. .form-group(ng-class="validation.correctExpiry == false || validation.errorFields.month ? 'has-error' : ''")
  86. select.form-control(data-recurly='month', ng-change="validateExpiry()", ng-model='data.month')
  87. option(value="", disabled, selected) Month
  88. option(value="01") 01
  89. option(value="02") 02
  90. option(value="03") 03
  91. option(value="04") 04
  92. option(value="05") 05
  93. option(value="06") 06
  94. option(value="07") 07
  95. option(value="08") 08
  96. option(value="09") 09
  97. option(value="10") 10
  98. option(value="11") 11
  99. option(value="12") 12
  100. .col-md-3
  101. .form-group(ng-class="validation.correctExpiry == false || validation.errorFields.year ? 'has-error' : ''")
  102. select.form-control(data-recurly='year', ng-change="validateExpiry()", ng-model='data.year')
  103. option(value="", disabled, selected) Year
  104. option(value="2015") 2015
  105. option(value="2016") 2016
  106. option(value="2017") 2017
  107. option(value="2018") 2018
  108. option(value="2019") 2019
  109. option(value="2020") 2020
  110. option(value="2021") 2021
  111. option(value="2022") 2022
  112. option(value="2023") 2023
  113. option(value="2024") 2024
  114. option(value="2025") 2025
  115. option(value="2026") 2026
  116. .row
  117. .col-md-6
  118. .form-group(ng-class="validation.errorFields.first_name ? 'has-error' : ''")
  119. input.form-control(type='text', value='', maxlength='255', , onkeyup='', data-recurly="first_name", ng-model="data.first_name", required, placeholder="#{translate('first_name')}")
  120. .col-md-6
  121. .form-group(ng-class="validation.errorFields.last_name ? 'has-error' : ''")
  122. input.form-control(type='text', value='', maxlength='255', onkeyup='', data-recurly="last_name", ng-model="data.last_name", required, placeholder="#{translate('last_name')}")
  123. hr
  124. .row
  125. .col-md-12
  126. .form-group(ng-class="validation.errorFields.address1 ? 'has-error' : ''")
  127. label #{translate("billing_address")}
  128. input.form-control(type='text', value='', maxlength='255', onkeyup='', ng-model="data.address1", placeholder="#{translate('address')}")
  129. .form-group(ng-class="validation.errorFields.address2 ? 'has-error' : ''")
  130. input.form-control(type='text', value='', maxlength='255', onkeyup='', ng-model="data.address2", placeholder="#{translate('address')}")
  131. .form-group(ng-class="validation.errorFields.state ? 'has-error' : ''")
  132. input.form-control(type='text', value='', maxlength='255', onkeyup='', ng-model="data.state", placeholder="#{translate('state')}")
  133. .row
  134. .col-md-7
  135. .form-group(ng-class="validation.errorFields.city ? 'has-error' : ''")
  136. input.form-control(type='text', value='', maxlength='255', onkeyup='', data-recurly="city", ng-model="data.city", placeholder="#{translate('city')}")
  137. .col-md-5(ng-class="validation.errorFields.postal_code ? 'has-error' : ''")
  138. input.form-control(type='text', value='', maxlength='255', onkeyup='', data-recurly="postal_code", ng-model="data.postal_code", placeholder="#{translate('zip_post_code')}")
  139. .row
  140. .col-md-7
  141. .form-group(ng-class="validation.errorFields.country ? 'has-error' : ''")
  142. select.form-control(data-recurly="country", ng-model="data.country", ng-change="updateCountry()", required)
  143. mixin countries_options()
  144. .row
  145. .col-md-8
  146. if (showCouponField)
  147. .form-group
  148. input.form-control(type='text', ng-blur="applyCoupon()", ng-model="data.coupon", placeholder="#{translate('coupon')}")
  149. .row
  150. .col-md-8
  151. if (showVatField)
  152. .form-group
  153. input.form-control(type='text', ng-blur="applyVatNumber()", ng-model="data.vat_number", placeholder="#{translate('vat_number')}")
  154. .row
  155. .col-xs-7
  156. .form-group
  157. button.btn.btn-success(ng-click="submit()", ng-disabled="processing", sixpack-convert="payment-left-menu-bottom") #{translate("upgrade_now")}
  158. .col-xs-3.pricingBreakdown
  159. div(ng-if="price.next.subtotal != price.next.total") Subtotal
  160. div(ng-if="price.next.tax!='0.00'") Tax
  161. div
  162. strong Total
  163. .col-xs-2
  164. div(ng-if="price.next.subtotal != price.next.total").pull-right {{price.currency.symbol}}{{price.next.subtotal}}
  165. div(ng-if="price.next.tax!='0.00'").pull-right {{price.currency.symbol}}{{price.next.tax}}
  166. div.pull-right
  167. strong {{price.currency.symbol}}{{price.next.total}}
  168. span(sixpack-switch="payment-left-menu-bottom")
  169. .col-md-3.col-md-pull-4(sixpack-default)
  170. if showStudentPlan == 'true'
  171. a.btn-primary.btn.plansPageStudentLink(
  172. href,
  173. ng-click="switchToStudent()"
  174. ) #{translate("half_price_student")}
  175. .card.card-first
  176. .paymentPageFeatures
  177. .page-header
  178. h3 #{translate("features")}
  179. h3 #{translate("unlimited_projects")}
  180. p #{translate("create_unlimited_projects")}
  181. h3
  182. if plan.features.collaborators == -1
  183. - var collaboratorCount = 'Unlimited'
  184. else
  185. - var collaboratorCount = plan.features.collaborators
  186. | #{translate("collabs_per_proj", {collabcount:collaboratorCount})}
  187. p #{translate("work_on_single_version")}. #{translate("view_collab_edits")} in real time.
  188. h3 #{translate("full_doc_history")}
  189. p #{translate("see_what_has_been")}
  190. span.added #{translate("added")}
  191. | #{translate("and")}
  192. span.removed #{translate("removed")}.
  193. | #{translate("restore_to_any_older_version")}.
  194. h3 #{translate("sync_to_dropbox")}
  195. p
  196. | #{translate("acces_work_from_anywhere")}.
  197. | #{translate("work_offline_and_sync_with_dropbox")}.
  198. hr
  199. p.small.text-center We're confident that you'll love ShareLaTeX, but if not you can cancel anytime. We'll give you your money back, no questions asked, if you let us know within 30 days.
  200. .col-md-3.col-md-pull-4(sixpack-when="bolder")
  201. if showStudentPlan == 'true'
  202. a.btn-primary.btn.plansPageStudentLink(
  203. href,
  204. ng-click="switchToStudent()"
  205. ) #{translate("half_price_student")}
  206. .card.card-first
  207. .paymentPageFeatures
  208. .page-header
  209. h2 #{translate("features")}
  210. h3
  211. i.fa.fa-check  
  212. | #{translate("unlimited_projects")}
  213. h3
  214. i.fa.fa-check  
  215. if plan.features.collaborators == -1
  216. - var collaboratorCount = 'Unlimited'
  217. else
  218. - var collaboratorCount = plan.features.collaborators
  219. | #{translate("collabs_per_proj", {collabcount:collaboratorCount})}
  220. h3
  221. i.fa.fa-check  
  222. | #{translate("full_doc_history")}
  223. h3
  224. i.fa.fa-check  
  225. | #{translate("sync_to_dropbox")}
  226. h3
  227. i.fa.fa-check  
  228. | #{translate("sync_to_github")}
  229. h3
  230. i.fa.fa-check  
  231. | #{translate("Compile Larger Projects")}
  232. hr
  233. h2.text-center 30 Day Guarantee
  234. hr
  235. span                  
  236. a(href="https://www.positivessl.com" style="font-family: arial; font-size: 10px; color: #212121; text-decoration: none;")
  237. img(src="https://www.positivessl.com/images-new/PositiveSSL_tl_trans.png" alt="SSL Certificate" title="SSL Certificate" border="0")
  238. div(style="font-family: arial;font-weight:bold;font-size:15px;color:#86BEE0;")
  239. a(href="https://www.positivessl.com" style="color:#86BEE0; text-decoration: none;")
  240. script(type="text/javascript").
  241. ga('send', 'event', 'pageview', 'payment_form', "#{plan_code}")
  242. mixin countries_options()
  243. option(value='', disabled, selected) #{translate("country")}
  244. option(value='-') --------------
  245. option(value='AF') Afghanistan
  246. option(value='AL') Albania
  247. option(value='DZ') Algeria
  248. option(value='AS') American Samoa
  249. option(value='AD') Andorra
  250. option(value='AO') Angola
  251. option(value='AI') Anguilla
  252. option(value='AQ') Antarctica
  253. option(value='AG') Antigua and Barbuda
  254. option(value='AR') Argentina
  255. option(value='AM') Armenia
  256. option(value='AW') Aruba
  257. option(value='AC') Ascension Island
  258. option(value='AU') Australia
  259. option(value='AT') Austria
  260. option(value='AZ') Azerbaijan
  261. option(value='BS') Bahamas
  262. option(value='BH') Bahrain
  263. option(value='BD') Bangladesh
  264. option(value='BB') Barbados
  265. option(value='BE') Belgium
  266. option(value='BZ') Belize
  267. option(value='BJ') Benin
  268. option(value='BM') Bermuda
  269. option(value='BT') Bhutan
  270. option(value='BO') Bolivia
  271. option(value='BA') Bosnia and Herzegovina
  272. option(value='BW') Botswana
  273. option(value='BV') Bouvet Island
  274. option(value='BR') Brazil
  275. option(value='BQ') British Antarctic Territory
  276. option(value='IO') British Indian Ocean Territory
  277. option(value='VG') British Virgin Islands
  278. option(value='BN') Brunei
  279. option(value='BG') Bulgaria
  280. option(value='BF') Burkina Faso
  281. option(value='BI') Burundi
  282. option(value='KH') Cambodia
  283. option(value='CM') Cameroon
  284. option(value='CA') Canada
  285. option(value='IC') Canary Islands
  286. option(value='CT') Canton and Enderbury Islands
  287. option(value='CV') Cape Verde
  288. option(value='KY') Cayman Islands
  289. option(value='CF') Central African Republic
  290. option(value='EA') Ceuta and Melilla
  291. option(value='TD') Chad
  292. option(value='CL') Chile
  293. option(value='CN') China
  294. option(value='CX') Christmas Island
  295. option(value='CP') Clipperton Island
  296. option(value='CC') Cocos [Keeling] Islands
  297. option(value='CO') Colombia
  298. option(value='KM') Comoros
  299. option(value='CD') Congo [DRC]
  300. option(value='CK') Cook Islands
  301. option(value='CR') Costa Rica
  302. option(value='HR') Croatia
  303. option(value='CU') Cuba
  304. option(value='CY') Cyprus
  305. option(value='CZ') Czech Republic
  306. option(value='DK') Denmark
  307. option(value='DG') Diego Garcia
  308. option(value='DJ') Djibouti
  309. option(value='DM') Dominica
  310. option(value='DO') Dominican Republic
  311. option(value='NQ') Dronning Maud Land
  312. option(value='TL') East Timor
  313. option(value='EC') Ecuador
  314. option(value='EG') Egypt
  315. option(value='SV') El Salvador
  316. option(value='EE') Estonia
  317. option(value='ET') Ethiopia
  318. option(value='FK') Falkland Islands [Islas Malvinas]
  319. option(value='FO') Faroe Islands
  320. option(value='FJ') Fiji
  321. option(value='FI') Finland
  322. option(value='FR') France
  323. option(value='GF') French Guiana
  324. option(value='PF') French Polynesia
  325. option(value='TF') French Southern Territories
  326. option(value='FQ') French Southern and Antarctic Territories
  327. option(value='GA') Gabon
  328. option(value='GM') Gambia
  329. option(value='GE') Georgia
  330. option(value='DE') Germany
  331. option(value='GH') Ghana
  332. option(value='GI') Gibraltar
  333. option(value='GR') Greece
  334. option(value='GL') Greenland
  335. option(value='GD') Grenada
  336. option(value='GP') Guadeloupe
  337. option(value='GU') Guam
  338. option(value='GT') Guatemala
  339. option(value='GG') Guernsey
  340. option(value='GW') Guinea-Bissau
  341. option(value='GY') Guyana
  342. option(value='HT') Haiti
  343. option(value='HM') Heard Island and McDonald Islands
  344. option(value='HN') Honduras
  345. option(value='HK') Hong Kong
  346. option(value='HU') Hungary
  347. option(value='IS') Iceland
  348. option(value='IN') India
  349. option(value='ID') Indonesia
  350. option(value='IE') Ireland
  351. option(value='IM') Isle of Man
  352. option(value='IL') Israel
  353. option(value='IT') Italy
  354. option(value='JM') Jamaica
  355. option(value='JP') Japan
  356. option(value='JE') Jersey
  357. option(value='JT') Johnston Island
  358. option(value='JO') Jordan
  359. option(value='KZ') Kazakhstan
  360. option(value='KE') Kenya
  361. option(value='KI') Kiribati
  362. option(value='KW') Kuwait
  363. option(value='KG') Kyrgyzstan
  364. option(value='LA') Laos
  365. option(value='LV') Latvia
  366. option(value='LS') Lesotho
  367. option(value='LY') Libya
  368. option(value='LI') Liechtenstein
  369. option(value='LT') Lithuania
  370. option(value='LU') Luxembourg
  371. option(value='MO') Macau
  372. option(value='MK') Macedonia [FYROM]
  373. option(value='MG') Madagascar
  374. option(value='MW') Malawi
  375. option(value='MY') Malaysia
  376. option(value='MV') Maldives
  377. option(value='ML') Mali
  378. option(value='MT') Malta
  379. option(value='MH') Marshall Islands
  380. option(value='MQ') Martinique
  381. option(value='MR') Mauritania
  382. option(value='MU') Mauritius
  383. option(value='YT') Mayotte
  384. option(value='FX') Metropolitan France
  385. option(value='MX') Mexico
  386. option(value='FM') Micronesia
  387. option(value='MI') Midway Islands
  388. option(value='MD') Moldova
  389. option(value='MC') Monaco
  390. option(value='MN') Mongolia
  391. option(value='ME') Montenegro
  392. option(value='MS') Montserrat
  393. option(value='MA') Morocco
  394. option(value='MZ') Mozambique
  395. option(value='NA') Namibia
  396. option(value='NR') Nauru
  397. option(value='NP') Nepal
  398. option(value='NL') Netherlands
  399. option(value='AN') Netherlands Antilles
  400. option(value='NT') Neutral Zone
  401. option(value='NC') New Caledonia
  402. option(value='NZ') New Zealand
  403. option(value='NI') Nicaragua
  404. option(value='NE') Niger
  405. option(value='NG') Nigeria
  406. option(value='NU') Niue
  407. option(value='NF') Norfolk Island
  408. option(value='VD') North Vietnam
  409. option(value='MP') Northern Mariana Islands
  410. option(value='NO') Norway
  411. option(value='OM') Oman
  412. option(value='QO') Outlying Oceania
  413. option(value='PC') Pacific Islands Trust Territory
  414. option(value='PK') Pakistan
  415. option(value='PW') Palau
  416. option(value='PS') Palestinian Territories
  417. option(value='PA') Panama
  418. option(value='PZ') Panama Canal Zone
  419. option(value='PY') Paraguay
  420. option(value='YD') People's Democratic Republic of Yemen
  421. option(value='PE') Peru
  422. option(value='PH') Philippines
  423. option(value='PN') Pitcairn Islands
  424. option(value='PL') Poland
  425. option(value='PT') Portugal
  426. option(value='PR') Puerto Rico
  427. option(value='QA') Qatar
  428. option(value='RO') Romania
  429. option(value='RU') Russia
  430. option(value='RW') Rwanda
  431. option(value='RE') Réunion
  432. option(value='BL') Saint Barthélemy
  433. option(value='SH') Saint Helena
  434. option(value='KN') Saint Kitts and Nevis
  435. option(value='LC') Saint Lucia
  436. option(value='MF') Saint Martin
  437. option(value='PM') Saint Pierre and Miquelon
  438. option(value='VC') Saint Vincent and the Grenadines
  439. option(value='WS') Samoa
  440. option(value='SM') San Marino
  441. option(value='SA') Saudi Arabia
  442. option(value='SN') Senegal
  443. option(value='RS') Serbia
  444. option(value='CS') Serbia and Montenegro
  445. option(value='SC') Seychelles
  446. option(value='SL') Sierra Leone
  447. option(value='SG') Singapore
  448. option(value='SK') Slovakia
  449. option(value='SI') Slovenia
  450. option(value='SB') Solomon Islands
  451. option(value='ZA') South Africa
  452. option(value='GS') South Georgia and the South Sandwich Islands
  453. option(value='KR') South Korea
  454. option(value='ES') Spain
  455. option(value='LK') Sri Lanka
  456. option(value='SR') Suriname
  457. option(value='SJ') Svalbard and Jan Mayen
  458. option(value='SZ') Swaziland
  459. option(value='SE') Sweden
  460. option(value='CH') Switzerland
  461. option(value='ST') São Tomé and Príncipe
  462. option(value='TW') Taiwan
  463. option(value='TJ') Tajikistan
  464. option(value='TZ') Tanzania
  465. option(value='TH') Thailand
  466. option(value='TG') Togo
  467. option(value='TK') Tokelau
  468. option(value='TO') Tonga
  469. option(value='TT') Trinidad and Tobago
  470. option(value='TA') Tristan da Cunha
  471. option(value='TN') Tunisia
  472. option(value='TR') Turkey
  473. option(value='TM') Turkmenistan
  474. option(value='TC') Turks and Caicos Islands
  475. option(value='TV') Tuvalu
  476. option(value='UM') U.S. Minor Outlying Islands
  477. option(value='PU') U.S. Miscellaneous Pacific Islands
  478. option(value='VI') U.S. Virgin Islands
  479. option(value='UG') Uganda
  480. option(value='UA') Ukraine
  481. option(value='AE') United Arab Emirates
  482. option(value='GB') United Kingdom
  483. option(value='US') United States
  484. option(value='UY') Uruguay
  485. option(value='UZ') Uzbekistan
  486. option(value='VU') Vanuatu
  487. option(value='VA') Vatican City
  488. option(value='VE') Venezuela
  489. option(value='VN') Vietnam
  490. option(value='WK') Wake Island
  491. option(value='WF') Wallis and Futuna
  492. option(value='EH') Western Sahara
  493. option(value='YE') Yemen
  494. option(value='ZM') Zambia
  495. option(value='AX') Åland Islands