Fixed placeholder (#201)
* Fixed placeholder * Clean up Co-authored-by: Daniel Si Pham <v-danpha@microsoft.com>
This commit is contained in:
parent
e22675bc40
commit
dfd18152ca
|
@ -73,8 +73,8 @@
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<input id="database-id" type="text" aria-required="true" autocomplete="off" pattern="[^/?#\\]*[^/?# \\]"
|
<input id="database-id" type="text" aria-required="true" autocomplete="off" pattern="[^/?#\\]*[^/?# \\]"
|
||||||
title="May not end with space nor contain characters '\' '/' '#' '?'" placeholder="Type a new database id"
|
title="May not end with space nor contain characters '\' '/' '#' '?'"
|
||||||
size="40" class="collid" data-bind="textInput: databaseId, hasFocus: firstFieldHasFocus"
|
size="40" class="collid" data-bind="textInput: databaseId, hasFocus: firstFieldHasFocus, attr: { placeholder: databaseIdPlaceHolder }"
|
||||||
aria-label="Database id" autofocus>
|
aria-label="Database id" autofocus>
|
||||||
|
|
||||||
<!-- Database provisioned throughput - Start -->
|
<!-- Database provisioned throughput - Start -->
|
||||||
|
|
|
@ -16,6 +16,7 @@ import { PlatformType } from "../../PlatformType";
|
||||||
export default class AddDatabasePane extends ContextualPaneBase {
|
export default class AddDatabasePane extends ContextualPaneBase {
|
||||||
public defaultExperience: ko.Computed<string>;
|
public defaultExperience: ko.Computed<string>;
|
||||||
public databaseIdLabel: ko.Computed<string>;
|
public databaseIdLabel: ko.Computed<string>;
|
||||||
|
public databaseIdPlaceHolder: ko.Computed<string>;
|
||||||
public databaseId: ko.Observable<string>;
|
public databaseId: ko.Observable<string>;
|
||||||
public databaseIdTooltipText: ko.Computed<string>;
|
public databaseIdTooltipText: ko.Computed<string>;
|
||||||
public databaseLevelThroughputTooltipText: ko.Computed<string>;
|
public databaseLevelThroughputTooltipText: ko.Computed<string>;
|
||||||
|
@ -70,6 +71,11 @@ export default class AddDatabasePane extends ContextualPaneBase {
|
||||||
this.databaseIdLabel = ko.computed<string>(() =>
|
this.databaseIdLabel = ko.computed<string>(() =>
|
||||||
this.container.isPreferredApiCassandra() ? "Keyspace id" : "Database id"
|
this.container.isPreferredApiCassandra() ? "Keyspace id" : "Database id"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.databaseIdPlaceHolder = ko.computed<string>(() =>
|
||||||
|
this.container.isPreferredApiCassandra() ? "Type a new keyspace id" : "Type a new database id"
|
||||||
|
);
|
||||||
|
|
||||||
this.databaseIdTooltipText = ko.computed<string>(() => {
|
this.databaseIdTooltipText = ko.computed<string>(() => {
|
||||||
const isCassandraAccount: boolean = this.container.isPreferredApiCassandra();
|
const isCassandraAccount: boolean = this.container.isPreferredApiCassandra();
|
||||||
return `A ${isCassandraAccount ? "keyspace" : "database"} is a logical container of one or more ${
|
return `A ${isCassandraAccount ? "keyspace" : "database"} is a logical container of one or more ${
|
||||||
|
|
Loading…
Reference in New Issue