Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Password context based input #1897

Merged
merged 1 commit into from Jul 22, 2016
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ angular.module('PaperUI.services', [ 'PaperUI.constants' ]).config(function($htt
} else if (parameter.context.toUpperCase() === 'DAYOFWEEK') {
parameter.element = 'dayofweek';
parameter.inputType = 'text';
} else if (parameter.context.toUpperCase() === 'PASSWORD') {
parameter.element = 'input';
parameter.inputType = parameter.context === 'password' ? 'password' : 'text';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the context in upper case is equal to PASSWORD, why not set the inputType set to 'password' every time?
Why to we need to differ between

  • context = "Password" => inputType = text
  • context = "password" => inputType = password

} else {
parameter.element = 'input';
parameter.inputType = 'text';
Expand All @@ -145,9 +148,6 @@ angular.module('PaperUI.services', [ 'PaperUI.constants' ]).config(function($htt
if (parameter.options && parameter.options.length > 0) {
parameter.element = 'select';
parameter.options = parameter.options;
} else {
parameter.element = 'input';
parameter.inputType = parameter.context === 'password' ? 'password' : 'text';
}
} else if (parameter.type.toUpperCase() === 'BOOLEAN') {
parameter.element = 'switch';
Expand Down