Registration working until workshops

This commit is contained in:
Godwin
2015-08-04 21:54:04 -07:00
parent bbebefd6bf
commit 9da5f6a223
27 changed files with 1159 additions and 206 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

+4
View File
@@ -1,5 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg">
<defs>
<symbol id="bb-house" viewBox="20 20 60 50"><path d="M57.9 29.9v-5h6.3v9.4l13.2 9.1 -6.2 0.7V67.9h-4.8 -30H31.5V43.4h-7l26.1-18.5L57.9 29.9zM56.8 58.3v-5.5h-4.8v5.5H56.8zM56.8 52V46.5h-4.8v5.5H56.8zM50.6 58.3v-5.5h-4.8v5.5H50.6zM50.6 52V46.5h-4.8v5.5H50.6z"></path></symbol>
<symbol id="bb-tent" viewBox="0 0 100 100"><path fill-rule="evenodd" clip-rule="evenodd" d="M36.2 95.8c-4 0-7.9 0-11.9 0 0-0.6 0-1.2 0-1.8 0-9.4 0-18.9 0-28.3 0-2 0-2-2.1-2 -5.2 0-10.4 0-15.6 0 -0.4 0-0.9 0-1.6-0.1 3.4-6 6.8-11.8 10.3-17.9 -1.4 0-2.6 0-4.1 0 2.6-4.5 5-8.7 7.5-13.1 -1.1 0-2 0-3.2 0C20.7 23.6 25.7 14.8 30.9 5.8c5.2 9 10.2 17.8 15.4 26.7 -0.9 0.1-1.6 0.1-2.7 0.1 2.5 4.3 4.9 8.5 7.4 12.9 -1.2 0.1-2.2 0.1-3.6 0.2 3.4 6 6.8 11.8 10.2 17.9 -0.8 0-1.3 0.1-1.8 0.1 -5.9 0-11.8 0-17.6 0 -2 0-2 0-2 2 0 9.4 0 18.9 0 28.3C36.2 94.5 36.2 95 36.2 95.8zM43.3 95.9c1.9-7.9 3.8-15.7 5.8-23.4 0.4-1.5 0.4-2.9 0-4.3 -0.2-0.7-0.3-1.4-0.5-2.1 0.1 0 0.3-0.1 0.4-0.1 0.2 0.7 0.5 1.4 0.8 2.3 0.3-0.9 0.6-1.5 0.8-2.1 0.1 0 0.3 0.1 0.4 0.1 -0.2 1.1-0.5 2.3-0.7 3.5 12.2 0 24.3 0 36.5 0 -0.2-1.2-0.5-2.4-0.7-3.6 0.1 0 0.2-0.1 0.4-0.1 0.2 0.6 0.5 1.1 0.8 1.9 0.3-0.8 0.6-1.4 0.8-2.1 0.2 0.1 0.4 0.1 0.5 0.2 -0.4 1.3-0.8 2.6-1.2 3.8 -0.2 0.6-0.7 1.1-0.9 1.7 -1.9 7.7-3.8 15.5-5.7 23.3 -0.2 0.8-0.5 1.2-1.5 1.2 -11.7 0-23.4 0-35.1 0C44 96 43.8 95.9 43.3 95.9zM88.5 69.7c2.1 8.6 4.3 17.3 6.5 26 -4.2 0-8.3 0-12.7 0 2-8.7 3.9-17.4 5.9-26C88.3 69.8 88.4 69.7 88.5 69.7z"/></symbol>
<symbol id="bb-none" viewBox="0 0 100 100"><path d="M50 17c-18.2 0-33 14.8-33 33S31.8 83 50 83 83 68.2 83 50 68.2 17 50 17zM50 23.9c5.8 0 11.1 1.9 15.4 5.1L29 65.4c-3.2-4.3-5.1-9.6-5.1-15.4C23.9 35.6 35.6 23.9 50 23.9zM50 76.1c-5.3 0-10.2-1.6-14.3-4.3l36.1-36.1c2.7 4.1 4.3 9 4.3 14.3C76.1 64.4 64.4 76.1 50 76.1z"></path></symbol>
<symbol id="bb-bike" viewBox="0 0 100 58.526"><path d="M98.88 38.35L100 38.3c-0.67-10.46-9.37-18.74-20-18.74 -3.3 0-6.41 0.8-9.15 2.21l-4.57-8.05 1.21-2.69c0.25 0.05 0.47 0.08 0.65 0.08 1.18 0 5.17-3.63 4.41-5.58 -0.33-0.84-2.26-0.04-4.67 0.47 -0.54 0.11-2.19 0.1-3.15 0 -2.23-0.24-4.19-0.76-4.57 0.26 -0.45 1.23 2.61 3.07 5.18 4.1l-0.65 1.45H32.19l0.97-2.71 -0.26-0.09 1.49-4.15L34.34 4.84l0 0c-0.6-0.21-1.92-0.88-2.21-1.64 -0.06-0.17-0.12-0.45 0.13-0.88 0.47-0.81 4.49-0.83 8.6-0.06L41.18 0.6c-2.08-0.39-8.99-1.49-10.37 0.86 -0.45 0.77-0.54 1.57-0.26 2.32 0.31 0.85 1.05 1.48 1.74 1.92l-0.98 2.74 -0.26-0.09L26.49 21.04c-2.33-0.95-4.89-1.48-7.57-1.48 -1.02 0-2.01 0.08-2.99 0.22l0.18 1.11C7 22.25 0 30.11 0 39.6c0 10.45 8.47 18.92 18.92 18.92 7.83 0 14.55-4.75 17.43-11.53l1.03 0.45c1.02-2.41 1.59-5.06 1.59-7.84 0-7.59-4.22-14.19-10.44-17.6l0.99-2.76 18.15 20.15c-0.65 0.89-1.04 1.98-1.04 3.17 0 2.99 2.42 5.41 5.41 5.41 0.22 0 0.44-0.02 0.65-0.04l0.85 3.23h-1.23v2.25h4.8v-2.25h-1.82L54.31 47.48c1.77-0.82 3.02-2.58 3.12-4.63l3.87-0.41c1.37 9.11 9.22 16.09 18.7 16.09 10.45 0 18.92-8.47 18.92-18.92 0-0.42-0.02-0.84-0.05-1.26C98.88 38.35 98.88 38.35 98.88 38.35zM34.48 39.6c0 8.59-6.96 15.55-15.55 15.55S3.37 48.19 3.37 39.6c0-8.59 6.96-15.55 15.55-15.55 2.27 0 4.43 0.49 6.38 1.37l-2.56 7.13 -3.01 4.62c-0.25-0.08-0.51-0.14-0.79-0.14 -1.42 0-2.56 1.15-2.56 2.56 0 1.42 1.15 2.57 2.57 2.57 1.42 0 2.57-1.15 2.57-2.56 0-0.52-0.16-1.01-0.43-1.41l3.13-4.8 2.6-7.19C31.4 28.91 34.48 33.89 34.48 39.6zM53.19 37.28c-0.37-0.08-0.76-0.13-1.15-0.13 -0.19 0-0.37 0.01-0.55 0.03l-0.95-3.61h1.37v-2.25h-4.79v2.25h1.68l1.07 4.05c-0.18 0.08-0.35 0.18-0.52 0.28L30.38 16.85l1-2.79h32.28L53.19 37.28zM60 40.88l-2.74 0.29c-0.32-1.2-1.05-2.24-2.02-2.96l10.19-22.59 3.96 6.98c-5.66 3.54-9.43 9.83-9.43 17C59.96 40.03 59.98 40.46 60 40.88zM64.45 39.6c0-5.49 2.85-10.32 7.15-13.09l6.26 11.03c-0.4 0.41-0.67 0.93-0.78 1.52l-12.62 1.34C64.46 40.14 64.45 39.87 64.45 39.6zM80 55.16c-7.75 0-14.17-5.66-15.35-13.08l12.61-1.34c0.45 1.07 1.51 1.83 2.74 1.83 1.64 0 2.97-1.33 2.97-2.97 0-1.64-1.33-2.97-2.97-2.97 -0.23 0-0.45 0.03-0.67 0.08l-6.26-11.03c2.09-1.04 4.44-1.63 6.93-1.63 8.59 0 15.55 6.96 15.55 15.55C95.55 48.19 88.59 55.16 80 55.16z"/></symbol>
<symbol id="bb-icon-fb" viewBox="-723 0 1000 1000"><path d="M222.5,0.5h-891.1c-29.9,0-54,24.1-54,54v891.1c0,29.9,24.1,54,54,54h479.5V612.3h-130.5V461.7h130.5V346.8 c0-120.4,74.7-195.3,192.2-195.3c70.8,0,118.4,5.5,118.4,5.5v135.8H41.9c-50.5,0-74.3,17.8-74.3,71.4v97.5h148.8L97.2,612.3H-32.4 v387.2h255c29.9,0,54-24.1,54-54V54.5C276.5,24.6,252.4,0.5,222.5,0.5z"/></symbol>
<symbol id="bb-icon-github" viewBox="0 0 1024 1024"><path xmlns="http://www.w3.org/2000/svg" d="M512 0C229.25 0 0 229.2 0 512c0 226.2 146.7 418.1 350.2 485.8 25.6 4.7 34.938-11.125 34.938-24.625 0-12.188-0.469-52.562-0.719-95.312C242 908.8 211.9 817.5 211.9 817.5c-23.312-59.125-56.844-74.875-56.844-74.875-46.531-31.75 3.53-31.125 3.53-31.125 51.4 3.6 78.5 52.8 78.5 52.8 45.7 78.2 119.9 55.6 149 42.5 4.654-33 17.904-55.625 32.5-68.375C304.906 725.4 185.3 681.5 185.3 485.312c0-55.938 19.969-101.562 52.656-137.406-5.219-13-22.844-65.094 5.062-135.562 0 0 42.938-13.75 140.8 52.5 40.812-11.406 84.594-17.031 128.125-17.219 43.5 0.2 87.3 5.9 128.2 17.3 97.688-66.312 140.688-52.5 140.688-52.5 28 70.5 10.4 122.6 5.1 135.5 32.8 35.8 52.6 81.5 52.6 137.4 0 196.688-119.75 240-233.812 252.7 18.4 15.9 34.8 47 34.8 94.8 0 68.438-0.688 123.625-0.688 140.5 0 13.6 9.3 29.6 35.2 24.562C877.438 930 1024 738.1 1024 512 1024 229.2 794.8 0 512 0z"/></symbol>
<symbol viewBox="0 0 291 288.5" id="bb-icon-logo"><path d="m290.7 136.1c-8.8.9-16.9-5.1-18.4-14-1.5-8.8 4-17.3 12.6-19.4-1.6-5.4-3.5-10.7-5.7-15.8-8 3.9-17.6 1-22.1-6.8-4.5-7.8-2.1-17.6 5.2-22.5-3.3-4.5-7-8.8-10.8-12.9-6.2 6.3-16.2 6.9-23.1 1.2-6.9-5.8-8-15.8-2.8-23-4.7-3.1-9.5-5.9-14.5-8.4-3.6 8.1-12.9 12.1-21.3 9-8.4-3.1-12.9-12.1-10.5-20.6-5.4-1.3-10.9-2.2-16.5-2.9-.6 8.8-8 15.8-16.9 15.8-9 0-16.3-7-16.9-15.8-5.5.6-10.9 1.6-16.2 2.8 2.4 8.5-2.1 17.5-10.6 20.6-8.4 3-17.7-1-21.3-9.1-5 2.5-9.9 5.3-14.5 8.4 5.2 7.2 4 17.2-2.9 23-6.9 5.7-17 5.1-23.1-1.2-3.8 4.1-7.5 8.3-10.8 12.8 7.3 5 9.6 14.8 5.1 22.6-4.5 7.8-14.2 10.6-22.1 6.7-2.2 5.1-4.1 10.4-5.8 15.8 8.6 2.2 14.1 10.6 12.6 19.4-1.6 8.8-9.7 14.8-18.5 13.9-.2 2.8-.3 5.7-.3 8.6 0 2.8.1 5.5.2 8.2 8.8-.9 16.9 5.1 18.4 14 1.5 8.8-4 17.3-12.6 19.4 1.6 5.4 3.5 10.7 5.7 15.8 8-3.9 17.6-1 22.1 6.8 4.5 7.8 2.1 17.6-5.2 22.5 3.3 4.5 7 8.8 10.8 12.9 6.2-6.3 16.2-6.9 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1, h2, h3, h4, h5, label, button {
h1, h2, h3, h4, h5, label, button, .button {
@include font-family(secondary);
}
@@ -49,8 +49,10 @@ a {
}
}
button {
button,
.button {
position: relative;
display: inline-block;
color: #FFF;
background-color: $colour-1;
border: 0;
@@ -62,6 +64,7 @@ button {
@include default-box-shadow(top, 2);
overflow: hidden;
cursor: pointer;
@include _(text-stroke, 1px rgba(0, 0, 0, 0.25));
@include before-and-after {
content: '';
@@ -120,6 +123,24 @@ button {
#main &[type="submit"] {
background-color: $colour-5;
}
&.register {
background-color: $colour-4;
text-shadow: 0 0 0.15em rgba(0, 0, 0, 0.5);
}
form.logout & {
background-color: #666;
}
}
a.button {
@include after {
border-bottom: 1em solid transparent;
left: auto;
bottom: auto;
@include _(transform, none);
}
}
textarea {
@@ -171,34 +192,87 @@ input {
}
}
.email-field {
.number-field,
.email-field,
.text-field {
position: relative;
overflow: hidden;
@include default-box-shadow(top, 2, false, 0 0.05em 0 0 #666);
@include _(transition, box-shadow 100ms ease-in-out);
//overflow: hidden;
margin-bottom: 2em;
background-color: #F8F8F8;
@include default-box-shadow(top, 1.5, false, 0 0.05em 0 0 #666);
@include _(transition, background-image 100ms ease-in-out);
$fn: '';
$capability: get_capability(map-get($compatibility-map, css-gradients));
@if $capability == yx or $capability == ax or $capability == y or $capability == a {
$fn: '-#{$browser_prefix}-';
}
@include _(background-size, 8px 8px);
label {
//position: absolute;
position: absolute;
z-index: 2;
font-size: 1em;
float: left;
//float: left;
//@include font-family(primary);
//font-weight: bold;
//left: 0;
//top: 0;
padding: 0.25em 0.667em;
width: auto;
background-color: #333;
color: #FFF;
//@include _(transition, transform 250ms ease-in-out);
//background-color: #333;
@include _(transition, 'transform 250ms ease-in-out, color 250ms ease-in-out, background-color 250ms ease-in-out');
//@include _(transform-origin, left center);
//@include _(transform, scale(1) translateY(0));
top: 100%;
//@include _(transform, translateY(100%) scale(0.75));
@include _(transform, translateY(0) scale(0.75));
@include _(transform-origin, 0 0);
//line-height: 1em;
line-height: 1.5em;
background-color: transparent;
color: #333;
}
&:hover, &:focus, &:active {
@include default-box-shadow(top, 2, false, 0 0.15em 0 0 $colour-1);
&.empty {
background-color: #FFF;//#E8E8E8;
background-image:
#{$fn}repeating-linear-gradient(
-45deg, #DDD,
#DDD 1px, transparent 1px,
transparent 6px
);
label {
background-color: $colour-1;
z-index: 0;
@include _(transform, translateY(-100%) scale(1));
background-color: transparent;
color: #888;
}
input {
//@include _(box-shadow, none);
}
}
input {
margin: 0;
position: relative;
z-index: 1;
padding: 0.15em 0.5em;
background-color: transparent;
//@include _(box-shadow, inset 0 0 1em 1em #E8E8E8);
//background-image: repeating-linear-gradient(45deg, #FFF, #FFF 5px, #E8E8E8 1px, );
//background-image: #{$fn}linear-gradient(45deg, #DDD 25%, transparent 25%, transparent 75%, #EEE 75%, #EEE 100%);//, #{$fn}linear-gradient(45deg, #EEE 25%, transparent 25%, transparent 75%, #EEE 75%, #EEE 100%);
//background-image: linear-gradient(-45deg, black 12.5%, transparent 12.5%, transparent 50%, black 50%, black 87.5%, transparent 87.5%, transparent);
border: 0;
}
&:focus, &:active {
label {
color: #333;
}
}
input {
&:focus, &:active {
@include _(box-shadow, inset 0 0 1em 1em #E8E8E8);
}
}
/*input {
@@ -211,6 +285,131 @@ input {
}*/
}
.number-field {
display: inline-block;
font-size: 1.5em;
input {
text-align: right;
}
}
.radio-button-field {
@include clearfix;
margin-bottom: 1em;
position: relative;
label {
float: left;
width: 7em;
height: 5em;
@include default-box-shadow(top);
//background-color: lighten($colour-4, 25);
background-color: $colour-2;
text-align: center;
position: relative;
margin: 0 1em 3em;
padding: 0.5em;
cursor: pointer;
@include _(transition, #{'transform, background-color 100ms, 100ms ease-in-out, ease-in-out'});
&:hover {
//background-color: #EEE;
@include _(transform, scale(1.1));
}
@include before-and-after {
content: '';
position: absolute;
visibility: hidden;
@include _(transition, transform 200ms ease-in-out);
@include _(transition, transform 200ms cubic-bezier(0, 0.38, 0.9, 2));
}
@include before {
background-color: $colour-5;
bottom: -0.3em;
right: -0.5em;
width: 2em;
height: 2em;
border-radius: 50%;
@include _(transform, scale(0));
@include default-box-shadow(top);
}
@include after {
border: 0.5em solid #FFF;
border-left: none;
border-top: none;
width: 1em;
height: 2em;
font-size: 0.6em;
bottom: 0.3em;
right: 0.3em;
@include _(transform, scale(0) rotate(45deg));
}
}
svg {
width: 100%;
height: 100%;
margin-bottom: 0.75em;
fill: #FFF;
stroke: rgba(0, 0, 0, 0.667);
stroke-width: 0.05em;
}
input {
position: absolute;
opacity: 0;
left: 1em;
bottom: 0.5em;
&:checked + label {
background-color: $colour-1;
@include _(transform, scale(1.25));
@include before {
visibility: visible;
@include _(transform, scale(1));
}
@include after {
visibility: visible;
@include _(transform, scale(1) rotate(45deg));
}
}
}
}
.date-span {
margin-left: 1em;
label, input {
display: block;
height: 1.5em;
margin: 0 0.5em 1em 0;
}
label {
height: 1.5em;
}
input {
@include default-box-shadow(top);
background-color: $colour-1;
color: #FFF;
border: 0;
padding: 0 0.25em;
@include font-family(secondary);
@include _(text-stroke, 0.5px #000)
}
.date-labels {
float: left;
}
}
::-webkit-resizer {
visibility: hidden;
cursor: nw-resize;
@@ -676,6 +875,12 @@ $header-tilt: 8deg;
#main {
clear: right;
.columns {
form {
margin-top: 2em;
}
}
}
#main-nav {
@@ -869,6 +1074,7 @@ $header-tilt: 8deg;
#main {
padding-left: $sidebar-width;
min-height: 100vh;
}
#header-title {
@@ -894,7 +1100,7 @@ $header-tilt: 8deg;
padding: 0.2em;
}
.paypal-button {
.actions {
margin: 4em 2em 0 0;
}
@@ -972,3 +1178,176 @@ $header-tilt: 8deg;
@include header-colour(about, $colour-4);
@include header-colour(policy, $colour-3);
#bike_small + label {
padding: 0.5em 2.5em;
}
#bike_medium + label {
padding: 0.5em 1.5em;
}
#main .three-options {
text-align: center;
button {
background-color: $colour-4;
width: 6em;
font-size: 1.5em;
margin: 0.25em;
&:first-child {
background-color: $colour-3;
}
&:last-child {
background-color: $colour-5;
}
}
}
#main form.payment {
text-align: center;
input[type="number"] {
margin-top: 1em;
font-size: 1.5em;
text-align: center;
width: 4em;
height: 1.9em;
border: 0;
@include default-box-shadow(top);
background-color: #333;
color: $colour-3;
vertical-align: bottom;
}
> button {
background-color: $colour-1;
}
.currency {
color: #888;
font-size: 1.667em;
}
}
#main ul.workshops {
list-style: none;
padding: 0;// 1em;
text-align: center;
@include default-box-shadow(top, 2, true);
background-color: #F8F8F8;
li {
display: inline-block;
margin: 0.5em;
vertical-align: middle;
@include before {
content: '';
display: none;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: #000;
z-index: 99;
@include _(opacity, 0.5);
}
&.view {
@include before {
display: block;
}
.info {
//display: block;
left: 0;
right: 0;
top: 50%;
@include _(transform, translateY(-50%) scale(1));
@include breakpoint(large) {
left: 19rem;
}
}
}
}
h4, h5 {
color: #FFF;
background-color: $colour-1;
@include _(text-stroke, 1px rgba(0, 0, 0, 0.25));
}
h4 {
max-width: 10em;
cursor: pointer;
margin: 0;
padding: 1em;
position: relative;
@include default-box-shadow(top);
@include _(transition, transform 100ms ease-in-out);
&:hover {
z-index: 2;
@include _(transform, scale(1.25));
}
}
h5 {
font-size: 1.5em;
margin: 0;
padding: 0.5em 1em;
+ p {
margin-top: 0;
}
}
p {
padding: 1em;
max-height: 50vh;
overflow-y: auto;
}
form {
text-align: center;
}
button {
margin: 1em 0.5em;
}
[contenteditable] {
outline: none;
}
.info {
//display: none;
position: fixed;
background-color: #FFF;
color: #333;
left: auto;
right: auto;
top: auto;
z-index: 100;
max-width: 40em;
max-height: 40em;
margin: auto;
text-align: left;
@include _(transition, all 250ms ease-in-out);
@include _(transform, translateY(0) scale(0));
@include default-box-shadow(top);
}
[value="delete"] {
background-color: $colour-2;
}
[value="cancel"] {
background-color: $colour-4;
}
}
+94 -1
View File
@@ -80,6 +80,99 @@ class ApplicationController < LinguaFrancaApplicationController
end
rescue_from AbstractController::ActionNotFound do |exception|
do_403 'translator_login'
@banner_image = 'grafitti.jpg'
if current_user
@page_title = nil#'page_titles.Please_Login'
do_403 'not_a_translator'
#return
else
@page_title = 'page_titles.403.Please_Login'
do_403 'translator_login'
end
end
def generate_confirmation(user, url, expiry = nil)
if user.is_a? String
user = User.find_by_email(user)
# if the user doesn't exist, just show them a 403
do_403 unless user
end
expiry ||= (Time.now + 12.hours)
session[:confirm_uid] = user.id
confirmation = EmailConfirmation.create(user_id: user.id, expiry: expiry, url: url)
UserMailer.email_confirmation(confirmation).deliver
end
def do_confirm(settings = nil)
settings ||= {:template => 'login_confirmation_sent'}
if params[:email]
# see if we've already sent the confirmation email and are just confirming
# the email address
if params[:token]
user = User.find_by_email(params[:email])
confirm(user)
return
end
user = User.find_by_email(params[:email])
if !user
# not really a good UX so we should fix this later
do_404
return
end
# genereate the confirmation, send the email and show the 403
generate_confirmation(params[:email], request.referer.gsub(/^.*?\/\/.*?\//, '/'))
#@confirmation_sent = true
template = 'login_confirmation_sent'
@page_title ||= 'page_titles.403.Please_Check_Email'
end
@banner_image = 'grafitti.jpg'
@page_title ||= 'page_titles.403.Please_Login'
do_403 (template || 'translator_login')
end
def confirm(uid = nil)
@confirmation = EmailConfirmation.find_by_token!(params[:token])
confirm_user = nil
if uid.is_a?(User)
confirm_user = uid
uid = confirm_user.id
end
# check to see if we were given a user id to confirm against
# if we were, make sure it was the same one
if (uid ||= (params[:uid] || session[:confirm_uid]))
if uid == @confirmation.user_id
session[:uid] = nil
confirm_user ||= User.find uid
auto_login(confirm_user)
else
@confirmation.delete
end
redirect_to (@confirmation.url || '/')
return
end
@banner_image = 'grafitti.jpg'
@page_title = 'page_titles.403.Please_Confirm_Email'
do_403 'login_confirm'
end
def translator_request
@banner_image = 'grafitti.jpg'
@page_title = 'page_titles.403.Translator_Request_Sent'
do_403 'translator_request_sent'
end
def user_logout
logout()
redirect_to (params[:url] || '/')
end
end
+176 -83
View File
@@ -144,7 +144,6 @@ class ConferencesController < ApplicationController
if !registration.nil?
session[:registration] = YAML.load(registration.data)
session[:registration][:registration_id] = registration.id
puts 'XXXXXXXXXXXXXXXXXXXXXXXX'
next_step = (registration.completed.blank? && registration.is_participant.present? ? 'organizations' : 'thanks')
else
if !session[:registration][:user] || !session[:registration][:user][:firstname]
@@ -418,86 +417,189 @@ class ConferencesController < ApplicationController
is_post = request.post? || session[:registration_step]
set_conference
if !@conference.registration_open
if !@this_conference.registration_open
do_404
return
end
#if data[:next_step].blank?
# session.delete(:registration)
#end
set_conference_registration
data = register_submit
@register_step = is_post ? data[:next_step] : 'register'
@error_message = data[:error] ? data[:message] : nil
template = (@register_step == 'register' ? '' : 'register_') + @register_step
@register_template = nil
if !File.exists?(Rails.root.join("app", "views", params[:controller], "_#{template}.html.haml"))
do_404
return
if logged_in?
# if the user is logged in start them off on the policy
# page, unless they have already begun registration then
# start them off with questions
@register_template = @registration ? :questions : :policy
@name = current_user.firstname
# we should phase out last names
@name += " #{current_user.lastname}" if current_user.lastname
end
if session[:registration]
session[:registration][@register_step.to_sym] ||= Hash.new
# process data from the last view
case (params[:button] || '').to_sym
when :confirm_email
@register_template = :email_sent if is_post
when :policy
@register_template = :questions if is_post
when :save
if is_post
@registration ||= ConferenceRegistration.new
@registration.conference_id = @this_conference.id
@registration.user_id = current_user.id
@registration.is_attending = 'yes'
@registration.is_confirmed = true
@registration.city = params[:location]
@registration.arrival = params[:arrival]
@registration.departure = params[:departure]
@registration.housing = params[:housing]
@registration.bike = params[:bike]
@registration.other = params[:other]
@registration.save
current_user.firstname = params[:name].squish
current_user.lastname = nil
current_user.save
@register_template = @registration.registration_fees_paid ? :workshops : :payment
end
when :payment
if is_post && @registration
amount = params[:amount].to_f
if amount
@registration.payment_confirmation_token = Digest::SHA256.hexdigest(rand(Time.now.to_f * 1000000).to_i.to_s)
@registration.save
host = "#{request.protocol}#{request.host_with_port}"
response = PayPal!.setup(
PayPalRequest(amount),
register_paypal_confirm_url(@this_conference.slug, :paypal_confirm, @registration.payment_confirmation_token),
register_paypal_confirm_url(@this_conference.slug, :paypal_cancel, @registration.payment_confirmation_token)
)
redirect_to response.redirect_uri
return
end
@register_template = :workshops
end
when :paypal_confirm
if @registration && @registration.payment_confirmation_token == params[:confirmation_token]
if ENV['RAILS_ENV'] != 'test'
# testing this does't work in test but it works in devo and prod
@registration.payment_info = {:payer_id => params[:PayerID], :token => params[:token], :amount => PayPal!.details(params[:token]).amount.total}.to_yaml
end
#@registration.payment_confirmation_token = nil
@registration.save!
@register_template = :workshops
end
when :paypal_cancel
if @registration
@registration.payment_confirmation_token = nil
@registration.save
@register_template = :payment
end
end
@actions = nil
@multipart = false
case @register_step
when 'register', 'organizations', 'new_organization', 'new_workshop', 'volunteer_questions'
@actions = :next
if @register_step == 'new_organization'
@multipart = true
end
when 'thanks'
@registration = ConferenceRegistration.find(session[:registration][:registration_id])
if @registration.is_confirmed.blank?
@actions = :resend_confirmation_email
end
next_step = 'thanks'
#if @registration.complete && @registration.is_participant && @registration.payment_info.nil?
#` @actions = [:submit_payment]
when 'primary'
@actions = [:cancel, :next]
when 'submit'
@actions = [:cancel, :submit]
when 'cancel'
@actions = [:no, :yes]
when 'confirm_payment'
@actions = [:cancel_payment, :confirm_payment]
when 'already_registered'
@registration = ConferenceRegistration.find_by(:email => session[:registration][:email])
if !@registration.complete
@actions = :resend_confirmation_email
end
when 'questions'
@actions = [:cancel, :submit]
@housing_options = {
'I will fend for myself thanks' => 'none',
'I will need a real bed' => 'bed',
'A couch or floor space will be fine' => 'couch',
'All I need is a backyard' => 'camp'
# prepare data for the next view
case @register_template
when :questions
@registration ||= ConferenceRegistration.new(
:conference_id => @this_conference.id,
:user_id => current_user.id,
:is_attending => 'yes',
:is_confirmed => true,
:city => view_context.location(view_context.lookup_ip_location),
:arrival => @this_conference.start_date,
:departure => @this_conference.end_date,
:housing => nil,
:bike => nil,
:other => ''
);
when :workshops
@my_workshops = [1,2,3,4].map { |i|
{
:title => (Forgery::LoremIpsum.sentence({:random => true}).gsub(/\.$/, '').titlecase),
:info => (Forgery::LoremIpsum.sentences(rand(1...5), {:random => true}))
}
session[:registration][:questions][:housing] ||= 'couch'
@loaner_bike_options = {
'No' => 'no',
'Yes, an average size should do' => 'medium',
'Yes but a small one please' => 'small',
'Yes but a large one please' => 'large'
}
session[:registration][:questions][:loaner_bike] ||= 'medium'
#session[:registration][:questions][:diet] ||= Hash.new
}
end
#puts ' ------yyyy----------------- '
#puts @register_step
#session.delete(:last_action)
if request.xhr?
@register_content = render_to_string :partial => template
render :json => {status: 200, html: @register_content}
else
@register_template = template
render 'show'
end
# render :register
# data = register_submit
# @register_step = is_post ? data[:next_step] : 'register'
# @error_message = data[:error] ? data[:message] : nil
# template = (@register_step == 'register' ? '' : 'register_') + @register_step
# if !File.exists?(Rails.root.join("app", "views", params[:controller], "_#{template}.html.haml"))
# do_404
# return
# end
# if session[:registration]
# session[:registration][@register_step.to_sym] ||= Hash.new
# end
# @actions = nil
# @multipart = false
# case @register_step
# when 'register', 'organizations', 'new_organization', 'new_workshop', 'volunteer_questions'
# @actions = :next
# if @register_step == 'new_organization'
# @multipart = true
# end
# when 'thanks'
# @registration = ConferenceRegistration.find(session[:registration][:registration_id])
# if @registration.is_confirmed.blank?
# @actions = :resend_confirmation_email
# end
# next_step = 'thanks'
# #if @registration.complete && @registration.is_participant && @registration.payment_info.nil?
# #` @actions = [:submit_payment]
# when 'primary'
# @actions = [:cancel, :next]
# when 'submit'
# @actions = [:cancel, :submit]
# when 'cancel'
# @actions = [:no, :yes]
# when 'confirm_payment'
# @actions = [:cancel_payment, :confirm_payment]
# when 'already_registered'
# @registration = ConferenceRegistration.find_by(:email => session[:registration][:email])
# if !@registration.complete
# @actions = :resend_confirmation_email
# end
# when 'questions'
# @actions = [:cancel, :submit]
# @housing_options = {
# 'I will fend for myself thanks' => 'none',
# 'I will need a real bed' => 'bed',
# 'A couch or floor space will be fine' => 'couch',
# 'All I need is a backyard' => 'camp'
# }
# session[:registration][:questions][:housing] ||= 'couch'
# @loaner_bike_options = {
# 'No' => 'no',
# 'Yes, an average size should do' => 'medium',
# 'Yes but a small one please' => 'small',
# 'Yes but a large one please' => 'large'
# }
# session[:registration][:questions][:loaner_bike] ||= 'medium'
# #session[:registration][:questions][:diet] ||= Hash.new
# end
# if request.xhr?
# @register_content = render_to_string :partial => template
# render :json => {status: 200, html: @register_content}
# else
# @register_template = template
# render 'register'
# end
end
def registrations
@@ -571,9 +673,6 @@ class ConferencesController < ApplicationController
@conference_registration = ConferenceRegistration.find_by(confirmation_token: params[:confirmation_token])
if !@conference_registration.nil? && @conference_registration.conference_id == @conference.id && @conference_registration.complete && @conference_registration.payment_info.nil?
session[:registration] = YAML.load(@conference_registration.data)
session[:registration][:registration_id] = @conference_registration.id
session[:registration][:path] = Array.new
session[:registration_step] = 'paypal-cancelled'
redirect_to action: 'register'
end
end
@@ -639,9 +738,9 @@ class ConferencesController < ApplicationController
private
# Use callbacks to share common setup or constraints between actions.
def set_conference
@conference = nil
@this_conference = nil
if type = ConferenceType.find_by!(slug: params[:conference_type] || params[:conference_type_slug] || 'bikebike')
if @conference = Conference.find_by!(slug: params[:conference_slug] || params[:slug], conference_type_id: type.id)
if @this_conference = Conference.find_by!(slug: params[:conference_slug] || params[:slug], conference_type_id: type.id)
set_conference_registration
end
end
@@ -651,12 +750,7 @@ class ConferencesController < ApplicationController
end
def set_conference_registration
if !@conference || !current_user
@conference_registration = nil
return
end
@conference_registration = ConferenceRegistration.find_by(conference_id: @conference.id, user_id: current_user.id)
@registration = logged_in? ? ConferenceRegistration.find_by(:user_id => current_user.id, :conference_id => @this_conference.id) : nil
end
# Only allow a trusted parameter "white list" through.
@@ -807,11 +901,10 @@ class ConferencesController < ApplicationController
end
def PayPal!
paypal_info = get_secure_info(:paypal)
Paypal::Express::Request.new(
:username => paypal_info[:username],
:password => paypal_info[:password],
:signature => paypal_info[:signature]
:username => @this_conference.paypal_username,
:password => @this_conference.paypal_password,
:signature => @this_conference.paypal_signature
)
end
+23 -14
View File
@@ -452,7 +452,7 @@ module ApplicationHelper
end
def lookup_ip
if request.remote_ip == '127.0.0.1'
if request.remote_ip == '127.0.0.1' || request.remote_ip == '::1'
session['remote_ip'] || (session['remote_ip'] = open("http://checkip.dyndns.org").first.gsub(/^.*\s([\d\.]+).*$/s, '\1').gsub(/[^\.\d]/, ''))
else
request.remote_ip
@@ -460,12 +460,16 @@ module ApplicationHelper
end
def lookup_ip_location
if is_test? && ApplicationController::get_location.present?
Geocoder.search(ApplicationController::get_location).first
elsif request.remote_ip == '127.0.0.1'
Geocoder.search(session['remote_ip'] || (session['remote_ip'] = open("http://checkip.dyndns.org").first.gsub(/^.*\s([\d\.]+).*$/s, '\1').gsub(/[^\.\d]/, ''))).first
else
request.location
begin
if is_test? && ApplicationController::get_location.present?
Geocoder.search(ApplicationController::get_location).first
elsif request.remote_ip == '127.0.0.1' || request.remote_ip == '::1'
Geocoder.search(session['remote_ip'] || (session['remote_ip'] = open("http://checkip.dyndns.org").first.gsub(/^.*\s([\d\.]+).*$/s, '\1').gsub(/[^\.\d]/, ''))).first
else
request.location
end
rescue
nil
end
end
@@ -526,10 +530,10 @@ module ApplicationHelper
subdomain == 'test'
end
def location(location)
territory = Carmen::Country.coded(location.country).subregions.coded(location.territory)
location.city + (territory ? ' ' + territory.name : '') + ', ' + Carmen::Country.coded(location.country).name
end
#def location(location)
# territory = Carmen::Country.coded(location.country).subregions.coded(location.territory)
# location.city + (territory ? ' ' + territory.name : '') + ', ' + Carmen::Country.coded(location.country).name
#end
def rand_hash(length = 16, model = nil, field = nil)
if field
@@ -582,10 +586,11 @@ module ApplicationHelper
end
def location(location)
return nil if location.blank?
l = Array.new
l << location.city
l << I18n.t("geography.subregions.#{location.country}.#{location.territory}") if location.territory.present?
l << I18n.t("geography.countries.#{location.country}") if !(location.country =~ /^(US|CA)$/)
l << location.data['city']
l << I18n.t("geography.subregions.#{location.data['country_code']}.#{location.data['region_code']}") if location.data['region_code'].present?
l << I18n.t("geography.countries.#{location.data['country_code']}") if !(location.data['country_code'] =~ /^(US|CA)$/)
l.join(', ')
end
@@ -605,6 +610,10 @@ module ApplicationHelper
I18n.t('date.date_span', {:date_1 => d1, :date_2 => d2})
end
def generate_confirmation(user, url, expiry = nil)
ApplicationController::generate_confirmation(user, url, expiry)
end
private
def _form_field(type, name, value, options)
if type == 'check_box'
+10 -3
View File
@@ -24,7 +24,7 @@ class UserMailer < ActionMailer::Base
end
def test_email
mail to: 'goodgodwin@hotmail.com', subject: 'This is a test'
mail to: 'goodgodwin@hotmail.com', subject: 'This is a test', from: 'info@preview.bikebike.org'
end
def conference_registration_email(conference, data, conference_registration)
@@ -32,7 +32,7 @@ class UserMailer < ActionMailer::Base
@conference = conference
@url = "https://bikebike.org"#UserMailer.default_url_options[:host]
@confirmation_url = UserMailer.default_url_options[:host] + "/#{@conference.url}/register/confirm/#{conference_registration.confirmation_token}/".gsub(/\/\/+/, '/')
mail to: data[:email], subject: (_'register.email.registration.subject',"Please confirm your registration for #{conference.title}", vars: {:conference_title => conference.title})
mail to: data[:email], subject: (I18n.t 'register.email.registration.subject',"Please confirm your registration for #{conference.title}", vars: {:conference_title => conference.title})
end
def conference_registration_confirmed_email(conference, data, conference_registration)
@@ -40,6 +40,13 @@ class UserMailer < ActionMailer::Base
@conference = conference
@url = "https://bikebike.org"#UserMailer.default_url_options[:host]
@confirmation_url = UserMailer.default_url_options[:host] + "/#{@conference.url}/register/pay-registration/#{conference_registration.confirmation_token}/".gsub(/\/\/+/, '/')
mail to: data[:email], subject: (_'register.email.registration_confirmed.subject',"Thanks for confirming your registration for #{conference.title}", vars: {:conference_title => conference.title})
mail to: data[:email], subject: (I18n.t 'register.email.registration_confirmed.subject',"Thanks for confirming your registration for #{conference.title}", vars: {:conference_title => conference.title})
end
def email_confirmation(confirmation)
@confirmation = confirmation
@host = UserMailer.default_url_options[:host]
mail to: confirmation.user.email,
subject: (I18n.t 'email.subject.confirm_email','Please confirm your email address')
end
end
+5 -1
View File
@@ -24,7 +24,11 @@ class EmailConfirmation < ActiveRecord::Base
end
def valid_for_user?(user)
user.id == user_id && expiry < Time.now
user.id == user_id && !expired?
end
def expired?
expiry >= Time.now
end
protected
+6 -1
View File
@@ -1,6 +1,11 @@
- page_title = _'error.404.page_title.This_Page_Does_Not_Exist'
- title page_title
- banner_title page_title
- content_for :banner do
- image = image_url(@banner_image || 'empty-racks.jpg')
#header-title.short{style: capable_of(:svg) ? nil : "background-image: url(#{image})"}
- if capable_of(:svg)
= render 'application/banner_image.svg', {:image => image}
%h1=_(@page_title || 'page_titles.404.Page_Not_Found')
.row
%h1
@@ -0,0 +1,10 @@
= row do
= columns(medium: 12) do
%h2=_'articles.permission_denied.headings.confirm_email','Please confirm your email address'
= columns(medium: 6, large: 5) do
= form_tag :do_confirm do
.email-field.input-field
= email_field_tag :email, nil, required: true
= label_tag :email
= hidden_field_tag :token, @confirmation.token
= button_tag :login
@@ -0,0 +1,5 @@
= row do
= columns(medium: 12) do
%h2=_'articles.permission_denied.headings.confirmation_sent','Confirmation Sent'
= columns(medium: 6) do
%p=_'articles.permission_denied.paragraphs.confirmation_sent', :p
@@ -0,0 +1,9 @@
= row do
= columns(medium: 12) do
%h2=_'articles.permission_denied.headings.not_a_translator','Sorry you must be a translator to view this page'
= columns(medium: 6) do
%p=_'articles.permission_denied.paragraphs.translator_request', :p
= columns(medium: 6) do
= form_tag :translator_request do
= text_area_tag :comment, nil, placeholder: true, required: true
= button_tag :translator_request
@@ -1,21 +1,11 @@
= row do
- if current_user
= columns(medium: 12) do
%h2=_'articles.permission_denied.headings.not_a_translator','Sorry you must be a translator to view this page'
= columns(medium: 6) do
%p=_'articles.permission_denied.paragraphs.translator_request', :p
= columns(medium: 6) do
= form_tag :translator_request do
=text_area_tag :comment, nil, placeholder: true
=button_tag :translator_request
- else
= columns(medium: 12) do
%h2=_'articles.permission_denied.headings.login_required','Sorry you must be logged in to view this page'
= columns(medium: 6) do
%p=_'articles.permission_denied.paragraphs.translator_not_logged_in', :p
= columns(medium: 6) do
= form_tag :do_confirm do
.email-field
=email_field_tag :email, nil, required: true
=label_tag :email
=button_tag :login
= columns(medium: 12) do
%h2=_'articles.permission_denied.headings.login_required','Sorry you must be logged in to view this page'
= columns(medium: 6, large: 7) do
%p=_'articles.permission_denied.paragraphs.translator_not_logged_in', :p
= columns(medium: 6, large: 5) do
= form_tag :do_confirm do
.email-field.input-field
= email_field_tag :email, nil, required: true
= label_tag :email
= button_tag :login
@@ -1,9 +1,9 @@
- content_for :banner do
- image = image_url('403.jpg')
- image = image_url(@banner_image || '403.jpg')
#header-title.short{style: capable_of(:svg) ? nil : "background-image: url(#{image})"}
- if capable_of(:svg)
= render 'application/banner_image.svg', {:image => image}
%h1=_'page_titles.Permission_Denied'
%h1=_(@page_title || 'page_titles.403.Permission_Denied')
%article
- if @template
+155
View File
@@ -0,0 +1,155 @@
- title (_'conferences.register.page_title.Conference_Registration')
- content_for :banner do
- image = image_url(@conference.cover_url || 'empty-racks.jpg')
#header-title.short{style: capable_of(:svg) ? nil : "background-image: url(#{image})"}
- if capable_of(:svg)
= render 'application/banner_image.svg', {:image => image}
%h1=_(@page_title || 'page_titles.conferences.Conference_Registration')
%article
= row do
- case @register_template
- when :confirm_email
= columns(medium: 12) do
%h2=_'articles.conference_registration.headings.Confirm_You_Email_Address','Confirm Email Address'
= columns(medium: 6, large: 5) do
= form_tag register_path(@this_conference.slug) do
= button_tag :continue, :value => :confirm_email
- when :payment
= columns(medium: 12) do
%h2=_'articles.conference_registration.headings.Payment'
%p=_'articles.conference_registration.paragraphs.Payment', 'Thank you for completing your registration. We\'ll see you at Bike!Bike! Payment is by donation and can be done now or upon arrival but to help us fund the conference, we ask that you pay the registration donation as soon as you can.'
= columns(large: 9, push: 1) do
= form_tag register_path(@this_conference.slug), :class => :payment do
= hidden_field_tag :button, :payment
.three-options
= button_tag nil, :name => :amount, :value => '25.0' do
= number_to_currency(25, :unit => '$')
= button_tag nil, :name => :amount, :value => '50.0' do
= number_to_currency(50, :unit => '$')
= button_tag nil, :name => :amount, :value => '100.0' do
= number_to_currency(100, :unit => '$')
= form_tag register_path(@this_conference.slug), :class => :payment do
%span.currency='$'
= number_field_tag :amount, nil, :required => true, :step => 0.01, :min => 0.00
= button_tag :custom_amount, :value => :payment
%p=_'articles.conference_registration.paragraphs.currency','(amounts are in $USD)'
= columns(large: 2)
- when :policy
= columns(medium: 12) do
%h2=_'articles.conference_registration.headings.Policy_Agreement'
%p=_'articles.conference_registration.paragraphs.Policy_Agreement', :s, 2
= columns(medium: 10, push: 1) do
%h3=_'articles.policy.headings.The_Agreement'
%ul
- [:commitment, :respect, :empowerment, :accessible, :peaceful, :spaces, :hearing, :intent, :open_minds, :learning].each do |term|
%li=_"articles.policy.term.#{term.to_s}", :s, 2
%h3=_'articles.policy.headings.Why','Why have a Safer Space Agreement?'
%p=_'articles.policy.paragraphs.Why', :p
%h3=_'articles.policy.headings.How','How is the policy enforced?'
%p=_'articles.policy.paragraphs.How', :p
= columns(medium: 12) do
%p=_'articles.conference_registration.paragraphs.Confirm_Agreement', :p
= form_tag register_path(@this_conference.slug) do
.checkbox-field.input-field
= label_tag :policy_confirm
= check_box_tag :policy_confirm, "1", false, required: true
= button_tag :agree, :value => :policy
- when :questions
= columns(medium: 12) do
%h2=_'articles.conference_registration.headings.Registration_Info','Registration Info'
= columns(medium: 5, large: 4) do
%p=_'articles.conference_registration.paragraphs.Registration_Info', :p
= columns(medium: 7, large: 8) do
= form_tag register_path(@this_conference.slug) do
%h3=_'articles.conference_registration.headings.name','What is your name?'
.text-field.input-field
= label_tag :name
= text_field_tag :name, @name, required: true
%h3=_'articles.conference_registration.headings.location','Where are you coming from?'
.text-field.input-field
= label_tag :location
= text_field_tag :location, @registration.city, required: true
%h3=_'articles.conference_registration.headings.arrival_and_departure','How long do you plan to spend in the area?'
.date-span.input-field
.date-labels
= label_tag :arrival
= label_tag :departure
.date-field.input-field
= date_field_tag :arrival, @registration.arrival.strftime("%Y-%m-%d")
= date_field_tag :departure, @registration.departure.strftime("%Y-%m-%d")
%h3=_'articles.conference_registration.headings.housing','Do you need a place to stay?'
.radio-button-field.input-field
- [:none, :tent, :house].each do |option|
= radio_button_tag :housing, option, (@registration.housing || '').to_sym == option, required: true
= label_tag "housing_#{option}" do
- option_name = _"articles.conference_registration.questions.housing.#{option}"
= svg_sprite('icons', "bb-#{option}", option_name)
= option_name
%h3=_'articles.conference_registration.headings.bike','Do you need a bike?'
.radio-button-field.input-field
- [:none, :small, :medium, :large].each do |option|
= radio_button_tag :bike, option, (@registration.bike || '').to_sym == option, required: true
= label_tag "bike_#{option}" do
- option_name = _"articles.conference_registration.questions.bike.#{option}"
= svg_sprite('icons', "bb-#{option == :none ? :none : :bike}", option_name)
= option_name
%h3=_'articles.conference_registration.headings.other','Anything else we should know about your visit?'
.select-field.input-field
= label_tag :other
= text_area_tag :other, @registration.other
= button_tag :register, :value => :save
- when :workshops
= columns(medium: 12) do
%h2=_'articles.conference_registration.headings.Workshops','Workshops'
= columns(medium: 6) do
%h3=_'articles.conference_registration.headings.Add_Workshop'
= form_tag register_path(@this_conference.slug) do
.text-field.input-field
= text_field_tag :title, nil, required: true
= label_tag :title
= text_area_tag :info, nil, required: true
= button_tag :add
= columns(medium: 6) do
%h3=_'articles.conference_registration.headings.Your_Workshops'
%ul.workshops.my-workshops
- @my_workshops.each do |workshop|
%li
%h4=workshop[:title]
.info
%h5{:contenteditable => true}=workshop[:title]
%p{:contenteditable => true}=workshop[:info]
= form_tag register_path(@this_conference.slug) do
= button_tag :save, :value => :save
= button_tag :delete, :value => :delete
= button_tag :cancel, :value => :cancel
= columns(medium: 12) do
= form_tag register_path(@this_conference.slug) do
= button_tag :previous, :value => :registration
= button_tag :next, :value => :workshops
:javascript
function makeWorkshopsClickable() {
var workshops = document.querySelectorAll('ul.workshops h4');
for (var i = 0; i < workshops.length; i++) {
workshops[i].addEventListener('click', function(e) {
var workshop = e.target.parentElement;
workshop.className = 'view';
workshop.querySelector('form').onsubmit = function() {
workshop.removeAttribute('class');
return false;
}
}, false);
}
}
makeWorkshopsClickable();
- else
= columns(medium: 12) do
%h2=_'articles.conference_registration.headings.Enter_Your_Email','Enter your email address'
= columns(medium: 6, large: 7) do
%p=_'articles.conference_registration.paragraphs.confirm_email_address', :p
= columns(medium: 6, large: 5) do
= form_tag :do_confirm do
.email-field.input-field
= email_field_tag :email, nil, required: true
= label_tag :email
= button_tag :register, :value => :register
+37 -3
View File
@@ -36,6 +36,40 @@
%footer= render 'shared/footer'
- if content_for?(:footer_scripts)
= yield :footer_scripts
- if content_for?(:scripts) || content_for?(:dom_ready)
:javascript
#{content_for?(:scripts) ? "#{yield :scripts}" : ''}#{content_for?(:dom_ready) ? "$(function(){#{yield :dom_ready}});" : ''}
-# if content_for?(:scripts) || content_for?(:dom_ready)
-# #{content_for?(:scripts) ? "#{yield :scripts}" : ''}#{content_for?(:dom_ready) ? "$(function(){#{yield :dom_ready}});" : ''}
:javascript
(function() {
if (!String.prototype.trim) {
(function() {
var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
String.prototype.trim = function() {
return this.replace(rtrim, '');
};
})();
}
function classExists(elem,className){var p = new RegExp('(^| )'+className+'( |$)');return (elem.className && elem.className.match(p));}
function addClass(elem,className){if(classExists(elem,className)){return true;}elem.className += ' '+className;}
function removeClass(elem,className){var c = elem.className;var p = new RegExp('(^| )'+className+'( |$)');c = c.replace(p,' ').replace(/ /g,' ');elem.className = c.trim();}
[].slice.call(document.querySelectorAll('.input-field input')).forEach(function(inputEl) {
if (inputEl.value.trim() === '') {
inputEl.parentNode.className = inputEl.parentNode.className + ' empty';
}
inputEl.addEventListener('focus', onInputFocus);
inputEl.addEventListener('blur', onInputBlur);
});
function onInputFocus(ev) {
removeClass(ev.target.parentNode, 'empty')
}
function onInputBlur(ev) {
if (ev.target.value.trim() === '') {
addClass(ev.target.parentNode, 'empty');
}
}
})();
+10 -1
View File
@@ -7,4 +7,13 @@
= nav_link '/about', (_'page_titles.About_BikeBike')
= nav_link '/policy', (_'page_titles.Safe_Space_Policy')
.actions
= render 'shared/donate_button', :email_address => (@conference.paypal_email_address || @conference.email_address)
- if current_user
= form_tag :logout, class: :logout do
=hidden_field_tag :url, request.fullpath
=button_tag :Log_out
- elsif @conference.registration_open
- if params[:action] != 'register'
= link_to register_path(@conference.slug), class: [:button, :register] do
=_'conference.actions.Register'
- else
= render 'shared/donate_button', :email_address => (@conference.paypal_email_address || @conference.email_address)
@@ -0,0 +1 @@
%a{href: "#{@host}/confirm/#{@confirmation.token}"}=_'email.confirm.confirm_link'