made organization lookup use radio buttons for card 74 on the tower 2.1 board

This commit is contained in:
Jared Tabor
2014-08-20 16:32:39 -04:00
parent ab1456f4a2
commit d1e8d98b29
2 changed files with 12 additions and 6 deletions

View File

@@ -178,7 +178,7 @@ angular.module('LookUpHelper', ['RestServices', 'Utilities', 'SearchHelper', 'Pa
scope.selectAction = function () { scope.selectAction = function () {
var i, found = false; var i, found = false;
for (i = 0; i < scope[list.name].length; i++) { for (i = 0; i < scope[list.name].length; i++) {
if (scope[list.name][i].checked === '1') { if (scope[list.name][i].checked === '1' || scope[list.name][i].checked===1) {
found = true; found = true;
parent_scope[field] = scope[list.name][i].id; parent_scope[field] = scope[list.name][i].id;
if (parent_scope[form.name + '_form'] && form.fields[field] && form.fields[field].sourceModel) { if (parent_scope[form.name + '_form'] && form.fields[field] && form.fields[field].sourceModel) {

View File

@@ -331,7 +331,13 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
} }
if (options.mode === 'select' || options.mode === 'lookup') { if (options.mode === 'select' || options.mode === 'lookup') {
html += "<td><input type=\"checkbox\" ng-model=\"" + list.iterator + ".checked\" name=\"check_{{" + if(list.iterator==='organization'){
html += "<td><input type=\"radio\" ng-model=\"" + list.iterator + ".checked\" name=\"check_{{" +
list.iterator + ".id }}\" ng-click=\"toggle_" + list.iterator + "(" + list.iterator + ".id, true)\" ng-value=\"1\" " +
"ng-false-value=\"0\" id=\"check_{{" + list.iterator + ".id}}\" /></td>";
}
else
html += "<td><input type=\"checkbox\" ng-model=\"" + list.iterator + ".checked\" name=\"check_{{" +
list.iterator + ".id }}\" ng-click=\"toggle_" + list.iterator + "(" + list.iterator + ".id, true)\" ng-true-value=\"1\" " + list.iterator + ".id }}\" ng-click=\"toggle_" + list.iterator + "(" + list.iterator + ".id, true)\" ng-true-value=\"1\" " +
"ng-false-value=\"0\" id=\"check_{{" + list.iterator + ".id}}\" /></td>"; "ng-false-value=\"0\" id=\"check_{{" + list.iterator + ".id}}\" /></td>";
} else if ((options.mode === 'edit' || options.mode === 'summary') && list.fieldActions) { } else if ((options.mode === 'edit' || options.mode === 'summary') && list.fieldActions) {