Skip to content

Conversation

@ogustavo-pereira
Copy link
Contributor

@ogustavo-pereira ogustavo-pereira commented Oct 23, 2019

Closes #6463

In this pull-request change, when the user click on button SaveChanges the innerText is changed to Saving and the button is blocked with disabled=true for prevents the user from clicking twice.

@marceloschmidt, @ggazzo

const query = { group, changed: true };
const rcSettings = TempSettings.find(query, { fields: { _id: 1, value: 1, editor: 1 } }).fetch() || [];
if (rcSettings.length === 0) {
e.target.innerText = TAPi18n.__('Save_changes');
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't you also remove the disabled property here?

const failedSettings = [];

settings.batchSet(rcSettings, (err) => {
e.target.innerText = TAPi18n.__('Save_changes');
Copy link
Member

Choose a reason for hiding this comment

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

and here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the old version, when the settings is saved the button is change to disabled until you change some input.

If i add disabled false the button is forced to change, and "stop to saving" until you change some input

@ggazzo ggazzo added the area: ui Touches the code on client side label Oct 23, 2019
@ggazzo ggazzo added this to the 2.3.0 milestone Oct 23, 2019
@tassoevan
Copy link
Contributor

@oguhpereira What about bring it to #15452? 😃

@ggazzo ggazzo closed this Jan 14, 2020
@ogustavo-pereira ogustavo-pereira deleted the button-savechange-admin branch January 21, 2020 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui Touches the code on client side

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On admin, indicate settings are being saved after clicking the "Save changes" button

4 participants