Skip to content

Commit

Permalink
fix: Replace keyword auto-attach from registration dialog
Browse files Browse the repository at this point in the history
* Card ID: CCT-425
* Keyword auto-attach was replaced with name enable content,
  because auto-attach does not make sense in SCA mode and
  enable content is more decent
  • Loading branch information
jirihnidek committed Jun 10, 2024
1 parent cd87d63 commit 6ab887f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function openRegisterDialog() {
insights_available: subscriptionsClient.insightsAvailable,
insights_detected: false,
register_method: 'account',
auto_attach: true
enable_content: true
});

Insights.detect().then(installed => {
Expand Down
2 changes: 1 addition & 1 deletion src/subscriptions-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ client.registerSystem = (subscriptionDetails, update_progress) => new Promise((r
else {
console.debug('registering using username and password');
const registration_options = {
"enable_content": dbus_bool(subscriptionDetails.auto_attach)
"enable_content": dbus_bool(subscriptionDetails.enable_content)
};
console.log('registration_options:', registration_options);
if (update_progress)
Expand Down
8 changes: 4 additions & 4 deletions src/subscriptions-register.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class SubscriptionRegisterDialog extends React.Component {
if (this.props.insights_available === true) {
insights_checkbox_disabled = false;
} else {
if (this.props.auto_attach === true) {
if (this.props.enable_content === true) {
insights_checkbox_disabled = false;
}
}
Expand Down Expand Up @@ -177,10 +177,10 @@ class SubscriptionRegisterDialog extends React.Component {
{ credentials }
</FormGroup>
<FormGroup className="control-label" label={_("Subscriptions")} hasNoPaddingTop>
<Checkbox id="subscription-auto-attach-use" isChecked={this.props.auto_attach}
label={_("Attach automatically")}
<Checkbox id="subscription-enable-content" isChecked={this.props.enable_content}
label={_("Enable content")}
onChange={value => {
this.props.onChange('auto_attach', value);
this.props.onChange('enable_content', value);
this.props.insights && !value && this.props.onChange('insights', value);
}}
/>
Expand Down

0 comments on commit 6ab887f

Please sign in to comment.