Here's the use case:

A site is in private beta. "invites only" are allowed to register. Existing users should be able to send invites to people, so they can register immediately, WITHOUT including the relationship request. It would just be a simple checkbox for each possible relationship: "Send 'Friend' request too?"

That way, they can still tell people how cool the site is, and you should totally register, but you're not necessarily going to create a user relationship with my account.

Make sense?

Files: 
CommentFileSizeAuthor
#8 ur_invite_request-1430920-6.patch1.81 KBShawn DeArmond
PASSED: [[SimpleTest]]: [MySQL] 995 pass(es).
[ View ]
#2 ur_invite_request-1430920-2.patch1.78 KBShawn DeArmond
PASSED: [[SimpleTest]]: [MySQL] 995 pass(es).
[ View ]
#1 ur_invite_action-1430926-2.patch1.31 KBShawn DeArmond
PASSED: [[SimpleTest]]: [MySQL] 995 pass(es).
[ View ]

Comments

StatusFileSize
new1.31 KB
PASSED: [[SimpleTest]]: [MySQL] 995 pass(es).
[ View ]

This patch is better. I didn't need to check for UR-UI, since it's a dependency anyway.

Oops wrong issue. Meant to put this patch on #1430926: When "The following recipient is already a member:", provide link for relationship request

Status:Active» Needs review
StatusFileSize
new1.78 KB
PASSED: [[SimpleTest]]: [MySQL] 995 pass(es).
[ View ]

Okay, here's the patch for this issue. It creates a checkbox that uses form #states to show the radio buttons for relationships (if applicable). If it's unchecked, it's a normal invite without a UR request. If it's checked, it also includes the UR request.

Since UR-Invite currently has a bug, until it gets committed, you'll have to first apply patch #1 on #1345694: UR-Invite doesn't create required relationship before applying this patch.

Status:Needs review» Needs work

The last submitted patch, ur_invite_request-1430920-2.patch, failed testing.

Status:Needs work» Needs review

Of course it failed testing, since it needs that other patch first.

#2: ur_invite_request-1430920-2.patch queued for re-testing.

Status:Needs review» Needs work

+++ b/user_relationship_invites/user_relationship_invites.module
@@ -38,8 +38,21 @@ function user_relationship_invites_form_invite_form_alter(&$form, $form_state) {
+    $form['rtid']['#states'] = array(
+      'visible' => array(  // action to take.
+        ':input[name=ur_request]' => array('checked' => TRUE),
+      ),

The comment should be on a separate line and start with an uppercase letter.

Otherwise, happy to commit this, sounds useful.

Status:Needs work» Needs review

Patch updated to fix the comment.

Here's what it looks like now:

index bee7c97..d710007 100644
--- a/user_relationship_invites/user_relationship_invites.module
+++ b/user_relationship_invites/user_relationship_invites.module
@@ -38,8 +38,22 @@ function user_relationship_invites_form_invite_form_alter(&$form, $form_state) {
+    $form['rtid']['#weight'] = 0;
+    // Only show rtid if ur_request is checked.
+    $form['rtid']['#states'] = array(
+      'visible' => array(
+        ':input[name=ur_request]' => array('checked' => TRUE),
+      ),
+    );

StatusFileSize
new1.81 KB
PASSED: [[SimpleTest]]: [MySQL] 995 pass(es).
[ View ]

Let's attach the patch this time.

Status:Needs review» Fixed

Commited, thanks for the re-roll.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.