I know this was raised for Drupal 7 - in #926984: Saving the message settings is not user specific. - and as per Comment #15 in that thread this was implemented in Drupal 8. However, for my use case it would be much better if it was optional whether to save these or not. Currently they are set for each user. In my case I would like the settings to be fixed across all users so that the message was set by user 1 and was not able to be changed by other users.

If this was possible, it would then also be great to be able to hide the options for Sender, Recipients, E-mail content, Additional e-mail options for all users except user 1 and just have a "Next" (or "Send") button that sent the mail(s).

I could hide these fields with css - as others have done - but it would be super-flexible to allow these to be options. It's a great module and this would (in my case) be a useful addition.

Any possibility that this could be implemented?

Issue fork views_send-2935687

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

namwebs created an issue. See original summary.

hansfn’s picture

Issue summary: View changes
hansfn’s picture

Assigned: Unassigned » hansfn

OK, I'll see if I can find some time for this module the coming weeks - it needs some love. This issue is also related to #2493363: Simplify send interface for non tech-savvy users.

ashrafabed’s picture

Status: Active » Needs review
FileSize
14.78 KB

I haven't tested this patch yet, but I just created it to save views_send values (configurable per view) for all users. It also hides those fields for users who do not have the permission "Configure default settings per view".

I'll be applying it to my site in the next few days to confirm it works as expected, but others are welcome to test/use it too.

hansfn’s picture

Thx for the contribution. I'll review when I get time.

codesmith’s picture

Hi @ashrafabed - any updates on how the patch worked for you? If it's still good, I'll give it go. :)

ashrafabed’s picture

FileSize
15.96 KB

Updating the patch a bit after initial testing. Will test the new version out and let you know how it goes :)

ashrafabed’s picture

The current (attached) version of the patch should work for users who are granted the ability to set the sitewide default value for the fields. That doesn't cover most use cases.

I still need to update the form validation so it doesn't throw an error when the email field is hidden.

Next steps are straightforward, but I won't be able to get to them tonight. Fingers crossed for tomorrow.

ashrafabed’s picture

Status: Needs review » Needs work
ashrafabed’s picture

Assigned: hansfn » ashrafabed
ashrafabed’s picture

Status: Needs work » Needs review
FileSize
14.64 KB

@codesmith The patch I'm attaching should be ready for review, it passed all of my tests.

codesmith’s picture

Thanks so much @ashrafabed. This looks really good. I needed to make the Email Content fields globally available so attaching a patch for that.

One comment - when a user first accesses the view, they'll get the global default values. After that, they only get their version of the values, not the global ones. Shouldn't the global values continue to take precedence if the "default values" box is checked. Or should this be a configuration option?

joelpittet’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Assigned: ashrafabed » Unassigned

This sounds like a great feature to bring back what D7 had. I'm moving it to the 2.0.x-dev branch for testing against Drupal 10

joelpittet’s picture

FileSize
16.21 KB

Here's a reroll of #12 with the patch paths relative to the project and for 2.x

ramil g made their first commit to this issue’s fork.

joelpittet’s picture

Hiding patches as MR should be used