AC-578 fixing link in label on logistration form

This commit is contained in:
Chris Rodriguez
2016-09-01 15:04:23 -04:00
parent 2d9e38ca4c
commit 2e3129fbd8
9 changed files with 111 additions and 66 deletions

View File

@@ -162,7 +162,7 @@
{
placeholder: '',
name: 'honor_code',
label: 'I agree to the <a href="/honor">Terms of Service and Honor Code</a>',
label: 'I agree to the Terms of Service and Honor Code',
defaultValue: '',
type: 'checkbox',
required: true,

View File

@@ -85,7 +85,9 @@
html.push(_.template(fieldTpl)($.extend(data[i], {
form: this.formType,
requiredStr: this.requiredStr
requiredStr: this.requiredStr,
supplementalText: data[i].supplementalText || '',
supplementalLink: data[i].supplementalLink || ''
})));
}

View File

@@ -244,8 +244,9 @@
&.error {
color: $red;
}
&[for="register-honor_code"], &[for="register-terms_of_service"] {
&[for="register-honor_code"],
&[for="register-terms_of_service"] {
display: inline-block;
margin: 5px 5px 0 0;
width: 90%;
@@ -255,10 +256,6 @@
&[for="login-remember"] {
display: inline-block;
}
a {
font-family: $sans-serif;
}
}
.field-link {
@@ -604,3 +601,7 @@
font-weight: bold;
}
}
.supplemental-link {
margin: 1rem 0;
}

View File

@@ -4,6 +4,11 @@
<%= label %>
<% if ( required && requiredStr ) { %> <%= requiredStr %></label><% } %>
</label>
<% if (supplementalLink && supplementalText) { %>
<div class="supplemental-link">
<a href="<%- supplementalLink %>"><%- supplementalText %></a>
</div>
<% } %>
<% } %>
<% if ( type === 'select' ) { %>
@@ -24,6 +29,11 @@
<% }); %>
</select>
<% if ( instructions ) { %> <span class="tip tip-input" id="<%= form %>-<%= name %>-desc"><%= instructions %></span><% } %>
<% if (supplementalLink && supplementalText) { %>
<div class="supplemental-link">
<a href="<%- supplementalLink %>"><%- supplementalText %></a>
</div>
<% } %>
<% } else if ( type === 'textarea' ) { %>
<textarea id="<%= form %>-<%= name %>"
type="<%= type %>"
@@ -41,6 +51,11 @@
} %>
<% if ( required ) { %> aria-required="true" required<% } %> ></textarea>
<% if ( instructions ) { %> <span class="tip tip-input" id="<%= form %>-<%= name %>-desc"><%= instructions %></span><% } %>
<% if (supplementalLink && supplementalText) { %>
<div class="supplemental-link">
<a href="<%- supplementalLink %>"><%- supplementalText %></a>
</div>
<% } %>
<% } else { %>
<input id="<%= form %>-<%= name %>"
type="<%= type %>"
@@ -49,7 +64,7 @@
<% if ( instructions ) { %> aria-describedby="<%= form %>-<%= name %>-desc" <% } %>
<% if ( restrictions.min_length ) { %> minlength="<%= restrictions.min_length %>"<% } %>
<% if ( restrictions.max_length ) { %> maxlength="<%= restrictions.max_length %>"<% } %>
<% if ( required ) { %> aria-required="true" required<% } %>
<% if ( required ) { %> required<% } %>
<% if ( typeof errorMessages !== 'undefined' ) {
_.each(errorMessages, function( msg, type ) {%>
data-errormsg-<%= type %>="<%= msg %>"
@@ -65,6 +80,11 @@
</label>
<% } %>
<% if ( instructions ) { %> <span class="tip tip-input" id="<%= form %>-<%= name %>-desc"><%= instructions %></span><% } %>
<% if (supplementalLink && supplementalText) { %>
<div class="supplemental-link">
<a href="<%- supplementalLink %>"><%- supplementalText %></a>
</div>
<% } %>
<% } %>
<% if( form === 'login' && name === 'password' ) { %>