Jelajahi Sumber

Merge branch 'master' of https://github.com/unaio/una

AntonLV 6 tahun lalu
induk
melakukan
2dfbd03113

+ 1 - 2
modules/base/groups/classes/BxBaseModGroupsAlertsResponse.php

@@ -66,7 +66,7 @@ class BxBaseModGroupsAlertsResponse extends BxBaseModProfileAlertsResponse
                 $sKey = $oKeys->getNewKey(false, $iKeyLifetime);
                 $sKey = $oKeys->getNewKey(false, $iKeyLifetime);
                 $this->_oModule->_oDb->insertInvite($sKey, $oAlert->iSender, $iSender, $iProfileId);
                 $this->_oModule->_oDb->insertInvite($sKey, $oAlert->iSender, $iSender, $iProfileId);
               
               
-                $sEntryUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_INVITE_TO_ENTRY'] . '&id=' . $oAlert->iObject . "&key=" . $sKey);
+                $sEntryUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $oAlert->iObject . "&key=" . $sKey);
                 sendMailTemplate($this->_oModule->_oConfig->CNF['EMAIL_INVITATION'], 0, $iProfileId, array(
                 sendMailTemplate($this->_oModule->_oConfig->CNF['EMAIL_INVITATION'], 0, $iProfileId, array(
                     'InviterUrl' => BxDolProfile::getInstance($iSender)->getUrl(),
                     'InviterUrl' => BxDolProfile::getInstance($iSender)->getUrl(),
                     'InviterDisplayName' => BxDolProfile::getInstance($iSender)->getDisplayName(),
                     'InviterDisplayName' => BxDolProfile::getInstance($iSender)->getDisplayName(),
@@ -74,7 +74,6 @@ class BxBaseModGroupsAlertsResponse extends BxBaseModProfileAlertsResponse
                     'EntryTitle' => $oAlert->aExtras['entry_title'],
                     'EntryTitle' => $oAlert->aExtras['entry_title'],
                 ), BX_EMAIL_NOTIFY);
                 ), BX_EMAIL_NOTIFY);
             }
             }
-            
         }
         }
         else{
         else{
             sendMailTemplate($this->_oModule->_oConfig->CNF['EMAIL_INVITATION'], 0, $iProfileId, array(
             sendMailTemplate($this->_oModule->_oConfig->CNF['EMAIL_INVITATION'], 0, $iProfileId, array(

+ 11 - 16
modules/base/groups/classes/BxBaseModGroupsFormsEntryHelper.php

@@ -67,25 +67,20 @@ class BxBaseModGroupsFormsEntryHelper extends BxBaseModProfileFormsEntryHelper
 
 
         $this->inviteMembers ($oGroupProfile, bx_get('initial_members'));
         $this->inviteMembers ($oGroupProfile, bx_get('initial_members'));
 
 
-        if (bx_get('key')){
-            $sKey = bx_get('key');
-            $aData = $this->_oModule->_oDb->getInviteByKey($sKey, $oGroupProfile->id());
-            if (isset($aData['invited_profile_id'])){
-                $CNF = &$this->_oModule->_oConfig->CNF;
-                if (!isset($CNF['OBJECT_CONNECTIONS']) || !($oConnection = BxDolConnection::getObjectInstance($CNF['OBJECT_CONNECTIONS'])))
-                    return '';
-                $iInvitedProfileId = $aData['invited_profile_id'];
-                if($oConnection && !$oConnection->isConnected($iInvitedProfileId, $oGroupProfile->id())){
-                    $oConnection->addConnection($iInvitedProfileId, $oGroupProfile->id());
-                    $oConnection->addConnection($oGroupProfile->id(), $iInvitedProfileId);
-                    $this->_oModule->_oDb->deleteInviteByKey($sKey,  $oGroupProfile->id(), 'date_join', time());
-                }
-            }
-        }
-        
         return '';
         return '';
     }
     }
     
     
+    protected function redirectAfterEdit($aContentInfo)
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+        if (bx_get('initial_members') && isset($CNF['URL_ENTRY_FANS'])){
+            $this->_redirectAndExit($CNF['URL_ENTRY_FANS'] . '&profile_id=' . $aContentInfo['profile_id']);
+        }
+        else{
+            $this->_redirectAndExit('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]);
+        }
+    }
+    
     public function onDataDeleteAfter ($iContentId, $aContentInfo, $oProfile)
     public function onDataDeleteAfter ($iContentId, $aContentInfo, $oProfile)
     {
     {
         $CNF = &$this->_oModule->_oConfig->CNF;
         $CNF = &$this->_oModule->_oConfig->CNF;

+ 27 - 12
modules/base/groups/classes/BxBaseModGroupsModule.php

@@ -31,7 +31,30 @@ class BxBaseModGroupsModule extends BxBaseModProfileModule
         header('Content-Type:text/javascript; charset=utf-8');
         header('Content-Type:text/javascript; charset=utf-8');
         echo(json_encode($a));
         echo(json_encode($a));
     }
     }
-
+    
+    /**
+     * Process Process Invitation
+     */
+    public function actionProcessInvite ($sKey, $iGroupProfileId, $bAccept)
+    {
+        $aData = $this->_oDb->getInviteByKey($sKey, $iGroupProfileId);
+        if (isset($aData['invited_profile_id'])){
+            $CNF = &$this->_oConfig->CNF;
+            if (!isset($CNF['OBJECT_CONNECTIONS']) || !($oConnection = BxDolConnection::getObjectInstance($CNF['OBJECT_CONNECTIONS'])))
+                return '';
+            $iInvitedProfileId = $aData['invited_profile_id'];
+            if ($iInvitedProfileId != bx_get_logged_profile_id())
+                return '';
+            if ($bAccept){
+                if($oConnection && !$oConnection->isConnected($iInvitedProfileId, $iGroupProfileId)){
+                    $oConnection->addConnection($iInvitedProfileId, $iGroupProfileId);
+                    $oConnection->addConnection($iGroupProfileId, $iInvitedProfileId);
+                }
+            }
+            $this->_oDb->deleteInviteByKey($sKey, $iGroupProfileId);
+        }   
+    }
+ 
     public function serviceGetSearchResultUnit ($iContentId, $sUnitTemplate = '')
     public function serviceGetSearchResultUnit ($iContentId, $sUnitTemplate = '')
     {
     {
         if(empty($sUnitTemplate))
         if(empty($sUnitTemplate))
@@ -393,20 +416,12 @@ class BxBaseModGroupsModule extends BxBaseModProfileModule
 
 
         return $this->_serviceBrowse ('created_entries', array('author' => $iProfileId), BX_DB_PADDING_DEF, $bDisplayEmptyMsg);
         return $this->_serviceBrowse ('created_entries', array('author' => $iProfileId), BX_DB_PADDING_DEF, $bDisplayEmptyMsg);
     }
     }
-
     
     
     public function serviceEntityInvite ($iContentId = 0, $bErrorMsg = true)
     public function serviceEntityInvite ($iContentId = 0, $bErrorMsg = true)
     {
     {
-        if (bx_get('key')){
-            if (isset($this->_oConfig->CNF['OBJECT_FORM_ENTRY_DISPLAY_JOIN']))
-                return $this->_serviceEntityForm ('editDataForm', $iContentId, $this->_oConfig->CNF['OBJECT_FORM_ENTRY_DISPLAY_JOIN'], 'checkAllowedJoin', $bErrorMsg);
-            return false;
-        }
-        else{
-            if (isset($this->_oConfig->CNF['OBJECT_FORM_ENTRY_DISPLAY_INVITE']))
-                return $this->_serviceEntityForm ('editDataForm', $iContentId, $this->_oConfig->CNF['OBJECT_FORM_ENTRY_DISPLAY_INVITE'], false, $bErrorMsg);
-            return false;
-        }
+        if (isset($this->_oConfig->CNF['OBJECT_FORM_ENTRY_DISPLAY_INVITE']))
+            return $this->_serviceEntityForm ('editDataForm', $iContentId, $this->_oConfig->CNF['OBJECT_FORM_ENTRY_DISPLAY_INVITE'], false, $bErrorMsg);
+        return false;
     }
     }
     
     
     /**
     /**

+ 25 - 0
modules/base/groups/classes/BxBaseModGroupsPageEntry.php

@@ -42,6 +42,31 @@ class BxBaseModGroupsPageEntry extends BxBaseModProfilePageEntry
 
 
         $this->_oModule->checkAllowedView($this->_aContentInfo, true);
         $this->_oModule->checkAllowedView($this->_aContentInfo, true);
     }
     }
+    
+    public function getCode ()
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+        $sRv = '';
+        if (bx_get('key')){
+            $sKey = bx_get('key');
+            $this->_oTemplate->addJs(array('invite_popup.js'));
+            $sId = $this->_oModule->getName() . '_popup_invite';
+            
+            $sContent = $this->_oModule->_oTemplate->parseHtmlByName('popup_invite.html', array(
+                'PopupId' => $sId
+            ));
+            
+            $sRv = $this->_oModule->_oTemplate->getJsCode('invite_popup', array(
+                'sPopupId' => $sId,
+                'sKey' => $sKey,
+                'sAcceptUrl' =>  BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $this->_aProfileInfo['content_id']),
+                'sDeclineUrl' => BX_DOL_URL_ROOT,
+                'iGroupProfileId' => $this->_oProfile->id(),
+            )) . BxTemplFunctions::getInstance()->popupBox($sId, _t($CNF['T']['txt_invitation_popup_title']), $sContent, true);
+        }
+        
+        return $sRv . parent::getCode();
+    }
 }
 }
 
 
 /** @} */
 /** @} */

+ 13 - 0
modules/base/groups/template/popup_invite.html

@@ -0,0 +1,13 @@
+<div class="bx-def-padding" id="__PopupId___wrp">
+    <div class=" bx-form-input-wrapper bx-form-input-wrapper-text">
+        <bx_text:_bx_groups_txt_invite_popup_text />
+    </div>
+    <div class="bx-def-margin-top bx-clearfix">
+        <button class="bx-btn bx-def-margin-thd bx-invite-accept" type="button">
+            <bx_text:_bx_groups_txt_invite_popup_button_accept />
+        </button>
+        <button class="bx-btn bx-def-margin-thd bx-invite-decline" type="button">
+            <bx_text:_bx_groups_txt_invite_popup_button_decline />
+        </button>
+    </div>
+</div>

+ 6 - 5
modules/boonex/groups/classes/BxGroupsConfig.php

@@ -64,7 +64,6 @@ class BxGroupsConfig extends BxBaseModProfileConfig
             // page URIs
             // page URIs
             'URI_VIEW_ENTRY' => 'view-group-profile',
             'URI_VIEW_ENTRY' => 'view-group-profile',
             'URI_EDIT_ENTRY' => 'edit-group-profile',
             'URI_EDIT_ENTRY' => 'edit-group-profile',
-            'URI_INVITE_TO_ENTRY' => 'invite-to-group',
             'URI_EDIT_COVER' => 'edit-group-cover',
             'URI_EDIT_COVER' => 'edit-group-cover',
             'URI_JOINED_ENTRIES' => 'joined-groups',
             'URI_JOINED_ENTRIES' => 'joined-groups',
             'URI_MANAGE_COMMON' => 'groups-manage',
             'URI_MANAGE_COMMON' => 'groups-manage',
@@ -108,7 +107,6 @@ class BxGroupsConfig extends BxBaseModProfileConfig
             'OBJECT_FORM_ENTRY_DISPLAY_EDIT_COVER' => 'bx_group_edit_cover',
             'OBJECT_FORM_ENTRY_DISPLAY_EDIT_COVER' => 'bx_group_edit_cover',
             'OBJECT_FORM_ENTRY_DISPLAY_DELETE' => 'bx_group_delete',
             'OBJECT_FORM_ENTRY_DISPLAY_DELETE' => 'bx_group_delete',
             'OBJECT_FORM_ENTRY_DISPLAY_INVITE' => 'bx_group_invite',
             'OBJECT_FORM_ENTRY_DISPLAY_INVITE' => 'bx_group_invite',
-            'OBJECT_FORM_ENTRY_DISPLAY_JOIN' => 'bx_group_join',
             'OBJECT_MENU_ACTIONS_VIEW_ENTRY' => 'bx_groups_view_actions', // actions menu on view entry page
             'OBJECT_MENU_ACTIONS_VIEW_ENTRY' => 'bx_groups_view_actions', // actions menu on view entry page
             'OBJECT_MENU_ACTIONS_VIEW_ENTRY_MORE' => 'bx_groups_view_actions_more', // actions menu on view entry page for "more" popup
             'OBJECT_MENU_ACTIONS_VIEW_ENTRY_MORE' => 'bx_groups_view_actions_more', // actions menu on view entry page for "more" popup
             'OBJECT_MENU_ACTIONS_VIEW_ENTRY_ALL' => 'bx_groups_view_actions_all', // all actions menu on view entry page
             'OBJECT_MENU_ACTIONS_VIEW_ENTRY_ALL' => 'bx_groups_view_actions_all', // all actions menu on view entry page
@@ -199,17 +197,20 @@ class BxGroupsConfig extends BxBaseModProfileConfig
                 'menu_item_title_leave_group_cancel_request' => '_bx_groups_menu_item_title_leave_group_cancel_request',
                 'menu_item_title_leave_group_cancel_request' => '_bx_groups_menu_item_title_leave_group_cancel_request',
                 'menu_item_title_become_fan' => '_bx_groups_menu_item_title_become_fan',
                 'menu_item_title_become_fan' => '_bx_groups_menu_item_title_become_fan',
                 'menu_item_title_leave_group' => '_bx_groups_menu_item_title_leave_group',
                 'menu_item_title_leave_group' => '_bx_groups_menu_item_title_leave_group',
-                'txt_all_entries_by_author' => '_bx_groups_page_title_browse_by_author'
+                'txt_all_entries_by_author' => '_bx_groups_page_title_browse_by_author',
+                'txt_invitation_popup_title' => '_bx_groups_txt_invite_popup_title'
             ),
             ),
 
 
         );
         );
 
 
         $this->_aJsClasses = array(
         $this->_aJsClasses = array(
-        	'manage_tools' => 'BxGroupsManageTools'
+        	'manage_tools' => 'BxGroupsManageTools',
+            'invite_popup' => 'BxGroupsInvitePopup'
         );
         );
 
 
         $this->_aJsObjects = array(
         $this->_aJsObjects = array(
-        	'manage_tools' => 'oBxGroupsManageTools'
+        	'manage_tools' => 'oBxGroupsManageTools',
+            'invite_popup' => 'oBxGroupsInvitePopup'
         );
         );
 
 
         $this->_aGridObjects = array(
         $this->_aGridObjects = array(

+ 4 - 3
modules/boonex/groups/install/langs/en.xml

@@ -17,15 +17,12 @@
 	<string name="_bx_groups_form_profile_display_view"><![CDATA[View Group]]></string>
 	<string name="_bx_groups_form_profile_display_view"><![CDATA[View Group]]></string>
 	<string name="_bx_groups_form_profile_display_view_full"><![CDATA[Full View Group]]></string>
 	<string name="_bx_groups_form_profile_display_view_full"><![CDATA[Full View Group]]></string>
 	<string name="_bx_groups_form_profile_display_invite"><![CDATA[Invite to Group]]></string>
 	<string name="_bx_groups_form_profile_display_invite"><![CDATA[Invite to Group]]></string>
-  <string name="_bx_groups_form_profile_display_join"><![CDATA[Join to Group]]></string>
 	<string name="_bx_groups_form_entry_input_author"><![CDATA[Author]]></string>
 	<string name="_bx_groups_form_entry_input_author"><![CDATA[Author]]></string>
 	<string name="_bx_groups_form_profile_input_sys_do_submit"><![CDATA[Submit]]></string>
 	<string name="_bx_groups_form_profile_input_sys_do_submit"><![CDATA[Submit]]></string>
     <string name="_bx_groups_form_profile_input_sys_join_confirm"><![CDATA[Join confirmation]]></string>
     <string name="_bx_groups_form_profile_input_sys_join_confirm"><![CDATA[Join confirmation]]></string>
     <string name="_bx_groups_form_profile_input_join_confirm"><![CDATA[Join confirmation]]></string>
     <string name="_bx_groups_form_profile_input_join_confirm"><![CDATA[Join confirmation]]></string>
     <string name="_bx_groups_form_profile_input_sys_allow_view_to"><![CDATA[Visible to]]></string>
     <string name="_bx_groups_form_profile_input_sys_allow_view_to"><![CDATA[Visible to]]></string>
     <string name="_bx_groups_form_profile_input_allow_view_to"><![CDATA[Visible to]]></string>
     <string name="_bx_groups_form_profile_input_allow_view_to"><![CDATA[Visible to]]></string>
-    <string name="_bx_groups_form_profile_input_sys_join_info"><![CDATA[Join info]]></string>
-    <string name="_bx_groups_form_profile_input_join_info_value"><![CDATA[You have been invited to a group. Click the button below to accept the invitation.]]></string>
     <string name="_bx_groups_form_profile_input_allow_view_to_desc"><![CDATA[Closed - anyone can find the group and see who's in it, only members can see posts. Secret - only members can find the group and see posts.]]></string>
     <string name="_bx_groups_form_profile_input_allow_view_to_desc"><![CDATA[Closed - anyone can find the group and see who's in it, only members can see posts. Secret - only members can find the group and see posts.]]></string>
     <string name="_bx_groups_form_profile_input_sys_allow_post_to"><![CDATA[Who can post]]></string>
     <string name="_bx_groups_form_profile_input_sys_allow_post_to"><![CDATA[Who can post]]></string>
     <string name="_bx_groups_form_profile_input_allow_post_to"><![CDATA[Who can post]]></string>
     <string name="_bx_groups_form_profile_input_allow_post_to"><![CDATA[Who can post]]></string>
@@ -280,6 +277,10 @@
     <string name="_bx_groups_txt_to_admins"><![CDATA[To Admins]]></string>
     <string name="_bx_groups_txt_to_admins"><![CDATA[To Admins]]></string>
     <string name="_bx_groups_txt_from_admins"><![CDATA[From Admins]]></string>
     <string name="_bx_groups_txt_from_admins"><![CDATA[From Admins]]></string>
     <string name="_bx_groups_txt_private_group"><![CDATA[Private group]]></string>
     <string name="_bx_groups_txt_private_group"><![CDATA[Private group]]></string>
+    <string name="_bx_groups_txt_invite_popup_text"><![CDATA[You have been invited to a group. Click the button below to accept the invitation.]]></string>
+    <string name="_bx_groups_txt_invite_popup_title"><![CDATA[Invitation to a group]]></string>
+    <string name="_bx_groups_txt_invite_popup_button_accept"><![CDATA[Accept]]></string>
+    <string name="_bx_groups_txt_invite_popup_button_decline"><![CDATA[Decline]]></string>
 
 
 	<string name="_bx_groups_alert_action_fan_added"><![CDATA[member joined]]></string>
 	<string name="_bx_groups_alert_action_fan_added"><![CDATA[member joined]]></string>
     <string name="_bx_groups_txt_ntfs_fan_added"><![CDATA[Group <b class="bx-ntfs-content-profile">{owner_name}</b> has got a member <b class="bx-ntfs-content-entry">{subentry_sample}</b>]]></string>
     <string name="_bx_groups_txt_ntfs_fan_added"><![CDATA[Group <b class="bx-ntfs-content-profile">{owner_name}</b> has got a member <b class="bx-ntfs-content-entry">{subentry_sample}</b>]]></string>

+ 2 - 7
modules/boonex/groups/install/sql/install.sql

@@ -253,8 +253,7 @@ INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`,
 ('bx_group', 'bx_group_edit_cover', 'bx_groups', 0, '_bx_groups_form_profile_display_edit_cover'),
 ('bx_group', 'bx_group_edit_cover', 'bx_groups', 0, '_bx_groups_form_profile_display_edit_cover'),
 ('bx_group', 'bx_group_view', 'bx_groups', 1, '_bx_groups_form_profile_display_view'),
 ('bx_group', 'bx_group_view', 'bx_groups', 1, '_bx_groups_form_profile_display_view'),
 ('bx_group', 'bx_group_view_full', 'bx_groups', 1, '_bx_groups_form_profile_display_view_full'),
 ('bx_group', 'bx_group_view_full', 'bx_groups', 1, '_bx_groups_form_profile_display_view_full'),
-('bx_group', 'bx_group_invite', 'bx_groups', 0, '_bx_groups_form_profile_display_invite'),
-('bx_group', 'bx_group_join', 'bx_groups', 0, '_bx_groups_form_profile_display_join');
+('bx_group', 'bx_group_invite', 'bx_groups', 0, '_bx_groups_form_profile_display_invite');
 
 
 INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES 
 INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES 
 ('bx_group', 'bx_groups', 'allow_view_to', 3, '', 0, 'custom', '_bx_groups_form_profile_input_sys_allow_view_to', '_bx_groups_form_profile_input_allow_view_to', '_bx_groups_form_profile_input_allow_view_to_desc', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_group', 'bx_groups', 'allow_view_to', 3, '', 0, 'custom', '_bx_groups_form_profile_input_sys_allow_view_to', '_bx_groups_form_profile_input_allow_view_to', '_bx_groups_form_profile_input_allow_view_to_desc', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
@@ -269,8 +268,7 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 ('bx_group', 'bx_groups', 'cover', 'a:1:{i:0;s:20:"bx_groups_cover_crop";}', 'a:1:{s:20:"bx_groups_cover_crop";s:24:"_sys_uploader_crop_title";}', 0, 'files', '_bx_groups_form_profile_input_sys_cover', '_bx_groups_form_profile_input_cover', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_group', 'bx_groups', 'cover', 'a:1:{i:0;s:20:"bx_groups_cover_crop";}', 'a:1:{s:20:"bx_groups_cover_crop";s:24:"_sys_uploader_crop_title";}', 0, 'files', '_bx_groups_form_profile_input_sys_cover', '_bx_groups_form_profile_input_cover', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_group', 'bx_groups', 'picture', 'a:1:{i:0;s:22:"bx_groups_picture_crop";}', 'a:1:{s:22:"bx_groups_picture_crop";s:24:"_sys_uploader_crop_title";}', 0, 'files', '_bx_groups_form_profile_input_sys_picture', '_bx_groups_form_profile_input_picture', '', 0, 0, 0, '', '', '', '', '', '_bx_groups_form_profile_input_picture_err', '', '', 1, 0),
 ('bx_group', 'bx_groups', 'picture', 'a:1:{i:0;s:22:"bx_groups_picture_crop";}', 'a:1:{s:22:"bx_groups_picture_crop";s:24:"_sys_uploader_crop_title";}', 0, 'files', '_bx_groups_form_profile_input_sys_picture', '_bx_groups_form_profile_input_picture', '', 0, 0, 0, '', '', '', '', '', '_bx_groups_form_profile_input_picture_err', '', '', 1, 0),
 ('bx_group', 'bx_groups', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_group', 'bx_groups', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
-('bx_group', 'bx_groups', 'labels', '', '', 0, 'custom', '_sys_form_input_sys_labels', '_sys_form_input_labels', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
-('bx_group', 'bx_groups', 'join_info', '_bx_groups_form_profile_input_join_info_value', '', 0, 'value', '_bx_groups_form_profile_input_sys_join_info', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
+('bx_group', 'bx_groups', 'labels', '', '', 0, 'custom', '_sys_form_input_sys_labels', '_sys_form_input_labels', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
 
 
 INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
 INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
 ('bx_group_add', 'initial_members', 2147483647, 1, 1),
 ('bx_group_add', 'initial_members', 2147483647, 1, 1),
@@ -286,9 +284,6 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_group_invite', 'initial_members', 2147483647, 1, 1),
 ('bx_group_invite', 'initial_members', 2147483647, 1, 1),
 ('bx_group_invite', 'do_submit', 2147483647, 1, 2),
 ('bx_group_invite', 'do_submit', 2147483647, 1, 2),
 
 
-('bx_group_join', 'join_info', 2147483647, 1, 1),
-('bx_group_join', 'do_submit', 2147483647, 1, 2),
-
 ('bx_group_edit', 'group_name', 2147483647, 1, 1),
 ('bx_group_edit', 'group_name', 2147483647, 1, 1),
 ('bx_group_edit', 'group_cat', 2147483647, 1, 2),
 ('bx_group_edit', 'group_cat', 2147483647, 1, 2),
 ('bx_group_edit', 'group_desc', 2147483647, 1, 3),
 ('bx_group_edit', 'group_desc', 2147483647, 1, 3),

+ 1 - 1
modules/boonex/groups/install/sql/uninstall.sql

@@ -21,7 +21,7 @@ DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_group
 DELETE FROM `sys_objects_form` WHERE `module` = 'bx_groups';
 DELETE FROM `sys_objects_form` WHERE `module` = 'bx_groups';
 DELETE FROM `sys_form_displays` WHERE `module` = 'bx_groups';
 DELETE FROM `sys_form_displays` WHERE `module` = 'bx_groups';
 DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_groups';
 DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_groups';
-DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN('bx_group_add', 'bx_group_delete', 'bx_group_edit', 'bx_group_edit_cover', 'bx_group_view', 'bx_group_view_full', 'bx_group_invite', 'bx_group_join');
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN('bx_group_add', 'bx_group_delete', 'bx_group_edit', 'bx_group_edit_cover', 'bx_group_view', 'bx_group_view_full', 'bx_group_invite');
 
 
 -- PRE-VALUES
 -- PRE-VALUES
 
 

+ 51 - 0
modules/boonex/groups/js/invite_popup.js

@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Groups Groups
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+function BxGroupsInvitePopup(oOptions) {
+	this._sActionsUrl = oOptions.sActionUrl;
+	this._sPopupId = oOptions.sPopupId == undefined ? {} : oOptions.sPopupId;
+	this._sKey = oOptions.sKey == undefined ? {} : oOptions.sKey;
+	this._sAcceptUrl = oOptions.sAcceptUrl == undefined ? {} : oOptions.sAcceptUrl;
+	this._sDeclineUrl = oOptions.sDeclineUrl == undefined ? {} : oOptions.sDeclineUrl;
+	this._iGroupProfileId = oOptions.iGroupProfileId == undefined ? {} : oOptions.iGroupProfileId;
+
+	var $this = this;
+	$(document).ready(function () {
+	    $this.init();
+	});
+}
+
+BxGroupsInvitePopup.prototype.init = function () {
+    var $this = this;
+    $('#' + $this._sPopupId + ' .bx-invite-accept').click(function () {
+        $this.onClickAccept();
+    });
+    $('#' + $this._sPopupId + ' .bx-invite-decline').click(function () {
+        $this.onClickDecline();
+    });
+
+    $('#' + $this._sPopupId).dolPopup();
+};
+
+BxGroupsInvitePopup.prototype.onClickAccept = function () {
+	var $this = this;
+	$.getJSON($this._sActionsUrl + 'ProcessInvite/' + $this._sKey + '/' + $this._iGroupProfileId + '/1/', function () {
+	    location.href = $this._sAcceptUrl
+	});
+
+};
+
+BxGroupsInvitePopup.prototype.onClickDecline = function () {
+    var $this = this;
+    console.log(06);
+    $.getJSON($this._sActionsUrl + 'ProcessInvite/' + $this._sKey + '/' + $this._iGroupProfileId + '/0/', function () {
+        location.href = $this._sDeclineUrl
+    });
+};

+ 1 - 0
modules/boonex/groups/template/popup_invite.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/groups/template/popup_invite.html />