Rev 2 | Rev 5 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2 | Rev 4 | ||
---|---|---|---|
Line 182... | Line 182... | ||
182 | 182 | ||
183 | public static $exclude_tinymce_plugins = array('fullpage', 'bbcode'); |
183 | public static $exclude_tinymce_plugins = array('fullpage', 'bbcode'); |
184 | 184 | ||
185 | protected static function showMCE($name, $content) { |
185 | protected static function showMCE($name, $content) { |
186 | $mce_plugins = array(); |
186 | $mce_plugins = array(); |
187 | foreach (glob(__DIR__ . '/../3p/tinymce/plugins/*') as $m) { // */ |
187 | foreach (glob(__DIR__ . '/../../3p/tinymce/plugins/*') as $m) { // */ |
188 | $mce_plugins[] = basename($m); |
188 | $mce_plugins[] = basename($m); |
189 | } |
189 | } |
190 | 190 | ||
191 | foreach (self::$exclude_tinymce_plugins as $exclude) { |
191 | foreach (self::$exclude_tinymce_plugins as $exclude) { |
192 | $index = array_search($exclude, $mce_plugins); |
192 | $index = array_search($exclude, $mce_plugins); |
193 | if ($index !== false) unset($mce_plugins[$index]); |
193 | if ($index !== false) unset($mce_plugins[$index]); |
194 | } |
194 | } |
195 | 195 | ||
196 | $out = "<script> |
196 | $out = '<script> |
197 | tinymce.remove('#".$name."'); |
197 | tinymce.remove("#'.$name.'"); |
198 | tinymce.init({ |
198 | tinymce.init({ |
199 | selector: '#".$name."', |
199 | selector: "#'.$name.'", |
- | 200 | height: 200, |
|
- | 201 | statusbar: false, |
|
- | 202 | // menubar:false, |
|
- | 203 | // toolbar: "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table | fontsizeselect", |
|
- | 204 | toolbar: "undo redo | styleselect | bold italic underline forecolor | bullist numlist | outdent indent | table | fontsizeselect", |
|
200 | plugins: '".implode(' ', $mce_plugins)."' |
205 | plugins: "'.implode(' ', $mce_plugins).'" |
201 | }); |
206 | }); |
202 | </script>"; |
207 | </script>'; |
203 | 208 | ||
204 | $out .= '<textarea name="'.htmlentities($name).'" id="'.htmlentities($name).'" rows="10">'.trim($content).'</textarea><br>'; |
209 | $out .= '<textarea name="'.htmlentities($name).'" id="'.htmlentities($name).'">'.trim($content).'</textarea><br>'; |
205 | 210 | ||
206 | return $out; |
211 | return $out; |
207 | } |
212 | } |
208 | 213 | ||
209 | public static function getInvitationText($email) { |
214 | public static function getInvitationText($email) { |
Line 274... | Line 279... | ||
274 | // === System === |
279 | // === System === |
275 | 280 | ||
276 | if ($id === 'oidplus:system') { |
281 | if ($id === 'oidplus:system') { |
277 | $handled = true; |
282 | $handled = true; |
278 | 283 | ||
279 | $out['title'] = 'Object Database of ' . $_SERVER['SERVER_NAME']; |
284 | $out['title'] = OIDplus::config()->systemTitle(); // 'Object Database of ' . $_SERVER['SERVER_NAME']; |
280 | $out['text'] = file_get_contents('welcome.html'); |
285 | $out['text'] = file_get_contents('welcome.html'); |
281 | return $out; |
286 | return $out; |
282 | 287 | ||
283 | // === Generic stuff === |
288 | // === Generic stuff === |
284 | 289 | ||
Line 425... | Line 430... | ||
425 | 430 | ||
426 | $out['text'] .= (RECAPTCHA_ENABLED ? '<script> grecaptcha.render(document.getElementById("g-recaptcha"), { "sitekey" : "'.RECAPTCHA_PUBLIC.'" }); </script>'. |
431 | $out['text'] .= (RECAPTCHA_ENABLED ? '<script> grecaptcha.render(document.getElementById("g-recaptcha"), { "sitekey" : "'.RECAPTCHA_PUBLIC.'" }); </script>'. |
427 | '<div id="g-recaptcha" class="g-recaptcha" data-sitekey="'.RECAPTCHA_PUBLIC.'"></div>' : ''); |
432 | '<div id="g-recaptcha" class="g-recaptcha" data-sitekey="'.RECAPTCHA_PUBLIC.'"></div>' : ''); |
428 | 433 | ||
429 | $out['text'] .= '<h2>Login as RA</h2>'; |
434 | $out['text'] .= '<h2>Login as RA</h2>'; |
- | 435 | // TODO: show if the user is already logged in and tell the user that he can now login as someone else additionally |
|
430 | $out['text'] .= '<form action="action.php" method="POST" onsubmit="return raLoginOnSubmit(this);">'; |
436 | $out['text'] .= '<form action="action.php" method="POST" onsubmit="return raLoginOnSubmit(this);">'; |
431 | $out['text'] .= '<input type="hidden" name="action" value="ra_login">'; |
437 | $out['text'] .= '<input type="hidden" name="action" value="ra_login">'; |
432 | $out['text'] .= 'E-Mail: <input type="text" name="email" value="" id="raLoginEMail"><br>'; |
438 | $out['text'] .= 'E-Mail: <input type="text" name="email" value="" id="raLoginEMail"><br>'; |
433 | $out['text'] .= 'Password: <input type="password" name="password" value="" id="raLoginPassword"><br>'; |
439 | $out['text'] .= 'Password: <input type="password" name="password" value="" id="raLoginPassword"><br>'; |
434 | $out['text'] .= '<input type="submit" value="Login">'; |
440 | $out['text'] .= '<input type="submit" value="Login">'; |