- Issue created by @dipakmdhrm
- @dipakmdhrm opened merge request.
- First commit to issue fork.
- Merge request !30Disable the "dialog on node edit form" when updating a published node without changing it's moderation state. → (Closed) created by balagan
There's a config in the module that displays the following warning in a dialog when user edits the node and at the same time changes the moderation status from 'non-published' to 'published'.
The warning text: "Are you sure you want to publish this item?"
The config:
The warning dialog:
The problem here is that the config clearly says that the dialog will appear when "when state changes from non-published to published.".
However the dialog also appears when node is already published and user updates the node without changing its moderation status. i.e. from 'published to published'.
This is opposite of what the message says.
Following is the JS code responsible for this, the else-if condition to be specific:
if ((cur_state == '' || cur_state == Drupal.t('Draft')) && (new_state == Drupal.t('Published'))) {
e.preventDefault();
confirmationDialog_publish.showModal();
return false;
}
else if ((cur_state == Drupal.t('Published')) && (new_state == Drupal.t('Published'))) {
e.preventDefault();
confirmationDialog_publish.showModal();
return false;
}
Active
2.0
Code