Dotclear

source: admin/popup_link.php @ 3874:ab8368569446

Revision 3874:ab8368569446, 1.6 KB checked in by franck <carnet.franck.paul@…>, 6 years ago (diff)

short notation for array (array() → [])

Line 
1<?php
2/**
3 * @package Dotclear
4 * @subpackage Backend
5 *
6 * @copyright Olivier Meunier & Association Dotclear
7 * @copyright GPL-2.0-only
8 */
9
10require dirname(__FILE__) . '/../inc/admin/prepend.php';
11
12dcPage::check('usage,contentadmin');
13
14$href      = !empty($_GET['href']) ? $_GET['href'] : '';
15$hreflang  = !empty($_GET['hreflang']) ? $_GET['hreflang'] : '';
16$title     = !empty($_GET['title']) ? $_GET['title'] : '';
17$plugin_id = !empty($_GET['plugin_id']) ? html::sanitizeURL($_GET['plugin_id']) : '';
18
19dcPage::openPopup(__('Add a link'), dcPage::jsLoad('js/_popup_link.js') . $core->callBehavior('adminPopupLink', $plugin_id));
20
21echo '<h2 class="page-title">' . __('Add a link') . '</h2>';
22
23# Languages combo
24$rs         = $core->blog->getLangs(['order' => 'asc']);
25$lang_combo = dcAdminCombos::getLangsCombo($rs, true);
26
27echo
28'<form id="link-insert-form" action="#" method="get">' .
29'<p><label class="required" for="href"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Link URL:') . '</label> ' .
30form::field('href', 35, 512, [
31    'default'    => html::escapeHTML($href),
32    'extra_html' => 'required placeholder="' . __('URL') . '"'
33]) .
34'</p>' .
35'<p><label for="title">' . __('Link title:') . '</label> ' .
36form::field('title', 35, 512, html::escapeHTML($title)) . '</p>' .
37'<p><label for="hreflang">' . __('Link language:') . '</label> ' .
38form::combo('hreflang', $lang_combo, $hreflang) .
39'</p>' .
40
41'</form>' .
42
43'<p><button type="button" class="reset" id="link-insert-cancel">' . __('Cancel') . '</button> - ' .
44'<button type="button" id="link-insert-ok"><strong>' . __('Insert') . '</strong></button></p>' . "\n";
45
46dcPage::closePopup();
Note: See TracBrowser for help on using the repository browser.

Sites map