Skip to content

Commit

Permalink
add label to checkbox/radio input field in project_questions angular app
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed May 23, 2016
1 parent fb886f0 commit de203a9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
10 changes: 8 additions & 2 deletions apps/projects/static/projects/css/project_questions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@

.project-questions-form .radio label,
.project-questions-form .checkbox label {
margin-right: 10px;
margin-bottom: 5px;
padding-left: 25px;
line-height: 24px;
Expand All @@ -85,10 +84,17 @@

.project-questions-form .radio input[type='radio'],
.project-questions-form .checkbox input[type='checkbox'] {
margin-top: 5px;
margin-top: 8px;
margin-left: -25px;
}

.project-questions-form .radio input[type='text'],
.project-questions-form .checkbox input[type='text'] {
display: inline-block;
width: 200px;
margin-left: 10px;
}

.project-questions-form .radio a.remove-link {
top: 2px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
data-key="{$ option.key $}"
data-change="changeCheckbox(service.values[question.attribute.id][0], question.options)"
ng-model="service.values[question.attribute.id][0].checkbox" />
<span ng-hide="option.input_field">
{$ option.text $}
</span>
<input class="form-control input-xs" type="text" placeholder="{$ option.text $}"
<span>{$ option.text $}</span><span ng-show="option.input_field">:</span>
<input class="form-control input-sm" type="text"
ng-show="option.input_field"
ng-model="service.values[question.attribute.id][0].input[option.key]"
ng-change="changeCheckbox(service.values[question.attribute.id][0], question.options)"
Expand Down Expand Up @@ -47,10 +45,8 @@
data-key="{$ option.key $}"
data-change="changeCheckbox(value, question.options)"
ng-model="value.checkbox" />
<span ng-hide="option.input_field">
{$ option.text $}
</span>
<input class="form-control input-xs" type="text" placeholder="{$ option.text $}"
<span>{$ option.text $}</span><span ng-show="option.input_field">:</span>
<input class="form-control input-sm" type="text"
ng-show="option.input_field"
ng-model="value.input[option.key]"
ng-change="changeCheckbox(value, question.options)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
<input type="radio" ng-value="option.key"
ng-model="service.values[question.attribute.id][0].key"
ng-change="service.values[question.attribute.id][0].text = option.key" />
<span ng-hide="option.input_field">
{$ option.text $}
</span>
<input class="form-control input-sm" type="text" placeholder="{$ option.text $}"
<span>{$ option.text $}</span><span ng-show="option.input_field">:</span>
<input class="form-control input-sm" type="text"
ng-show="option.input_field"
ng-model="service.values[question.attribute.id][0].input[option.key]"
ng-change="changeRadio(service.values[question.attribute.id][0], option.key)"
Expand All @@ -45,10 +43,8 @@
<input type="radio" ng-value="option.key"
ng-model="value.key"
ng-change="value.text = option.key" />
<span ng-hide="option.input_field">
{$ option.text $}
</span>
<input class="form-control input-sm" type="text" placeholder="{$ option.text $}"
<span>{$ option.text $}</span><span ng-show="option.input_field">:</span>
<input class="form-control input-sm" type="text"
ng-show="option.input_field"
ng-model="value.input[option.key]"
ng-change="changeRadio(value, option.key)"
Expand Down

0 comments on commit de203a9

Please sign in to comment.