Skip to content

Commit d3fad60

Browse files
cleanup of inputType to use consistent template substitution instead of raw string interpolation; see #4707
1 parent 56e9706 commit d3fad60

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: js/angular/service/popup.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicB
466466
function showPrompt(opts) {
467467
var scope = $rootScope.$new(true);
468468
scope.data = {};
469+
scope.data.fieldtype = opts.inputType ? opts.inputType : 'text';
469470
scope.data.response = opts.defaultText ? opts.defaultText : '';
470471
scope.data.placeholder = opts.inputPlaceholder ? opts.inputPlaceholder : '';
471472
scope.data.maxlength = opts.maxLength ? parseInt(opts.maxLength) : '';
@@ -476,7 +477,7 @@ function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicB
476477
}
477478
return showPopup(extend({
478479
template: text + '<input ng-model="data.response" '
479-
+ 'type="' + (opts.inputType || 'text') + '" '
480+
+ 'type="{{ data.fieldtype }}"'
480481
+ 'maxlength="{{ data.maxlength }}"'
481482
+ 'placeholder="{{ data.placeholder }}"'
482483
+ '>',

0 commit comments

Comments
 (0)