Dotclear

source: admin/popup_link.php @ 2755:eb341f8478fe

Revision 2755:eb341f8478fe, 1.9 KB checked in by Nicolas <nikrou77@…>, 11 years ago (diff)

Fix issue for inserting link when current editor is different from preferred editor
Closes #1995

Line 
1<?php
2# -- BEGIN LICENSE BLOCK ---------------------------------------
3#
4# This file is part of Dotclear 2.
5#
6# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
7# Licensed under the GPL version 2.0 license.
8# See LICENSE file or
9# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10#
11# -- END LICENSE BLOCK -----------------------------------------
12
13require dirname(__FILE__).'/../inc/admin/prepend.php';
14
15dcPage::check('usage,contentadmin');
16
17$href = !empty($_GET['href']) ? $_GET['href'] : '';
18$hreflang = !empty($_GET['hreflang']) ? $_GET['hreflang'] : '';
19$title = !empty($_GET['title']) ? $_GET['title'] : '';
20$plugin_id = !empty($_GET['plugin_id']) ? html::sanitizeURL($_GET['plugin_id']) : '';
21
22// perhaps better to put active editor in session
23$post_format = $core->auth->getOption('post_format');
24$post_editor = $core->auth->getOption('editor');
25
26dcPage::openPopup(__('Add a link'),$core->callBehavior('adminPopupLink', $plugin_id));
27
28echo '<h2 class="page-title">'.__('Add a link').'</h2>';
29
30# Languages combo
31$rs = $core->blog->getLangs(array('order'=>'asc'));
32$lang_combo = dcAdminCombos::getLangsCombo($rs,true);
33
34echo
35'<form id="link-insert-form" action="#" method="get">'.
36'<p><label class="required" for="href"><abbr title="'.__('Required field').'">*</abbr> '.__('Link URL:').'</label> '.
37form::field('href',35,512,html::escapeHTML($href)).'</p>'.
38'<p><label for="title">'.__('Link title:').'</label> '.
39form::field('title',35,512,html::escapeHTML($title)).'</p>'.
40'<p><label for="hreflang">'.__('Link language:').'</label> '.
41form::combo('hreflang',$lang_combo,$hreflang).
42'</p>'.
43
44'</form>'.
45
46'<p><a class="button reset" href="#" id="link-insert-cancel">'.__('Cancel').'</a> - '.
47'<strong><a class="button" href="#" id="link-insert-ok">'.__('Insert').'</a></strong></p>'."\n".
48
49'<script type="text/javascript">'."\n".
50'//<![CDATA['."\n".
51'$(\'input[name="href"]\').get(0).focus();'."\n".
52'//]]>'."\n".
53'</script>'."\n";
54
55dcPage::closePopup();
Note: See TracBrowser for help on using the repository browser.

Sites map