mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
fixed small error using float directive
i hadn't used the smart-float directive correctly and in all the right places. i also adjusted the default_float in survey maker->edit question function
This commit is contained in:
parent
90ae405424
commit
6292c8ddbd
@ -101,11 +101,11 @@ angular.module('SurveyQuestionFormDefinition', [])
|
||||
type: 'custom',
|
||||
control: '<div class="row">'+
|
||||
'<div class="col-xs-6">'+
|
||||
'<label for="minimum"><span class="label-text">Minimum</span></label><input id="float_min" type="number" name="float_min" ng-model="float_min" class="form-control" smartFloat >'+
|
||||
'<label for="minimum"><span class="label-text">Minimum</span></label><input id="float_min" type="number" name="float_min" ng-model="float_min" class="form-control" smart-float >'+
|
||||
'<div class="error" ng-show="survey_question_form.float_min.$invalid">This is not valid float!</div>'+
|
||||
'</div>'+
|
||||
'<div class="col-xs-6">'+
|
||||
'<label for="minimum"><span class="label-text">Maximum</span></label><input id="float_max" type="number" name="float_max" ng-model="float_max" class="form-control" smartFloat >'+
|
||||
'<label for="minimum"><span class="label-text">Maximum</span></label><input id="float_max" type="number" name="float_max" ng-model="float_max" class="form-control" smart-float >'+
|
||||
'<div class="error" ng-show="survey_question_form.float_max.$invalid">This is not valid float!</div>'+
|
||||
'</div>'+
|
||||
'</div>',
|
||||
@ -150,7 +150,7 @@ angular.module('SurveyQuestionFormDefinition', [])
|
||||
type: 'custom',
|
||||
control: '<div>'+
|
||||
'<label for="default_float"><span class="label-text">Default Answer</span></label>'+
|
||||
'<input type="number" ng-model="default_float" name="default_float" ng-min="float_min" ng-max="float_max" class="form-control" integer />'+
|
||||
'<input type="number" ng-model="default_float" name="default_float" ng-min="float_min" ng-max="float_max" class="form-control" smart-float />'+
|
||||
'<div class="error" ng-show="survey_question_form.default_float.$error.number || survey_question_form.default_float.$error.float">This is not valid float!</div>'+
|
||||
'<div class="error" ng-show="survey_question_form.default_float.$error.ngMin || survey_question_form.default_float.$error.ngMax"> The value must be in range {{float_min}} to {{float_max}}!</div>'+
|
||||
'</div>',
|
||||
|
||||
@ -118,7 +118,8 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
|
||||
url = params.url,
|
||||
e;
|
||||
|
||||
html+='<br>job_launch_form.$valid = {{job_launch_form.$valid}}<br></form>';
|
||||
// html+='<br>job_launch_form.$valid = {{job_launch_form.$valid}}<br>';
|
||||
html+='</form>';
|
||||
$('#password-modal').empty().html(html);
|
||||
$('#password-modal').find('textarea').before(scope.helpContainer);
|
||||
e = angular.element(document.getElementById('password-modal'));
|
||||
|
||||
@ -423,7 +423,7 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper',
|
||||
else if( question.type === 'float' ) {
|
||||
scope.float_min = question.min;
|
||||
scope.float_max = question.max;
|
||||
scope.default_int = question.default;
|
||||
scope.default_float = question.default;
|
||||
|
||||
}
|
||||
else if ( question.type === 'multiselect'){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user