Merge pull request #541 from tobiasd/20180311-pageheader

[pageheader] bugfix: missing open/close of settings block
pull/542/head
Hypolite Petovan 2018-03-11 14:02:19 -04:00 committed by GitHub
commit 688daf435b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 13 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n" "POT-Creation-Date: 2018-03-11 18:52+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,14 +17,24 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: pageheader.php:50 #: pageheader.php:53
msgid "\"pageheader\" Settings" msgid "\"pageheader\" Settings"
msgstr "" msgstr ""
#: pageheader.php:55 #: pageheader.php:54
msgid "Submit" msgid "Message"
msgstr "" msgstr ""
#: pageheader.php:68 #: pageheader.php:54
msgid ""
"Message to display on every page on this server (or put a pageheader.html "
"file in your docroot)"
msgstr ""
#: pageheader.php:55
msgid "Save Settings"
msgstr ""
#: pageheader.php:69
msgid "pageheader Settings saved." msgid "pageheader Settings saved."
msgstr "" msgstr ""

View File

@ -48,14 +48,12 @@ function pageheader_addon_settings(&$a,&$s) {
if(! $words) if(! $words)
$words = ''; $words = '';
$s .= '<div class="settings-block">'; $t = get_markup_template("settings.tpl", "addon/pageheader/");
$s .= '<h3>' . L10n::t('"pageheader" Settings') . '</h3>'; $s .= replace_macros($t, [
$s .= '<div id="pageheader-wrapper">'; '$title' => L10n::t('"pageheader" Settings'),
$s .= '<label id="pageheader-label" for="pageheader-words">' . L10n::t('Message to display on every page on this server (or put a pageheader.html file in your docroot)') . ' </label>'; '$phwords' => ['pageheader-words', L10n::t('Message'), $words, L10n::t('Message to display on every page on this server (or put a pageheader.html file in your docroot)')],
$s .= '<textarea id="pageheader-words" type="text" name="pageheader-words">' . $words . '</textarea>'; '$submit' => L10n::t('Save Settings')
$s .= '</div><div class="clear"></div>'; ]);
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="pageheader-submit" name="pageheader-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
return; return;

View File

@ -0,0 +1,14 @@
<span id="settings_pageheader_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose('settings_pageheader_expanded'); openClose('settings_pageheader_inflated');">
<h3>{{$title}}</h3>
</span>
<div id="settings_pageheader_expanded" class="settings-block" style="display: none;">
<span class="fakelink" onclick="openClose('settings_pageheader_expanded'); openClose('settings_pageheader_inflated');">
<h3>{{$title}}</h3>
</span>
{{include file="field_textarea.tpl" field=$phwords}}
<div class="settings-submit-wrapper" >
<input type="submit" id="pageheader-submit" name="pageheader-submit" class="settings-submit" value="{{$submit}}" />
</div>
</div>
<div class="clear"></div>