Skip to content
Snippets Groups Projects
Commit 8ea73933 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

make the password field on database details an HTML password field so we don't...

make the password field on database details an HTML password field so we don't show passwords in plain text.
parent 1a6af153
Branches
Tags
No related merge requests found
......@@ -33,8 +33,9 @@
Otherwise we'll default to showing every field. This way we can hide 'advanced options' like SSL during the setup process -->
<div class="Form-field" ng-repeat="field in ENGINES[database.engine].fields" mb-form-field="{{field.fieldName}}" ng-if="!hiddenFields[field.fieldName]">
<mb-form-label display-name="{{field.displayName}}" field-name="{{field.fieldName}}"></mb-form-label>
<!-- Multiple-Choice Field -->
<div ng-if="field.choices" class="Form-input Form-offset full Button-group">
<div ng-if="field.type == 'select'" class="Form-input Form-offset full Button-group">
<button ng-repeat="choice in field.choices" class="Button"
ng-class="details[field.fieldName] === choice.value ? {active: 'Button--active',
danger: 'Button--danger'}[choice.selectionAccent] : null"
......@@ -42,8 +43,13 @@
{{choice.name}}
</button>
</div>
<!-- Password Field -->
<input ng-if="field.type == 'password'" type="password" class="Form-input Form-offset full" name="{{field.fieldName}}" placeholder="{{field.placeholder}}"
ng-model="details[field.fieldName]" ng-required="field.required" />
<!-- String Field (default) -->
<input ng-if="!field.choices" class="Form-input Form-offset full" name="{{field.fieldName}}" placeholder="{{field.placeholder}}"
<input ng-if="field.type == 'text'" class="Form-input Form-offset full" name="{{field.fieldName}}" placeholder="{{field.placeholder}}"
ng-model="details[field.fieldName]" ng-required="field.required" />
<span class="Form-charm"></span>
</div>
......
......@@ -451,31 +451,37 @@ CorvusServices.service('CorvusCore', ['$resource', 'User', function($resource, U
fields: [{
displayName: "Host",
fieldName: "host",
type: "text",
placeholder: "localhost",
placeholderIsDefault: true
}, {
displayName: "Port",
fieldName: "port",
type: "text",
transform: parseInt,
placeholder: "5432",
placeholderIsDefault: true
}, {
displayName: "Database name",
fieldName: "dbname",
type: "text",
placeholder: "birds_of_the_world",
required: true
}, {
displayName: "Database username",
fieldName: "user",
type: "text",
placeholder: "What username do you use to login to the database?",
required: true
}, {
displayName: "Database password",
fieldName: "password",
type: "password",
placeholder: "*******"
}, {
displayName: "Use a secure connection (SSL)?",
fieldName: "ssl",
type: "select",
choices: [{
name: 'Yes',
value: true,
......@@ -492,6 +498,7 @@ CorvusServices.service('CorvusCore', ['$resource', 'User', function($resource, U
fields: [{
displayName: "Connection String",
fieldName: "db",
type: "text",
placeholder: "file:/Users/camsaul/bird_sightings/toucans;AUTO_SERVER=TRUE"
}]
},
......@@ -500,25 +507,30 @@ CorvusServices.service('CorvusCore', ['$resource', 'User', function($resource, U
fields: [{
displayName: "Host",
fieldName: "host",
type: "text",
placeholder: "localhost",
placeholderIsDefault: true
}, {
displayName: "Port",
fieldName: "port",
type: "text",
transform: parseInt,
placeholder: "27017"
}, {
displayName: "Database name",
fieldName: "dbname",
type: "text",
placeholder: "carrierPigeonDeliveries",
required: true
}, {
displayName: "Database username",
fieldName: "user",
type: "text",
placeholder: "What username do you use to login to the database?"
}, {
displayName: "Database password",
fieldName: "pass",
type: "password",
placeholder: "******"
}]
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment