Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions angular-prompt.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h4 class="modal-title">{{options.title}}</h4>
<form id="cgPromptForm" name="form.cgPromptForm" ng-if="options.input" ng-submit="submit()">
<div class="form-group" ng-class="{'has-error':cgPromptForm.$invalid && changed}">
<label for="cgPromptInput">{{options.label}}</label>
<input id="cgPromptInput" type="text" class="form-control" placeholder="{{options.label}}" ng-model="input.name" required ng-change="changed=true" ng-if="!options.values || options.values.length === 0"/ autofocus="autofocus">
<input id="cgPromptInput" type="{{options.valueType}}" class="form-control" placeholder="{{options.label}}" ng-model="input.name" required ng-change="changed=true" ng-if="!options.values || options.values.length === 0"/ autofocus="autofocus">
<div class="input-group" ng-if="options.values">
<input id="cgPromptInput" type="text" class="form-control" placeholder="{{options.label}}" ng-model="input.name" required ng-change="changed=true" autofocus="autofocus"/>

Expand All @@ -30,4 +30,4 @@ <h4 class="modal-title">{{options.title}}</h4>
<div class="modal-footer">
<button ng-repeat="button in options.buttons track by button.label" class="btn btn-default {{button.class}}" ng-class="{'btn-primary':button.primary}" ng-click="buttonClicked(button)">{{button.label}}</button>
</div>
</div>
</div>
1 change: 1 addition & 0 deletions angular-prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ angular.module('cgPrompt').factory('prompt',['$uibModal','$q',function($uibModal
input: false,
label: '',
value: '',
valueType:'text',
values: false,
buttons: [
{label:'Cancel',cancel:true},
Expand Down
3 changes: 2 additions & 1 deletion dist/angular-prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ angular.module('cgPrompt').factory('prompt',['$uibModal','$q',function($uibModal
input: false,
label: '',
value: '',
valueType:'text',
values: false,
buttons: [
{label:'Cancel',cancel:true},
Expand Down Expand Up @@ -120,7 +121,7 @@ angular.module('cgPrompt').run(['$templateCache', function($templateCache) {
" <form id=\"cgPromptForm\" name=\"form.cgPromptForm\" ng-if=\"options.input\" ng-submit=\"submit()\">\n" +
" <div class=\"form-group\" ng-class=\"{'has-error':cgPromptForm.$invalid && changed}\">\n" +
" <label for=\"cgPromptInput\">{{options.label}}</label>\n" +
" <input id=\"cgPromptInput\" type=\"text\" class=\"form-control\" placeholder=\"{{options.label}}\" ng-model=\"input.name\" required ng-change=\"changed=true\" ng-if=\"!options.values || options.values.length === 0\"/ autofocus=\"autofocus\">\n" +
" <input id=\"cgPromptInput\" type=\"{{options.valueType}}\" class=\"form-control\" placeholder=\"{{options.label}}\" ng-model=\"input.name\" required ng-change=\"changed=true\" ng-if=\"!options.values || options.values.length === 0\"/ autofocus=\"autofocus\">\n" +
" <div class=\"input-group\" ng-if=\"options.values\">\n" +
" <input id=\"cgPromptInput\" type=\"text\" class=\"form-control\" placeholder=\"{{options.label}}\" ng-model=\"input.name\" required ng-change=\"changed=true\" autofocus=\"autofocus\"/>\n" +
"\n" +
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-prompt.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.