Dotclear

source: admin/popup_link.php @ 3730:5c45a5df9a59

Revision 3730:5c45a5df9a59, 1.9 KB checked in by franck <carnet.franck.paul@…>, 8 years ago (diff)

Code formatting (PSR-2)

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
22dcPage::openPopup(__('Add a link'), dcPage::jsLoad('js/_popup_link.js') . $core->callBehavior('adminPopupLink', $plugin_id));
23
24echo '<h2 class="page-title">' . __('Add a link') . '</h2>';
25
26# Languages combo
27$rs         = $core->blog->getLangs(array('order' => 'asc'));
28$lang_combo = dcAdminCombos::getLangsCombo($rs, true);
29
30echo
31'<form id="link-insert-form" action="#" method="get">' .
32'<p><label class="required" for="href"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Link URL:') . '</label> ' .
33form::field('href', 35, 512, array(
34    'default'    => html::escapeHTML($href),
35    'extra_html' => 'required placeholder="' . __('URL') . '"'
36)) .
37'</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><button type="button" class="reset" id="link-insert-cancel">' . __('Cancel') . '</button> - ' .
47'<button type="button" id="link-insert-ok"><strong>' . __('Insert') . '</strong></button></p>' . "\n";
48
49dcPage::closePopup();
Note: See TracBrowser for help on using the repository browser.

Sites map