Dotclear

source: admin/popup_link.php @ 3874:ab8368569446

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

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

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

Sites map