New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update submissions.js to support "details" parameter of {{Afc decline}}. #25

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@zanhecht
Contributor

zanhecht commented Nov 4, 2014

Support "details" parameter of {{Afc decline}}.

A recent change started supporting the "reason" tag in {{Afc decline}}, but this didn't work with reasons such as a custom reason or the "dup" reason that require a second parameter. I have changed {{Afc decline}} to support a "details" parameter that passes a second parameter to {{AFC submission/comments}}. This parameter is already collected by the AFCH script for use in {{AFC submission}}, but needs to be passed to {{Afc decline}} as well.

As a disclaimer, I haven't tested this patch.

Update submissions.js
Support "details" parameter of {{Afc decline}}
@theopolisme

View changes

src/modules/submissions.js Outdated
@@ -1962,7 +1963,8 @@
'$1': AFCH.consts.pagename,
'$2': afchSubmission.shortTitle,
'$3': declineReason === 'cv' ? 'yes' : 'no',
'$4': declineReason
'$4': declineReason,
'$5': typeof newParams['3'] != 'undefined' ? newParams['3'] : ''

This comment has been minimized.

@theopolisme

theopolisme Nov 4, 2014

Contributor

Very minor nitpick, could you change this to newParams['3'] || '' instead? Just for the sake of keeping consistent style throughout the project.

This comment has been minimized.

@zanhecht

zanhecht Nov 4, 2014

Contributor

No problem, I made the change. When I started learning JavaScript in 1998, browsers that used JavaScript 1.0 or 1.1 were still common enough that I was taught to avoid using logical operators in that manner, but I guess that's not an issue any more.

@theopolisme

This comment has been minimized.

Contributor

theopolisme commented Nov 4, 2014

Hey, thanks for doing this! Really appreciate it. One minor thing and then I'll merge this and deploy it onwiki.

theopolisme added a commit that referenced this pull request Nov 4, 2014

Merge pull request #25 from zanhecht/afch-rewrite
Update submissions.js to support "details" parameter of {{Afc decline}}.
@theopolisme

This comment has been minimized.

Contributor

theopolisme commented Nov 4, 2014

Thanks, merged in 0e139d9 :)

If you happen to have any other contributions to the repository, I'd love to review them and get them merged as well!

Cheers

@theopolisme theopolisme closed this Nov 4, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment