Subversion Repositories oidplus

Rev

Rev 1410 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1410 Rev 1470
Line 150... Line 150...
150
 
150
 
151
                        $out['icon'] = OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/invite_icon.png';
151
                        $out['icon'] = OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/invite_icon.png';
152
 
152
 
153
                        try {
153
                        try {
154
                                $this->inviteSecurityCheck($email);
154
                                $this->inviteSecurityCheck($email);
155
                                $cont = $this->getInvitationText($email);
155
                                $message = $this->getInvitationText($email);
-
 
156
                                $message = str_replace('{{ACTIVATE_URL}}', '[...]', $message); // secret. Will only be shown in the email to the invited person
156
 
157
 
157
                                $out['text'] .= '<p>'._L('You have chosen to invite %1 as a Registration Authority. If you click "Send invitation", the following email will be sent to %2:','<b>'.$email.'</b>',$email).'</p><p><i>'.nl2br(htmlentities($cont)).'</i></p>
158
                                $out['text'] .= '<p>'._L('You have chosen to invite %1 as a Registration Authority. If you click "Send invitation", the following email will be sent to %2:','<b>'.$email.'</b>',$email).'</p><p><i>'.nl2br(htmlentities($message)).'</i></p>
158
                                  <form id="inviteForm" action="javascript:void(0);" onsubmit="return OIDplusPageRaInvite.inviteFormOnSubmit();">
159
                                  <form id="inviteForm" action="javascript:void(0);" onsubmit="return OIDplusPageRaInvite.inviteFormOnSubmit();">
159
                                    <input type="hidden" id="email" value="'.htmlentities($email).'"/>
160
                                    <input type="hidden" id="email" value="'.htmlentities($email).'"/>
160
                                    <input type="hidden" id="origin" value="'.htmlentities($origin).'"/>
161
                                    <input type="hidden" id="origin" value="'.htmlentities($origin).'"/>
161
                                    '.OIDplus::getActiveCaptchaPlugin()->captchaGenerate().'
162
                                    '.OIDplus::getActiveCaptchaPlugin()->captchaGenerate().'
162
                                    <br>
163
                                    <br>
Line 269... Line 270...
269
                }
270
                }
270
 
271
 
271
                $message = file_get_contents(__DIR__ . '/invite_msg.tpl');
272
                $message = file_get_contents(__DIR__ . '/invite_msg.tpl');
272
 
273
 
273
                // Resolve stuff
274
                // Resolve stuff
274
               
-
 
275
 
-
 
276
                $message = str_replace('{{SYSTEM_URL}}', OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL), $message);
275
                $message = str_replace('{{SYSTEM_URL}}', OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL), $message);
277
                $message = str_replace('{{OID_LIST}}', implode("\n", $list_of_oids), $message);
276
                $message = str_replace('{{OID_LIST}}', implode("\n", $list_of_oids), $message);
278
                $message = str_replace('{{ADMIN_EMAIL}}', OIDplus::config()->getValue('admin_email'), $message);
277
                $message = str_replace('{{ADMIN_EMAIL}}', OIDplus::config()->getValue('admin_email'), $message);
279
                $message = str_replace('{{ACTIVATE_URL}}', '[...]', $message); // Note: {{ACTIVATE_URL}} will be resolved in ajax.php, not here!
278
                // Note: {{ACTIVATE_URL}} will be resolved by the caller, not here!
280
 
279
 
281
                return str_replace('{{PARTY}}', OIDplus::authUtils()->isAdminLoggedIn() ? 'the system administrator' : 'a superior Registration Authority', $message);
280
                return str_replace('{{PARTY}}', OIDplus::authUtils()->isAdminLoggedIn() ? 'the system administrator' : 'a superior Registration Authority', $message);
282
        }
281
        }
283
 
282
 
284
        /**
283
        /**