[0] | 1 | <?php |
---|
| 2 | # -- BEGIN LICENSE BLOCK --------------------------------------- |
---|
| 3 | # |
---|
| 4 | # This file is part of Dotclear 2. |
---|
| 5 | # |
---|
[1179] | 6 | # Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear |
---|
[0] | 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 | |
---|
| 13 | require dirname(__FILE__).'/../inc/admin/prepend.php'; |
---|
| 14 | |
---|
| 15 | dcPage::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 | |
---|
| 21 | dcPage::openPopup(__('Add a link'),dcPage::jsLoad('js/jsToolBar/popup_link.js')); |
---|
| 22 | |
---|
[500] | 23 | echo '<h2 class="page-title">'.__('Add a link').'</h2>'; |
---|
[0] | 24 | |
---|
| 25 | # Languages combo |
---|
| 26 | $rs = $core->blog->getLangs(array('order'=>'asc')); |
---|
[1719] | 27 | $lang_combo = dcAdminCombos::getLangsCombo($rs,true); |
---|
[0] | 28 | |
---|
| 29 | echo |
---|
| 30 | '<form id="link-insert-form" action="#" method="get">'. |
---|
[1399] | 31 | '<p><label class="required" for="href"><abbr title="'.__('Required field').'">*</abbr> '.__('Link URL:').'</label> '. |
---|
| 32 | form::field('href',35,512,html::escapeHTML($href)).'</p>'. |
---|
| 33 | '<p><label for="title">'.__('Link title:').'</label> '. |
---|
| 34 | form::field('title',35,512,html::escapeHTML($title)).'</p>'. |
---|
| 35 | '<p><label for="hreflang">'.__('Link language:').'</label> '. |
---|
[0] | 36 | form::combo('hreflang',$lang_combo,$hreflang). |
---|
[1399] | 37 | '</p>'. |
---|
[0] | 38 | |
---|
| 39 | '</form>'. |
---|
| 40 | |
---|
[730] | 41 | '<p><a class="button reset" href="#" id="link-insert-cancel">'.__('Cancel').'</a> - '. |
---|
| 42 | '<strong><a class="button" href="#" id="link-insert-ok">'.__('Insert').'</a></strong></p>'."\n". |
---|
[0] | 43 | |
---|
| 44 | '<script type="text/javascript">'."\n". |
---|
| 45 | '//<![CDATA['."\n". |
---|
| 46 | '$(\'input[name="href"]\').get(0).focus();'."\n". |
---|
| 47 | '//]]>'."\n". |
---|
| 48 | '</script>'."\n"; |
---|
| 49 | |
---|
| 50 | dcPage::closePopup(); |
---|
| 51 | ?> |
---|