Permalink
Browse files

Merge pull request #4341 from Gwenwyfar/css+templating

Misc template and css fixes
  • Loading branch information...
Oldiesmann committed Oct 13, 2017
2 parents 83d0dac + 95e3772 commit e8c9559fc0ce532d9a5162b8fdec8a756d8fe9f4
View
@@ -348,7 +348,7 @@ public function base32_decode($hash)
public function getQrCodeUrl($name, $code)
{
$urlencoded = urlencode('otpauth://totp/' . urlencode($name) . '?secret=' . $code);
return 'https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl=' . $urlencoded;
return 'https://chart.googleapis.com/chart?chs=280x280&chld=M|0&cht=qr&chl=' . $urlencoded;
}
}
@@ -584,7 +584,7 @@ function template_convert_msgbody()
if (!empty($context['exceeding_messages']))
{
echo '
<p class="noticebox">', $txt['exceeding_messages'], '
<p class="noticebox">', $txt['exceeding_messages'], '</p>
<ul>
<li>
', implode('</li><li>', $context['exceeding_messages']), '
@@ -254,9 +254,6 @@ function checkSubmit()
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
<input type="hidden" name="', $context['admin-mpq_token_var'], '" value="', $context['admin-mpq_token'], '">';
}
else
echo '
</table>';
echo '
</form>
@@ -1541,7 +1541,7 @@ function template_edit_options()
<span class="smalltext">', $txt['required_security_reasons'], '</span>
</dt>
<dd>
<input type="password" name="oldpasswrd" id="oldpasswrd" size="20" style="margin-right: 4ex;">
<input type="password" name="oldpasswrd" id="oldpasswrd" size="20">
</dd>
</dl>';
@@ -1995,8 +1995,8 @@ function template_groupMembership()
</div>
<div class="roundframe">
', $txt['request_group_membership_desc'], ':
<textarea name="reason" rows="4" style="width: 99%;"></textarea>
<div class="righttext" style="margin: 0.5em 0.5% 0 0.5%;">
<textarea name="reason" rows="4"></textarea>
<div class="righttext">
<input type="hidden" name="gid" value="', $context['group_request']['id'], '">
<input type="submit" name="req" value="', $txt['submit_request'], '" class="button">
</div>
@@ -2395,8 +2395,9 @@ function updateSlider(slideAmount)
echo '
</select>
<span class="smalltext" id="new_template_link" style="display: none;">[<a href="', $scripturl, '?action=moderate;area=warnings;sa=templateedit;tid=0" target="_blank">', $txt['profile_warning_new_template'], '</a>]</span><br>
<textarea name="warn_body" id="warn_body" cols="40" rows="8" style="min-width: 50%; max-width: 99%;">', $context['warning_data']['notify_body'], '</textarea>
<span class="smalltext" id="new_template_link" style="display: none;">[<a href="', $scripturl, '?action=moderate;area=warnings;sa=templateedit;tid=0" target="_blank">', $txt['profile_warning_new_template'], '</a>]</span>
<br>
<textarea name="warn_body" id="warn_body" cols="40" rows="8">', $context['warning_data']['notify_body'], '</textarea>
</dd>';
}
echo '
@@ -2583,7 +2584,7 @@ function template_profile_save()
<span class="smalltext">', $txt['required_security_reasons'], '</span>
</dt>
<dd>
<input type="password" name="oldpasswrd" size="20" style="margin-right: 4ex;">
<input type="password" name="oldpasswrd" size="20">
</dd>
</dl>';
@@ -2734,7 +2735,7 @@ function template_profile_signature_modify()
echo '
</dt>
<dd>
<textarea class="editor" onkeyup="calcCharLeft();" id="signature" name="signature" rows="5" cols="50" style="min-width: 50%; max-width: 99%;">', $context['member']['signature'], '</textarea><br>';
<textarea class="editor" onkeyup="calcCharLeft();" id="signature" name="signature" rows="5" cols="50">', $context['member']['signature'], '</textarea><br>';
// If there is a limit at all!
if (!empty($context['signature_limits']['max_length']))
@@ -2950,7 +2951,7 @@ function template_profile_timeformat_modify()
<span class="smalltext">&nbsp;<label for="time_format">', $txt['date_format'], '</label></span>
</dt>
<dd>
<select name="easyformat" id="easyformat" onchange="document.forms.creator.time_format.value = this.options[this.selectedIndex].value;" style="margin-bottom: 4px;">';
<select name="easyformat" id="easyformat" onchange="document.forms.creator.time_format.value = this.options[this.selectedIndex].value;">';
// Help the user by showing a list of common time formats.
foreach ($context['easy_timeformats'] as $time_format)
echo '
@@ -2994,7 +2995,8 @@ function template_profile_smiley_pick()
echo '
<option value="', $set['id'], '"', $set['selected'] ? ' selected' : '', '>', $set['name'], '</option>';
echo '
</select> <img id="smileypr" class="centericon" src="', $context['member']['smiley_set']['id'] != 'none' ? $modSettings['smileys_url'] . '/' . ($context['member']['smiley_set']['id'] != '' ? $context['member']['smiley_set']['id'] : (!empty($settings['smiley_sets_default']) ? $settings['smiley_sets_default'] : $modSettings['smiley_sets_default'])) . '/smiley.gif' : $settings['images_url'] . '/blank.png', '" alt=":)" style="padding-left: 20px;">
</select>
<img id="smileypr" class="centericon" src="', $context['member']['smiley_set']['id'] != 'none' ? $modSettings['smileys_url'] . '/' . ($context['member']['smiley_set']['id'] != '' ? $context['member']['smiley_set']['id'] : (!empty($settings['smiley_sets_default']) ? $settings['smiley_sets_default'] : $modSettings['smiley_sets_default'])) . '/smiley.gif' : $settings['images_url'] . '/blank.png', '" alt=":)">
</dd>';
}
@@ -3016,12 +3018,12 @@ function template_tfasetup()
($modSettings['tfa_mode'] == 2 ? '
<div class="smalltext"><strong>' . $txt['tfa_forced_desc'] . '</strong></div>' : ''), '
<div class="smalltext">', $txt['tfa_desc'], '</div>
<div id="basicinfo" style="width: 60%">
<div class="floatleft">
<form action="', $scripturl, '?action=profile;area=tfasetup" method="post">
<div class="title_top">
<strong>', $txt['tfa_step1'], '</strong><br>
', !empty($context['tfa_pass_error']) ? '<div class="error smalltext">' . $txt['tfa_pass_invalid'] . '</div>' : '', '
<input type="password" name="passwd" style="width: 200px;"', !empty($context['tfa_pass_error']) ? ' class="error"' : '', !empty($context['tfa_pass_value']) ? ' value="' . $context['tfa_pass_value'] . '"' : '', '>
<input type="password" name="passwd" size="25"', !empty($context['tfa_pass_error']) ? ' class="error"' : '', !empty($context['tfa_pass_value']) ? ' value="' . $context['tfa_pass_value'] . '"' : '', '>
</div>
<div class="title_top">
<strong>', $txt['tfa_step2'], '</strong>
@@ -3031,17 +3033,16 @@ function template_tfasetup()
<div class="title_top">
<strong>', $txt['tfa_step3'], '</strong><br>
', !empty($context['tfa_error']) ? '<div class="error smalltext">' . $txt['tfa_code_invalid'] . '</div>' : '', '
<input type="text" name="tfa_code" style="width: 200px;"', !empty($context['tfa_error']) ? ' class="error"' : '', !empty($context['tfa_value']) ? ' value="' . $context['tfa_value'] . '"' : '', '>
<input type="submit" name="save" value="', $txt['tfa_enable'], '" class="button" style="float: none;" />
<input type="text" name="tfa_code" size="25"', !empty($context['tfa_error']) ? ' class="error"' : '', !empty($context['tfa_value']) ? ' value="' . $context['tfa_value'] . '"' : '', '>
<input type="submit" name="save" value="', $txt['tfa_enable'], '" class="button">
</div>
<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
</form>
</div>
<div id="detailedinfo" style="width: 30%;">
<img src="', $context['tfa_qr_url'], '" alt="" style="max-width: 120px;" />
</div>
<div class="clear"></div>';
<div class="floatright tfa_qrcode">
<img src="', $context['tfa_qr_url'], '" alt="">
</div>';
if (!empty($context['from_ajax']))
echo '
@@ -88,7 +88,7 @@ function template_unread()
if ($context['showCheckboxes'])
echo '
<form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">
<form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm">
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
<input type="hidden" name="qaction" value="markread">
<input type="hidden" name="redirect_url" value="action=unread', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '">';
@@ -235,7 +235,7 @@ function template_replies()
if ($context['showCheckboxes'])
echo '
<form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm" style="margin: 0;">
<form action="', $scripturl, '?action=quickmod" method="post" accept-charset="', $context['character_set'], '" name="quickModForm" id="quickModForm">
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
<input type="hidden" name="qaction" value="markread">
<input type="hidden" name="redirect_url" value="action=unreadreplies', (!empty($context['showing_all_topics']) ? ';all' : ''), $context['querystring_board_limits'], '">';
@@ -91,7 +91,7 @@ function template_main()
echo '
</dl>
<input type="submit" name="preview" value="', $txt['preview'], '" class="button">
<input type="submit" name="save" value="', $txt['rtm10'], '" style="margin-left: 1ex;" class="button">
<input type="submit" name="save" value="', $txt['rtm10'], '" class="button">
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
</div>
</form>
@@ -122,8 +122,7 @@ function template_main()
<input type="submit" name="b_search" value="', $txt['search'], '" class="button">';
echo '
</div>
</fieldset>';
</div>';
if (empty($context['search_params']['topic']))
{
@@ -325,7 +324,7 @@ function template_results()
foreach ($topic['matches'] as $message)
{
echo '
<div class="topic_details floatleft" style="width: 94%">
<div class="topic_details floatleft">
<div class="counter">', $message['counter'], '</div>
<h5>', $topic['board']['link'], ' / <a href="', $scripturl, '?topic=', $topic['id'], '.msg', $message['id'], '#msg', $message['id'], '">', $message['subject_highlighted'], '</a></h5>
<span class="smalltext">&#171;&nbsp;',$txt['by'], '&nbsp;<strong>', $message['member']['link'], '</strong>&nbsp;', $txt['on'], '&nbsp;<em>', $message['time'], '</em>&nbsp;&#187;</span>
@@ -377,7 +377,7 @@ function template_set_options()
}
echo '
<dt ', $context['theme_options_reset'] ? 'style="width:50%"' : '', '>';
<dt>';
// Show the change option box ?
if ($context['theme_options_reset'])
@@ -400,16 +400,16 @@ function template_set_options()
if ($setting['type'] == 'checkbox')
{
echo '
<dd ', $context['theme_options_reset'] ? 'style="width:40%"' : '', '>
<dd>
<input type="hidden" name="' . (!empty($setting['default']) ? 'default_' : '') . 'options[' . $setting['id'] . ']" value="0">
<input type="checkbox" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="options_', $setting['id'], '"', !empty($setting['value']) ? ' checked' : '', $context['theme_options_reset'] ? ' disabled' : '', ' value="1" class="floatleft">';
}
// how about selection lists, we all love them
elseif ($setting['type'] == 'list')
{
echo '
<dd ', $context['theme_options_reset'] ? 'style="width:40%"' : '', '>
&nbsp;<select class="floatleft" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="options_', $setting['id'], '"', $context['theme_options_reset'] ? ' disabled' : '', '>';
<dd>
<select class="floatleft" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="options_', $setting['id'], '"', $context['theme_options_reset'] ? ' disabled' : '', '>';
foreach ($setting['options'] as $value => $label)
{
@@ -424,7 +424,7 @@ function template_set_options()
else
{
echo '
<dd ', $context['theme_options_reset'] ? 'style="width:40%"' : '', '>';
<dd>';
if (isset($setting['type']) && $setting['type'] == 'number')
{
@@ -520,19 +520,19 @@ function template_set_settings()
<label for="theme_url">', $txt['actual_theme_url'], '</label>
</dt>
<dd>
<input type="text" id="theme_url" name="options[theme_url]" value="', $context['theme_settings']['actual_theme_url'], '" size="50" style="max-width: 100%; width: 50ex;">
<input type="text" id="theme_url" name="options[theme_url]" value="', $context['theme_settings']['actual_theme_url'], '" size="50">
</dd>
<dt>
<label for="images_url">', $txt['actual_images_url'], '</label>
</dt>
<dd>
<input type="text" id="images_url" name="options[images_url]" value="', $context['theme_settings']['actual_images_url'], '" size="50" style="max-width: 100%; width: 50ex;">
<input type="text" id="images_url" name="options[images_url]" value="', $context['theme_settings']['actual_images_url'], '" size="50">
</dd>
<dt>
<label for="theme_dir">', $txt['actual_theme_dir'], '</label>
</dt>
<dd>
<input type="text" id="theme_dir" name="options[theme_dir]" value="', $context['theme_settings']['actual_theme_dir'], '" size="50" style="max-width: 100%; width: 50ex;">
<input type="text" id="theme_dir" name="options[theme_dir]" value="', $context['theme_settings']['actual_theme_dir'], '" size="50">
</dd>
</dl>
</div>';
@@ -1107,7 +1107,7 @@ function refreshPreview(check)
}
}
</script>
<iframe id="css_preview_box" name="css_preview_box" src="about:blank" width="99%" height="300" frameborder="0" style="display: none; margin-bottom: 2ex; border: 1px solid black;"></iframe>';
<iframe id="css_preview_box" name="css_preview_box" src="about:blank" frameborder="0" style="display: none;"></iframe>';
// Just show a big box.... gray out the Save button if it's not saveable... (ie. not 777.)
echo '
@@ -1122,9 +1122,10 @@ function refreshPreview(check)
', $txt['theme_edit_no_save'], ': ', $context['allow_save_filename'], '<br>';
echo '
<textarea name="entire_file" cols="80" rows="20" style="width: 96%; font-family: monospace; margin-top: 1ex; white-space: pre;" onkeyup="setPreviewTimeout();" onchange="refreshPreview(true);">', $context['entire_file'], '</textarea><br>
<textarea class="edit_file" name="entire_file" cols="80" rows="20" onkeyup="setPreviewTimeout();" onchange="refreshPreview(true);">', $context['entire_file'], '</textarea>
<br>
<div class="padding righttext">
<input type="submit" name="save" value="', $txt['theme_edit_save'], '"', $context['allow_save'] ? '' : ' disabled', ' style="margin-top: 1ex;" class="button">
<input type="submit" name="save" value="', $txt['theme_edit_save'], '"', $context['allow_save'] ? '' : ' disabled', ' class="button">
<input type="button" value="', $txt['themeadmin_edit_preview'], '" onclick="refreshPreview(false);" class="button">
</div>
</div>
@@ -552,9 +552,9 @@ ul.theme_options li {
margin: -2px 3px 0 0;
}
.edit_file {
width: 96%;
width: 100%;
font-family: monospace;
margin-top: 1ex;
margin: 1ex 0;
white-space: pre;
}
@@ -658,4 +658,12 @@ h3.config_hd {
.windowbg.highlight2,
.windowbg2.highlight2 {
background: #d0e7f8;
}
/* Css edit page */
#css_preview_box {
margin-bottom: 2ex;
border: 1px solid #777;
width: 100%;
height: 400px;
}
@@ -991,7 +991,7 @@ img.sort, .sort {
}
/* Set maximum width limit for content */
#top_section .inner_wrap, #wrapper, #header, #footer ul {
#top_section .inner_wrap, #wrapper, #header, #footer .inner_wrap {
max-width: 1200px;
margin: 0 auto;
}
@@ -1226,9 +1226,6 @@ ul li.greeting {
font-size: 0.9em;
color: #fff;
}
#footer ul {
padding: 0 5px;
}
#footer li.copyright {
display: block;
font-family: Verdana, sans-serif; /* Copyright must be Verdana! */
@@ -2140,6 +2137,9 @@ dl {
#avatar_upload {
overflow: auto;
}
#smileypr {
margin-left: 10px;
}
/* Activity by time */
#activitytime {
@@ -2202,6 +2202,7 @@ dl {
float: left;
}
.topic_details {
width: 94%;
padding: 0 4px 4px 4px;
}
.list_posts {
@@ -2745,6 +2746,12 @@ div#manage_boards dl dd textarea[name=desc] {
#groups .padding {
margin: 0 0 25px 0;
}
.groupmembership textarea {
width: 100%;
}
.groupmembership .righttext {
margin-top: 1ex;
}
/* BoardIndex */
/* This place covers board places (boardindex-messageindex) */
@@ -3813,7 +3820,16 @@ input[name="attachBBC"] {
.tfacode {
background: #d0e7f8;
padding: 5px;
width: 20%;
display: inline-block;
}
/* TFA QR block */
.tfa_qrcode {
padding: 6% 8%;
}
.tfa_qrcode img {
width: 140px;
}
/* This was named as "winfo" before, but its better named noup */
@@ -375,10 +375,10 @@ function template_body_below()
</div>
</div>';
// Show the XHTML, RSS and WAP2 links, as well as the copyright.
// Footer is now full-width by default.
// Show the footer with copyright, terms and help links.
echo '
<div id="footer">';
<div id="footer">
<div class="inner_wrap">';
// There is now a global "Go to top" link at the right.
echo '
@@ -393,6 +393,7 @@ function template_body_below()
<p>', sprintf($txt['page_created_full'], $context['load_time'], $context['load_queries']), '</p>';
echo '
</div>
</div>';
}

0 comments on commit e8c9559

Please sign in to comment.