This issue is a continuation of #4132
On the requests page, there is a button to subscribe to emails:

However that cannot be done unless a user is logged in, so a warning popup is shown. What we want to do is make a login modal appear when the button is clicked and the user is not logged in.
@SidharthBansal where can one find the partial for the subscribe button?
Patiala are present in the app/views folder check them there
Partials I mean
Great to see you working you on this.
Basic flow
User not logged in->presses the buttom-> login modal-> logs in successfully->email is subscribed with notification
User already logged in wants to subscribe works well
Alternate flow
Subscription is already present so user gets subscribed with notification
User already logged in wants to unsubscribe successfully
So you need to ensure at least above 4 mentioned flows
Ok.
I'm using
<% if current_user %>
a
<% else %>
b
<% end %>
to check if a user is logged in. However, a runs even if the user is logged out. Also is there a way to route the page back to the current one when the login is successful?
Integrated modal testing
Please submit this task for review I should approve it now.
to check if a user is logged in. However, a runs even if the user is logged out. Also is there a way to route the page back to the current one when the login is successful?
Please look at @okonek's PR of linking like buttons it will help you
Please submit a PR for the rewards. I have already rewarded for the identification of this task in #4132
@JonathanXu1 you have received points for these suggestions. It is part of identication issue #4132
https://github.com/publiclab/plots2/pull/4209#issuecomment-445678224
Sorry I believe I misunderstood your statement. I thought it was one task per fto issue created.
If you create a first timer issue with full fledged solution and the first timer template then you will get rewards.
Is it now clear?
Oh I see. So all I have to do is provide an example solution for my fto issues regarding the modal?
You can provide it if you want.
OR
If you want to send us a pr. Then you can also do that.
Just a note that this button is stored in the node body, not in the
codebase. Still a great idea! Just may require either some clever filtering
of body content or some kind of shortcode to show a subscription button?
On Sun, Dec 9, 2018 at 10:05 PM Jonathan Xu notifications@github.com
wrote:
@SidharthBansal https://github.com/SidharthBansal where can one find
the partial for the subscribe button?—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/4192#issuecomment-445666561,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ5LIZisp7m6SvO_cBmHrFYNcI53Vks5u3d19gaJpZM4ZJvCX
.
@jywarren I think this might be similar to https://github.com/publiclab/plots2/issues/4170
Is it possible for us to get a copy of the node body and submit that to complete the task?
if you click the edit button you'll be able to see the raw body -- try it!
On Mon, Dec 10, 2018 at 9:00 AM Jonathan Xu notifications@github.com
wrote:
@jywarren https://github.com/jywarren I think this might be similar to
4170 https://github.com/publiclab/plots2/issues/4170
Is it possible for us to get a copy of the node body and submit that to
complete the task?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/4192#issuecomment-445845154,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ6L7VOaAll5yjZRoxVsrQ3n8nupmks5u3nbhgaJpZM4ZJvCX
.
@JonathanXu1 how is it going?
Do you need any help?
@Dsxv you were asking for issues to be assigned to you.
Do you want to do this?
@SidharthBansal Yes I'd love to take this up ! sorry for late reply .
Thanks !
@Dsxv how is it going here?
https://github.com/publiclab/plots2/blob/master/doc/LOGIN_SYSTEMS.md will help you.
See requireLogin class.
Yes, I'm sorry for the delay , I'll create a PR asap
No problem. It is similar to the last PR which you did.
Please link the PR number to this issue so that I can review and merge it up
Yes, actually I'm having a problem , https://publiclab.org/wiki/requests , this page is not available on localhost and I'm not able to find the Subscribe to email button on localhost, also I'm not sure how I am going to test after I integrate the requireLogin class in it .
Thanks for help!
You have to create a similar page on the local host by going to /wiki/new.
On Mon, Jan 21, 2019, 9:53 AM Pawan Shukla <[email protected] wrote:
Yes, actually I'm having a problem , https://publiclab.org/wiki/requests
, this page is not available on localhost and I'm not able to find the Subscribe
to email button on localhost, also I'm not sure how I am going to test
after I integrate the requireLogin class in it .
Thanks for help!—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/4192#issuecomment-455944346,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AUACQxfp2aINs_6nalLuClVHn5W93pKmks5vFUC0gaJpZM4ZJvCX
.
Yes , but how should I add the subscribe to email button ?
Thanks!
You have to create a similar page on the local host by going to /wiki/new.
…
On Mon, Jan 21, 2019, 9:53 AM Pawan Shukla @.* wrote: Yes, actually I'm having a problem , https://publiclab.org/wiki/requests , this page is not available on localhost and I'm not able to find the Subscribe to email button on localhost, also I'm not sure how I am going to test after I integrate the requireLogin class in it . Thanks for help! — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#4192 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AUACQxfp2aINs_6nalLuClVHn5W93pKmks5vFUC0gaJpZM4ZJvCX .
Hi, I am really Sorry Pawan for not telling you that this issue is fixed.
Oorjit fixed it. There are many PRs/issues related. His solution aimed to fix grids which fixed this also.
Once the changes will be published everything will work fine on the production branch.
Thanks Pawan for help.