Commit 16e43b89 authored by estade's avatar estade Committed by Commit bot

Autofill - Also update instructions message when "New link?" is clicked.

BUG=487866

Review URL: https://codereview.chromium.org/1141983002

Cr-Commit-Position: refs/heads/master@{#330416}
parent 59b6dfa0
...@@ -53,6 +53,7 @@ CardUnmaskPromptViews::CardUnmaskPromptViews( ...@@ -53,6 +53,7 @@ CardUnmaskPromptViews::CardUnmaskPromptViews(
CardUnmaskPromptController* controller) CardUnmaskPromptController* controller)
: controller_(controller), : controller_(controller),
main_contents_(nullptr), main_contents_(nullptr),
instructions_(nullptr),
permanent_error_label_(nullptr), permanent_error_label_(nullptr),
input_row_(nullptr), input_row_(nullptr),
cvc_input_(nullptr), cvc_input_(nullptr),
...@@ -153,6 +154,7 @@ void CardUnmaskPromptViews::LinkClicked(views::Link* source, int event_flags) { ...@@ -153,6 +154,7 @@ void CardUnmaskPromptViews::LinkClicked(views::Link* source, int event_flags) {
cvc_input_->SetText(base::string16()); cvc_input_->SetText(base::string16());
GetDialogClientView()->UpdateDialogButtons(); GetDialogClientView()->UpdateDialogButtons();
GetWidget()->UpdateWindowTitle(); GetWidget()->UpdateWindowTitle();
instructions_->SetText(controller_->GetInstructionsMessage());
SetRetriableErrorMessage(base::string16()); SetRetriableErrorMessage(base::string16());
} }
...@@ -398,13 +400,12 @@ void CardUnmaskPromptViews::InitIfNecessary() { ...@@ -398,13 +400,12 @@ void CardUnmaskPromptViews::InitIfNecessary() {
new views::BoxLayout(views::BoxLayout::kVertical, kEdgePadding, 0, 0)); new views::BoxLayout(views::BoxLayout::kVertical, kEdgePadding, 0, 0));
main_contents_->AddChildView(controls_container); main_contents_->AddChildView(controls_container);
views::Label* instructions = instructions_ = new views::Label(controller_->GetInstructionsMessage());
new views::Label(controller_->GetInstructionsMessage()); instructions_->SetEnabledColor(kGreyTextColor);
instructions->SetEnabledColor(kGreyTextColor); instructions_->SetMultiLine(true);
instructions->SetMultiLine(true); instructions_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
instructions->SetHorizontalAlignment(gfx::ALIGN_LEFT); instructions_->SetBorder(views::Border::CreateEmptyBorder(0, 0, 16, 0));
instructions->SetBorder(views::Border::CreateEmptyBorder(0, 0, 16, 0)); controls_container->AddChildView(instructions_);
controls_container->AddChildView(instructions);
input_row_ = new views::View(); input_row_ = new views::View();
input_row_->SetLayoutManager( input_row_->SetLayoutManager(
......
...@@ -120,6 +120,9 @@ class CardUnmaskPromptViews : public CardUnmaskPromptView, ...@@ -120,6 +120,9 @@ class CardUnmaskPromptViews : public CardUnmaskPromptView,
views::View* main_contents_; views::View* main_contents_;
// Expository language at the top of the dialog.
views::Label* instructions_;
// The error label for permanent errors (where the user can't retry). // The error label for permanent errors (where the user can't retry).
views::Label* permanent_error_label_; views::Label* permanent_error_label_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment