1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

Admin area tool tips simplified to a single location. Pref simplified to Enable/Disable. Fixed flip-switch 'e-expandit' failures in Admin > Prefs.

This commit is contained in:
Cameron 2021-02-12 12:19:58 -08:00
parent b7b2a02509
commit 2bf5ee3909
15 changed files with 147 additions and 263 deletions

View File

@ -520,11 +520,10 @@ class banlist_ui extends e_admin_ui
<tr>
<td>
<strong>".$ipAdministrator->getBanTypeString($bt, FALSE)."</strong>
".$frm->help($helpTip, 'before')."
".$frm->help($helpTip)."
</td>
<td class='left'>
".$frm->textarea('ban_text_'.($i), $pref['ban_messages'][$bt], 4, 120, array('size'=>'xxlarge'))."
".$frm->help($helpTip, 'after')."
</td>
<td class='center'>". self::ban_time_dropdown('', BANLAN_32, $pref['ban_durations'][$bt], 'ban_time_' . ($i)) ."</td>
</tr>
@ -607,43 +606,42 @@ class banlist_ui extends e_admin_ui
</colgroup>
<tbody>
<tr>
<td>".BANLAN_63."".$frm->help(BANLAN_65, 'before')."</td>
<td>".BANLAN_63."".$frm->help(BANLAN_65)."</td>
<td>
<div class='auto-toggle-area autocheck'>
".$frm->checkbox('ban_rdns_on_access', 1, $pref['enable_rdns'] == 1)."
".$frm->help(BANLAN_65, 'after')."
</div>
</td>
</tr>
<tr>
<td>".BANLAN_64.$frm->help(BANLAN_66, 'before')."</td>
<td>".BANLAN_64.$frm->help(BANLAN_66)."</td>
<td>
<div class='auto-toggle-area autocheck'>
".$frm->checkbox('ban_rdns_on_ban', 1, $pref['enable_rdns_on_ban'] == 1)."
".$frm->help(BANLAN_66, 'after')."
</div>
</td>
</tr>
<tr>
<td>".BANLAN_67.$frm->help(BANLAN_68, 'before')."</td>
<td>".BANLAN_67.$frm->help(BANLAN_68)."</td>
<td>
<div class='field-spacer'>".$this->drop_box('ban_access_guest', $ban_access_guest).BANLAN_70."</div>
<div class='field-spacer'>".$this->drop_box('ban_access_member', $ban_access_member).BANLAN_69."</div>
".$frm->help(BANLAN_68, 'after')."
</td>
</tr>
<tr>
<td>".BANLAN_71.$frm->help(BANLAN_73, 'before')."</td>
<td>".BANLAN_71.$frm->help(BANLAN_73)."</td>
<td>
<div class='auto-toggle-area autocheck'>
".$frm->checkbox('ban_retrigger', 1, $pref['ban_retrigger'] == 1)."
".$frm->help(BANLAN_73, 'after')."
</div>
</td>
</tr>
<tr>
<td>".BANLAN_91.$frm->help(BANLAN_92, 'before')."</td>
<td>".BANLAN_91.$frm->help(BANLAN_92)."</td>
<td>
".$frm->text('ban_date_format', varset($pref['ban_date_format'], '%H:%M %d-%m-%y'), 40)."
".$frm->help(BANLAN_92, 'after')."

View File

@ -140,43 +140,39 @@ $text = "
<tr>
<td>
<strong class='e-tip'>".CACLAN_11."</strong>
".$frm->help(CACLAN_13, 'before')."
".$frm->help(CACLAN_13)."
</td>
<td>{$contentcache_label}</td>
<td class='left middle'>
".$frm->radio_switch('cachestatus', e107::getPref('cachestatus'))."
".$frm->help(CACLAN_13, 'after')."
</td>
</tr>
<tr>
<td>
<strong class='e-tip'>".CACLAN_12."</strong>
".$frm->help(CACLAN_14, 'before')."
".$frm->help(CACLAN_14)."
</td>
<td>{$syscache_label}</td>
<td class='left middle'>
".$frm->radio_switch('syscachestatus', e107::getPref('syscachestatus'))."
".$frm->help(CACLAN_14, 'after')."
</td>
</tr>
<tr>
<td>
<strong class='e-tip'>".CACLAN_28."</strong>".$frm->help(CACLAN_29, 'before')."
<strong class='e-tip'>".CACLAN_28."</strong>".$frm->help(CACLAN_29)."
</td>
<td>{$jscsscache_label}</td>
<td class='left middle'>
".$frm->radio_switch('jscsscachestatus', e107::getPref('jscsscachestatus'))."
".$frm->help(CACLAN_29, 'after')."
</td>
</tr>
<tr>
<td>
<strong class='e-tip'>".CACLAN_20."</strong>".$frm->help(CACLAN_21, 'before')."
".$frm->help(CACLAN_21, 'after')."
<strong class='e-tip'>".CACLAN_20."</strong>".$frm->help(CACLAN_21)."
</td>
<td>{$dbcache_label}</td>
<td class='left middle'>
@ -185,8 +181,7 @@ $text = "
</tr>
<tr>
<td>
<strong class='e-tip'>".CACLAN_22."</strong>".$frm->help(CACLAN_23, 'before')."
".$frm->help(CACLAN_23, 'after')."
<strong class='e-tip'>".CACLAN_22."</strong>".$frm->help(CACLAN_23)."
</td>
<td>{$imgcache_label}</td>
<td class='left middle'>

View File

@ -1085,12 +1085,11 @@ class eurl_admin_form_ui extends e_admin_form_ui
</tr>";
$text .= "<tr>";
$text .= "<td>".$lanDef[1].$this->help(LAN_EURL_FORM_HELP_DEFAULT, 'before')."</td>";
$text .= "<td>".$lanDef[1].$this->help(LAN_EURL_FORM_HELP_DEFAULT)."</td>";
$text .= "<td class='form-inline'>";
$text .= $this->text('eurl_aliases['.$lanDef[0].']['.$module.']', $defVal, 255, 'size=xlarge');
// $text .= ' ['.$lanDef[1].']';
$text .= "</td><td>";
$text .= $this->help(LAN_EURL_FORM_HELP_DEFAULT, 'after');
$text .= "</td>";
// $help[] = '['.$lanDef[1].'] '.LAN_EURL_FORM_HELP_EXAMPLE.':<br /><strong>'.$url.'</strong>';

View File

@ -1026,10 +1026,9 @@ class news_admin_ui extends e_admin_ui
</colgroup>
<tbody>
<tr>
<td>".NWSLAN_127.$frm->help(LAN_NEWS_88, 'before')."</td>
<td>".NWSLAN_127.$frm->help(LAN_NEWS_88)."</td>
<td>
".$frm->select('news_default_template', $newsTemplates, $pref['news_default_template'])."
".$frm->help(LAN_NEWS_88, 'after')."
</td>
</tr>
@ -1041,18 +1040,16 @@ class news_admin_ui extends e_admin_ui
</tr>
<tr>
<td>".LAN_NEWS_91.$frm->help(LAN_NEWS_92, 'before')."</td>
<td>".LAN_NEWS_91.$frm->help(LAN_NEWS_92)."</td>
<td>
".$frm->select('news_list_limit', $this->_optrange(50, false), $pref['news_list_limit'])."
".$frm->help(LAN_NEWS_92, 'after')."
</td>
</tr>
<tr>
<td>".LAN_NEWS_93.$frm->help(LAN_NEWS_94, 'before')."</td>
<td>".LAN_NEWS_93.$frm->help(LAN_NEWS_94)."</td>
<td>
".$frm->checkboxes('news_list_templates', $this->news_renderTypes, varset($pref['news_list_templates'],0), array('useKeyValues' => 1))."
".$frm->help(LAN_NEWS_94, 'after')."
</td>
</tr>
";
@ -1060,10 +1057,9 @@ class news_admin_ui extends e_admin_ui
$tab1 .= "
<tr>
<td>".LAN_NEWS_110.$frm->help(LAN_NEWS_111, 'before')."</td>
<td>".LAN_NEWS_110.$frm->help(LAN_NEWS_111)."</td>
<td>
".$frm->number('news_cache_timeout',varset($pref['news_cache_timeout'],0), 6)."
".$frm->help(LAN_NEWS_111, 'after')."
</td>
</tr>";
@ -1083,10 +1079,9 @@ class news_admin_ui extends e_admin_ui
</td>
</tr>
<tr>
<td>".NWSLAN_115.$frm->help(NWSLAN_116, 'before')."</td>
<td>".NWSLAN_115.$frm->help(NWSLAN_116)."</td>
<td id='newsposts-archive-cont'>
".$frm->select('newsposts_archive', $this->_optrange(intval($pref['newsposts']) - 1), intval($pref['newsposts_archive']))."
".$frm->help(NWSLAN_116, 'after')."
</td>
</tr>
<tr>
@ -1175,11 +1170,10 @@ class news_admin_ui extends e_admin_ui
$tab1 .= "
<tr>
<td>".NWSLAN_111."</td>
<td>".NWSLAN_111.$frm->help(NWSLAN_112)."</td>
<td>
<div class='auto-toggle-area autocheck'>
".$frm->radio_switch('news_newdateheader', $pref['news_newdateheader'])."
".$frm->help(NWSLAN_112, 'after')."
</div>
</td>
</tr>

View File

@ -877,8 +877,9 @@ class plugin_ui extends e_admin_ui
{
$text .= "<tr>\n<td class='top'>".$tp->toHTML($val['label'],FALSE,'TITLE');
$text .= varset($val['preview']) ? "<div class='indent'>".$val['preview']."</div>" : "";
$text .= varset($val['helpText']) ? "".$frm->help($val['helpText'])."" : "";
$text .= "</td>\n<td>".$frm->select($key,$val['itemList'],$val['itemDefault']);
$text .= varset($val['helpText']) ? "".$frm->help($val['helpText'], 'after')."" : "";
$text .= "</td>\n</tr>\n";
}

View File

@ -335,24 +335,24 @@ $text = "
</td>
</tr>
<tr>
<td><label for='siteurl'>".PRFLAN_3."</label>".$frm->help(PRFLAN_159.": <strong>".SITEURL."</strong>", 'before')."</td>
<td><label for='siteurl'>".PRFLAN_3."</label>
".($pref['siteurl'] == SITEURL ? "" : $frm->help(PRFLAN_159.": <strong>".SITEURL."</strong>"))."</td>
<td>
".$frm->text('siteurl', $pref['siteurl'], 150, 'size=xxlarge')."
".($pref['siteurl'] == SITEURL ? "" : $frm->help(PRFLAN_159.": <strong>".SITEURL."</strong>", 'after'))."
</td>
</tr>
<tr>
<td><label for='redirectsiteurl'>".PRFLAN_134."</label>".$frm->help(PRFLAN_135, 'before')."</td>
<td><label for='redirectsiteurl'>".PRFLAN_134."</label>".$frm->help(PRFLAN_135)."</td>
<td>";
/*
".$frm->radio('redirectsiteurl', 1, $pref['redirectsiteurl'], array('label'=>LAN_ENABLED))."
".$frm->radio('redirectsiteurl', 0, !$pref['redirectsiteurl'], array('label'=>LAN_DISABLED))."
*/
$text .= $frm->radio_switch('redirectsiteurl', $pref['redirectsiteurl']).$frm->help(PRFLAN_135, 'after')."
$text .= $frm->radio_switch('redirectsiteurl', $pref['redirectsiteurl'])."
</td>
</tr>
<tr>
<td><label for='sitebutton'>".PRFLAN_4."</label>".$frm->help(PRFLAN_225, 'before')."</td>
<td><label for='sitebutton'>".PRFLAN_4."</label>".$frm->help(PRFLAN_225)."</td>
<td>
";
/*
@ -391,29 +391,26 @@ $text .= "
</td>
</tr>
<tr>
<td><label for='sitelogo'>".PRFLAN_214."</label>".$frm->help(PRFLAN_226, 'before')."</td>
<td><label for='sitelogo'>".PRFLAN_214."</label>".$frm->help(PRFLAN_226)."</td>
<td>".$frm->imagepicker('sitelogo',$pref['sitelogo'],'','w=200&help='.PRFLAN_226)."</td>
</tr>
<tr>
<td><label for='sitetag'>".PRFLAN_5."</label>".$frm->help(PRFLAN_227, 'before')."</td>
<td><label for='sitetag'>".PRFLAN_5."</label>".$frm->help(PRFLAN_227)."</td>
<td>
".$frm->textarea('sitetag', $tp->toForm($pref['sitetag']), 3, 59, array('size'=>'xxlarge'))."
".$frm->help(PRFLAN_227, 'after')."
</td>
</tr>
<tr>
<td><label for='sitedescription'>".PRFLAN_6."</label>".$frm->help(PRFLAN_228, 'before')."</td>
<td><label for='sitedescription'>".PRFLAN_6."</label>".$frm->help(PRFLAN_228)."</td>
<td>
".$frm->textarea('sitedescription', $tp->toForm($pref['sitedescription']), 3, 80, array('size'=>'xxlarge'))."
".$frm->help(PRFLAN_228, 'after')."
</td>
</tr>
<tr>
<td><label for='sitedisclaimer'>".PRFLAN_9."</label>".$frm->help(PRFLAN_229, 'before')."</td>
<td><label for='sitedisclaimer'>".PRFLAN_9."</label>".$frm->help(PRFLAN_229)."</td>
<td>
".$frm->textarea('sitedisclaimer',$tp->toForm( $pref['sitedisclaimer']), 3, 80, array('size'=>'xxlarge'))."
".$frm->help(PRFLAN_229, 'after')."
</td>
</tr>
</tbody>
@ -446,17 +443,15 @@ $text .= "<fieldset class='e-hideme' id='core-prefs-email'>
</td>
</tr>
<tr>
<td><label for='replyto-name'>".PRFLAN_174."</label>".$frm->help(PRFLAN_175, 'before')."</td>
<td><label for='replyto-name'>".PRFLAN_174."</label>".$frm->help(PRFLAN_175)."</td>
<td>
".$frm->text('replyto_name', $pref['replyto_name'], 100, array('size'=>'xlarge'))."
".$frm->help(PRFLAN_175, 'after')."
</td>
</tr>
<tr>
<td><label for='replyto-email'>".PRFLAN_176."</label>".$frm->help(PRFLAN_177, 'before')."</td>
<td><label for='replyto-email'>".PRFLAN_176."</label>".$frm->help(PRFLAN_177)."</td>
<td>
".$frm->text('replyto_email', $pref['replyto_email'], 100, array('size'=>'xlarge'))."
".$frm->help(PRFLAN_177, 'after')."
</td>
</tr>
@ -496,48 +491,44 @@ $text .= "<fieldset class='e-hideme' id='core-prefs-email'>
<tr>
<td><label for='sitecontactinfo'>".PRFLAN_162."</label>".$frm->help(PRFLAN_163, 'before')."</td>
<td><label for='sitecontactinfo'>".PRFLAN_162."</label>".$frm->help(PRFLAN_163)."</td>
<td>
".$frm->textarea('sitecontactinfo', $pref['sitecontactinfo'], 6, 59, array('size'=>'xxlarge'))."
".$frm->help(PRFLAN_163, 'after')."
</td>
</tr>
<tr>
<td><label for='sitecontacts'>".PRFLAN_168."</label>".$frm->help(PRFLAN_169, 'before')."</td>
<td><label for='sitecontacts'>".PRFLAN_168."</label>".$frm->help(PRFLAN_169)."</td>
<td>
".$e_userclass->uc_dropdown('sitecontacts', $pref['sitecontacts'], 'nobody,main,admin,classes', "tabindex='".$frm->getNext()."'")."
".$frm->help(PRFLAN_169, 'after')."
</td>
</tr>
<tr>
<td><label for='contact_visibility'>".PRFLAN_258."</label>".$frm->help(PRFLAN_274, 'before')."</td>
<td><label for='contact_visibility'>".PRFLAN_258."</label>".$frm->help(PRFLAN_274)."</td>
<td>
".$e_userclass->uc_dropdown('contact_visibility', varset( $pref['contact_visibility'],e_UC_PUBLIC), null, "tabindex='".$frm->getNext()."'")."
".$frm->help(PRFLAN_274, 'after')."
</td>
</tr>
<tr>
<td><label for='contact-filter'>".PRFLAN_270."</label>".$frm->help(PRFLAN_271, 'before')."</td>
<td><label for='contact-filter'>".PRFLAN_270."</label>".$frm->help(PRFLAN_271)."</td>
<td>
".$frm->textarea('contact_filter', $pref['contact_filter'], 5, 59, array('size'=>'xxlarge'))."
".$frm->help(PRFLAN_271, 'after')."
</td>
</tr>
<tr>
<td><label for='contact-emailcopy'>".PRFLAN_164."</label>".$frm->help(PRFLAN_165, 'before')."</td>
<td><label for='contact-emailcopy'>".PRFLAN_164."</label>".$frm->help(PRFLAN_165)."</td>
<td>";
/*
".$frm->radio('contact_emailcopy', 1, $pref['contact_emailcopy'])."
".$frm->label(LAN_ENABLED, 'contact_emailcopy', 1)."&nbsp;&nbsp;
".$frm->radio('contact_emailcopy', 0, !$pref['contact_emailcopy'])."
".$frm->label(LAN_DISABLED, 'contact_emailcopy', 0)."
".$frm->help(PRFLAN_165, 'after')."
*/
$text .= $frm->radio_switch('contact_emailcopy', $pref['contact_emailcopy']).$frm->help(PRFLAN_165, 'after')."
$text .= $frm->radio_switch('contact_emailcopy', $pref['contact_emailcopy'])."
@ -561,25 +552,22 @@ $text .= "
</colgroup>
<tbody>
<tr>
<td><label for='gdpr-privacypolicy'>".PRFLAN_278."</label>".$frm->help(PRFLAN_279, 'before')."</td>
<td><label for='gdpr-privacypolicy'>".PRFLAN_278."</label>".$frm->help(PRFLAN_279)."</td>
<td>
".$frm->text('gdpr_privacypolicy', $pref['gdpr_privacypolicy'], 200, array('size'=>'xxlarge'))."
".$frm->help(PRFLAN_279, 'after')."
</td>
</tr>
<tr>
<td><label for='gdpr-termsandconditions'>".PRFLAN_280."</label>".$frm->help(PRFLAN_279, 'before')."</td>
<td><label for='gdpr-termsandconditions'>".PRFLAN_280."</label>".$frm->help(PRFLAN_279)."</td>
<td>
".$frm->text('gdpr_termsandconditions', $pref['gdpr_termsandconditions'], 200, array('size'=>'xxlarge'))."
".$frm->help(PRFLAN_279, 'after')."
</td>
</tr>
<tr>
<td><label>".LAN_DESCRIPTION."</label>".$frm->help(nl2br(PRFLAN_281), 'before')."</td>
<td><label>".LAN_DESCRIPTION."</label>".$frm->help(nl2br(PRFLAN_281))."</td>
<td>
".$frm->help(nl2br(PRFLAN_281), 'after')."
</td>
</tr>
</tbody>
@ -650,32 +638,28 @@ $text .= "
</colgroup>
<tbody>
<tr>
<td><label for='admin-alerts-ok'>".PRFLAN_95."</label>".$frm->help(PRFLAN_96, 'before')."</td>
<td><label for='admin-alerts-ok'>".PRFLAN_95."</label>".$frm->help(PRFLAN_96)."</td>
<td>
".$frm->radio_switch('admin_alerts_ok', $pref['admin_alerts_ok'])."
".$frm->help(PRFLAN_96, 'after')."
</td>
</tr>
<tr>
<td><label for='admin-alerts-uniquemenu'>".PRFLAN_97."</label>".$frm->help(PRFLAN_98, 'before')."</td>
<td><label for='admin-alerts-uniquemenu'>".PRFLAN_97."</label>".$frm->help(PRFLAN_98)."</td>
<td>
".$frm->radio_switch('admin_alerts_uniquemenu', $pref['admin_alerts_uniquemenu'])."
".$frm->help(PRFLAN_98, 'after')."
</td>
</tr>";
/*<tr>
<td>".PRFLAN_199."</td>
<td>".PRFLAN_199.$frm->help(PRFLAN_200)."</td>
<td>
".$frm->radio_switch('admin_slidedown_subs', $pref['admin_slidedown_subs'])."
".$frm->help(PRFLAN_200, 'after')."
</td>
</tr>*/
$text .= "
<tr>
<td><label for='admin-separate-plugins'>".PRFLAN_204."</label>".$frm->help(PRFLAN_205, 'before')."</td>
<td><label for='admin-separate-plugins'>".PRFLAN_204."</label>".$frm->help(PRFLAN_205)."</td>
<td>
".$frm->radio_switch('admin_separate_plugins', varset($pref['admin_separate_plugins']))."
".$frm->help(PRFLAN_205, 'after')."
</td>
</tr>
<tr>
@ -693,7 +677,7 @@ $text .= "
<tr>
<td><label for='admin-collapse-sidebar'>".PRFLAN_285."</label></td>
<td>
".$frm->radio('admin_helptip_location',['-1'=> LAN_DISABLED, '0' => PRFLAN_286, '1' => PRFLAN_287], varset($pref['admin_helptip_location']))."
".$frm->radio_switch('admin_helptip', varset($pref['admin_helptip']))."
</td>
</tr>
@ -730,21 +714,18 @@ $text .= "
<td><label for='shortdate'>".PRFLAN_22."</label>".$frm->help(PRFLAN_83.": ".$date1,'before')."</td>
<td>
".$frm->text('shortdate', $pref['shortdate'], 50)."
".$frm->help(PRFLAN_83.": ".$date1,'after')."
</td>
</tr>
<tr>
<td><label for='longdate'>".PRFLAN_23."</label>".$frm->help(PRFLAN_83.": ".$date2, 'before')."</td>
<td><label for='longdate'>".PRFLAN_23."</label>".$frm->help(PRFLAN_83.": ".$date2)."</td>
<td>
".$frm->text('longdate', $pref['longdate'], 50)."
".$frm->help(PRFLAN_83.": ".$date2, 'after')."
</td>
</tr>
<tr>
<td><label for='forumdate'>".PRFLAN_24."</label>".$frm->help(PRFLAN_83.": ".$date3,'before')."</td>
<td>
".$frm->text('forumdate', $pref['forumdate'], 50)."
".$frm->help(PRFLAN_83.": ".$date3,'after')."
</td>
</tr>";
@ -844,10 +825,9 @@ $text .= "
</colgroup>
<tbody>
<tr>
<td><label for='user-reg'>".PRFLAN_224."</label>".$frm->help(PRFLAN_30, 'before')."</td>
<td><label for='user-reg'>".PRFLAN_224."</label>".$frm->help(PRFLAN_30)."</td>
<td>
".$frm->radio('user_reg', $elements, $pref['user_reg'])."
".$frm->help(PRFLAN_30, 'after')."
</td>
</tr>";
@ -859,7 +839,7 @@ $text .= "
$text .= "
<tr>
<td><label for='user-reg-veri'>".PRFLAN_154."</label>".$frm->help($PRFLAN_154a, 'before')."</td>
<td><label for='user-reg-veri'>".PRFLAN_154."</label>".$frm->help($PRFLAN_154a)."</td>
<td>
".$frm->select_open('user_reg_veri', array('size'=>'xlarge'));
$veri_list = array(PRFLAN_152,PRFLAN_31,PRFLAN_153);
@ -871,9 +851,7 @@ $text .= "
$text .= "
</select>
".$frm->help($PRFLAN_154a, 'after')."
$text .= "</select>
</td>
</tr>
@ -912,32 +890,27 @@ $text .= "
$text .= "
<tr>
<td><label for='membersonly-enabled'>".PRFLAN_58."</label>".$frm->help(PRFLAN_59, 'before')."</td>
<td><label for='membersonly-enabled'>".PRFLAN_58."</label>".$frm->help(PRFLAN_59)."</td>
<td>";
$memDisp = !vartrue($pref['membersonly_enabled']) ? "e-hideme" : "";
$text .= $frm->radio_switch('membersonly_enabled', $pref['membersonly_enabled'],'', '', 'class=e-expandit')."
".$frm->help(PRFLAN_59, 'after')."
<div class='e-expandit-container {$memDisp}' style='padding-top:10px'>
<div class='form-group clearfix'>
".$frm->help(PRFLAN_266, 'before').
$text .= $frm->radio_switch('membersonly_enabled', $pref['membersonly_enabled'])."
<div class='e-expandit-container' >
<div class='form-group clearfix' style='padding-top:10px'>
".$frm->help(PRFLAN_266).
$frm->select('membersonly_redirect',$membersOnlyRedirectOptions,$pref['membersonly_redirect'], array('size'=>'xxlarge'))."
".$frm->help(PRFLAN_266, 'after')."
</div>
<div class='form-group clearfix'>".$frm->help(PRFLAN_207, 'before').
<div class='form-group clearfix'>".$frm->help(PRFLAN_207).
$frm->textarea('membersonly_exceptions', $pref['membersonly_exceptions'], 3, 1, 'size=xxlarge&placeholder='.PRFLAN_206)."
".$frm->help(PRFLAN_207, 'after')."</div>
</div>
</div>
</td>
</tr>
<tr>
<td><label for='autologinpostsignup'>".PRFLAN_197."</label>".$frm->help(PRFLAN_198, 'before')."</td>
<td><label for='autologinpostsignup'>".PRFLAN_197."</label>".$frm->help(PRFLAN_198)."</td>
<td>
".$frm->radio_switch('autologinpostsignup', $pref['autologinpostsignup'])."
".$frm->help(PRFLAN_198, 'after')."
</td>
</tr>
@ -961,10 +934,9 @@ $text .= "
</tr>
<tr>
<td><label for='signup-maxip'>".PRFLAN_136."</label>".$frm->help(PRFLAN_78, 'before')."</td>
<td><label for='signup-maxip'>".PRFLAN_136."</label>".$frm->help(PRFLAN_78)."</td>
<td>
".$frm->number('signup_maxip', $pref['signup_maxip'], 3)."
".$frm->help(PRFLAN_78, 'after')."
</td>
</tr>
@ -1075,10 +1047,9 @@ $text .= "
$text .= "
<tr>
<td><label for='use-coppa'>".PRFLAN_45."</label>".$frm->help($useCoppaHelp, 'before')."</td>
<td><label for='use-coppa'>".PRFLAN_45."</label>".$frm->help($useCoppaHelp)."</td>
<td>
".$frm->radio_switch('use_coppa', $pref['use_coppa'])."
".$frm->help($useCoppaHelp, 'after')."
</td>
</tr>";
@ -1111,17 +1082,15 @@ $text .= "
<td><label for='predefinedloginname'>".PRFLAN_192.":</label>".$frm->help($predefinedloginnameHelp,'before')."</td>
<td>
".$frm->text('predefinedLoginName', $pref['predefinedLoginName'], 50)."
".$frm->help($predefinedloginnameHelp,'after')."
</td>
</tr>
<tr>
<td><label for='signup-disallow-text'>".CUSTSIG_18."</label>".$frm->help(CUSTSIG_19, 'before')."</td>
<td><label for='signup-disallow-text'>".CUSTSIG_18."</label>".$frm->help(CUSTSIG_19)."</td>
<td>
".$frm->tags('signup_disallow_text', $pref['signup_disallow_text'], 500)."
".$frm->help(CUSTSIG_19, 'after')."
</td>
</tr>
@ -1134,10 +1103,9 @@ $text .= "
</tr>
<tr>
<td><label for='old_np'>".PRFLAN_124.":</label>".$frm->help(PRFLAN_125, 'before')."</td>
<td><label for='old_np'>".PRFLAN_124.":</label>".$frm->help(PRFLAN_125)."</td>
<td>
".$frm->radio_switch('old_np', $pref['old_np'])."
".$frm->help(PRFLAN_125, 'after')."
</td>
</tr>
@ -1206,48 +1174,50 @@ if ($savePrefs) $core_pref->setPref($pref)->save(false, true);
</colgroup>
<tbody>
<tr>
<td><label for='make-clickable'>".PRFLAN_127.":</label>".$frm->help(PRFLAN_128, 'before')."</td>
<td><label for='make-clickable'>".PRFLAN_127.":</label>".$frm->help(PRFLAN_128)."</td>
<td>
".$frm->radio_switch('make_clickable', $pref['make_clickable'])."
".$frm->help(PRFLAN_128, 'after')."
</td>
</tr>";
$replaceDisp = vartrue($pref['link_replace']) ? "" : "e-hideme";
$text .= "
<tr>
<td><label for='link-replace'>".PRFLAN_102."?:</label></td>
<td><label for='link-replace'>".PRFLAN_102."?:</label>
".$frm->help(PRFLAN_103)."
</td>
<td>
".$frm->help(PRFLAN_103, 'before')."
".$frm->radio_switch('link_replace', $pref['link_replace'],'', '', 'expandit=1')."
".$frm->help(PRFLAN_103, 'after')."
<div class='e-expandit-container {$replaceDisp}'>
".$frm->help(PRFLAN_105, 'before')."
".$frm->text('link_text', $pref['link_text'], 200, 'placeholder='.PRFLAN_104)."
".$frm->help(PRFLAN_105, 'after')
.$frm->help(PRFLAN_108, 'before').
$frm->text('email_text', $tp->post_toForm($pref['email_text']), 200, 'placeholder='.PRFLAN_107)."
".$frm->help(PRFLAN_108, 'after')."
".$frm->radio_switch('link_replace', $pref['link_replace'])."
<div class='e-expandit-container'>
<table class='table table-condensed table-bordered' style='margin:0; width:380px'>
<tr>
<td>URLs ".$frm->help(PRFLAN_105)."</td><td>".$frm->text('link_text', $pref['link_text'], 200, 'size=block-level&placeholder='.PRFLAN_104)."</td>
</tr>
<tr>
<td>Emails ".$frm->help(PRFLAN_108)."</td><td>".$frm->text('email_text', $tp->post_toForm($pref['email_text']), 200, 'size=block-level&placeholder='.PRFLAN_107)."</td>
</tr>
</table>
</div>
</td>
</tr>
<tr >
<td><label for='links-new-window'>".PRFLAN_145."?:</label>".$frm->help(PRFLAN_146, 'before')."</td>
<td><label for='links-new-window'>".PRFLAN_145."?:</label>".$frm->help(PRFLAN_146)."</td>
<td>
".$frm->radio_switch('links_new_window', $pref['links_new_window'])."
".$frm->help(PRFLAN_146, 'after')."
</td>
</tr>
<tr>
<td><label for='profanity-filter'>".PRFLAN_40."</label>".$frm->help(PRFLAN_41, 'before')."</td>
<td><label for='profanity-filter'>".PRFLAN_40."</label>".$frm->help(PRFLAN_41)."</td>
<td>
".$frm->radio_switch('profanity_filter', $pref['profanity_filter'])."
".$frm->help(PRFLAN_41, 'after')."
</td>
</tr>
@ -1258,70 +1228,61 @@ if ($savePrefs) $core_pref->setPref($pref)->save(false, true);
</td>
</tr>
<tr>
<td><label for='profanity-words'>".PRFLAN_43.":</label>".$frm->help(PRFLAN_44, 'before')."</td>
<td><label for='profanity-words'>".PRFLAN_43.":</label>".$frm->help(PRFLAN_44)."</td>
<td>
".$frm->tags('profanity_words', $pref['profanity_words'], 250, array('maxItems'=>40))."
".$frm->help(PRFLAN_44, 'after')."
</td>
</tr>
<tr>
<td><label for='main-wordwrap'>".PRFLAN_109.":</label>".$frm->help(PRFLAN_110, 'before')."</td>
<td><label for='main-wordwrap'>".PRFLAN_109.":</label>".$frm->help(PRFLAN_110)."</td>
<td>
".$frm->number('main_wordwrap', $pref['main_wordwrap'], 3)."
".$frm->help(PRFLAN_110, 'after')."
</td>
</tr>
<tr>
<td><label for='menu-wordwrap'>".PRFLAN_111.":</label>".$frm->help(PRFLAN_110, 'before')."</td>
<td><label for='menu-wordwrap'>".PRFLAN_111.":</label>".$frm->help(PRFLAN_110)."</td>
<td>
".$frm->number('menu_wordwrap', $pref['menu_wordwrap'], 3)."
".$frm->help(PRFLAN_110, 'after')."
</td>
</tr>
<tr>
<td><label for='post-html'>".PRFLAN_116.":</label>".$frm->help(PRFLAN_117, 'before')."</td>
<td><label for='post-html'>".PRFLAN_116.":</label>".$frm->help(PRFLAN_117)."</td>
<td>
".$e_userclass->uc_dropdown('post_html', $pref['post_html'], 'nobody,public,member,admin,main,classes', "tabindex='".$frm->getNext()."'")."
".$frm->help(PRFLAN_117, 'after')."
</td>
</tr>
<tr>
<td><label for='post-script'>".PRFLAN_215.":</label>".$frm->help(PRFLAN_216, 'before')."</td>
<td><label for='post-script'>".PRFLAN_215.":</label>".$frm->help(PRFLAN_216)."</td>
<td>
".$e_userclass->uc_dropdown('post_script',$pref['post_script'],'nobody,admin,main,classes,no-excludes')."
".$frm->help(PRFLAN_216, 'after')."
</td>
</tr>
<tr>
<td><label for='inline-editing'>".PRFLAN_268.":</label>".$frm->help(PRFLAN_269, 'before')."</td>
<td><label for='inline-editing'>".PRFLAN_268.":</label>".$frm->help(PRFLAN_269)."</td>
<td>
".$frm->userclass('inline_editing',$pref['inline_editing'],'off','nobody,admin,main,classes,no-excludes')."
".$frm->help(PRFLAN_269, 'after')."
</td>
</tr>
<tr>
<td><label for='filter-script'>".PRFLAN_217.":</label>".$frm->help(PRFLAN_218, 'before')."</td>
<td><label for='filter-script'>".PRFLAN_217.":</label>".$frm->help(PRFLAN_218)."</td>
<td>
".$frm->radio_switch('filter_script', varset($pref['filter_script'], 1))."
".$frm->help(PRFLAN_218, 'after')."
</td>
</tr>
<tr>
<td><label for='html-abuse'>".PRFLAN_220.":</label>".$frm->help(PRFLAN_221, 'before')."</td>
<td><label for='html-abuse'>".PRFLAN_220.":</label>".$frm->help(PRFLAN_221)."</td>
<td>
".$frm->radio_switch('html_abuse', varset($pref['html_abuse'], 1))."
".$frm->help(PRFLAN_221, 'after')."
</td>
</tr>
<tr>
<td><label for='wysiwyg'>".PRFLAN_122.":</label>".$frm->help(PRFLAN_123, 'before')."</td>
<td><label for='wysiwyg'>".PRFLAN_122.":</label>".$frm->help(PRFLAN_123)."</td>
<td>
".$frm->radio_switch('wysiwyg', $pref['wysiwyg'])."
".$frm->help(PRFLAN_123, 'after')."
</td>
</tr>
@ -1333,17 +1294,15 @@ if(file_exists(e_PLUGIN."geshi/geshi.php"))
$usegeshiHelp = str_replace("[link]", "http://qbnz.com/highlighter/", PRFLAN_119);
$text .= "
<tr>
<td><label for='usegeshi'>".PRFLAN_118."?:</label>".$frm->help($usegeshiHelp, 'before')."</td>
<td><label for='usegeshi'>".PRFLAN_118."?:</label>".$frm->help($usegeshiHelp)."</td>
<td>
".$frm->radio_switch('useGeshi', $pref['useGeshi'])."
".$frm->help($usegeshiHelp, 'after')."
</td>
</tr>
<tr>
<td><label for='defaultlangeshi'>".PRFLAN_120."?:</label>".$frm->help(PRFLAN_121, 'before')."</td>
<td><label for='defaultlangeshi'>".PRFLAN_120."?:</label>".$frm->help(PRFLAN_121)."</td>
<td>
".$frm->text('defaultLanGeshi', ($pref['defaultLanGeshi'] ? $pref['defaultLanGeshi'] : "php"), 20)."
".$frm->help(PRFLAN_121, 'after')."
</td>
</tr>
";
@ -1384,14 +1343,13 @@ $text .= "
$text .="
<tr>
<td><label for='ssl-enabled'>".PRFLAN_60."</label>".$frm->help(PRFLAN_61, 'before')."</td>
<td><label for='ssl-enabled'>".PRFLAN_60."</label>".$frm->help(PRFLAN_61)."</td>
<td>";
if(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') // Only allow if an SSL login has been made.
{
$text .= $frm->radio_switch('ssl_enabled', $pref['ssl_enabled']);
$text .= $frm->help(PRFLAN_61, 'after');
}
else
{
@ -1411,7 +1369,7 @@ $text .= "
$label = str_replace($srch,$repl,$label);
$text .= "<tr><td><label for='".$key."'>".$label."</label>".$frm->help(PRFLAN_223, 'before')."</td><td>";
$text .= "<tr><td><label for='".$key."'>".$label."</label>".$frm->help(PRFLAN_223)."</td><td>";
if($hasGD)
{
$text .= $frm->radio_switch($key, $pref[$key]);
@ -1422,7 +1380,6 @@ $text .= "
}
$text .= "
".$frm->help(PRFLAN_223, 'after')."
</td></tr>\n";
}
@ -1471,10 +1428,9 @@ $text .= "
$text .= "
<tr>
<td><label for='disallowmultilogin'>".PRFLAN_129."</label>".$frm->help(PRFLAN_130, 'before')."</td>
<td><label for='disallowmultilogin'>".PRFLAN_129."</label>".$frm->help(PRFLAN_130)."</td>
<td>
".$frm->radio_switch('disallowMultiLogin', $pref['disallowMultiLogin'], LAN_YES, LAN_NO)."
".$frm->help(PRFLAN_130, 'after')."
</td>
</tr>
@ -1488,17 +1444,15 @@ $text .= "
<tr>
<td><label for='cookie-name'>".PRFLAN_55."</label>".$frm->help(PRFLAN_263, 'before')."</td>
<td><label for='cookie-name'>".PRFLAN_55."</label>".$frm->help(PRFLAN_263)."</td>
<td >".$frm->text('cookie_name', varset($pref['cookie_name']), 20)."
".$frm->help(PRFLAN_263, 'after')."
</td>
</tr>
<tr>
<td><label for='session-lifetime'>".PRFLAN_272."</label>".$frm->help(PRFLAN_273, 'before')."</td>
<td><label for='session-lifetime'>".PRFLAN_272."</label>".$frm->help(PRFLAN_273)."</td>
<td>
".$frm->number('session_lifetime', varset($pref['session_lifetime']), 6)."
".$frm->help(PRFLAN_273, 'after')."
</td>
</tr>
";
@ -1550,7 +1504,8 @@ $text .= "
$CHAP_list = array(PRFLAN_180, PRFLAN_181, PRFLAN_182);
$text .= "
<td><label for='password-chap'>".PRFLAN_178."</label>".$frm->help(PRFLAN_183."<br />".PRFLAN_179, 'before')."</td>
<td><label for='password-chap'>".PRFLAN_178."</label>".
$frm->help(PRFLAN_183."<br />".PRFLAN_179)."</td>
<td>";
$CHAPopt = !empty($pref['ssl_enabled']) || !empty($pref['passwordEncoding']) ? array('disabled'=>1) : null;
@ -1559,8 +1514,7 @@ $text .= "
//TODO - user tracking session name - visible only if Cookie is enabled (JS)
$text .= $frm->help(PRFLAN_183."<br />".PRFLAN_179, 'after')."
</td>
$text .= "</td>
</tr>
<tr>
@ -1570,14 +1524,13 @@ $text .= "
</td>
</tr>
<tr>
<td><label for='antiflood-timeout'>".PRFLAN_36."</label>".$frm->help(PRFLAN_38, 'before')."</td>
<td><label for='antiflood-timeout'>".PRFLAN_36."</label>".$frm->help(PRFLAN_38)."</td>
<td>
".$frm->number('antiflood_timeout', $pref['antiflood_timeout'], 3)."
".$frm->help(PRFLAN_38, 'after')."
</td>
</tr>
<tr>
<td><label for='autoban'>".PRFLAN_37."</label>".$frm->help(PRFLAN_91, 'before')."</td>
<td><label for='autoban'>".PRFLAN_37."</label>".$frm->help(PRFLAN_91)."</td>
<td>
".$frm->select_open('autoban');
@ -1598,14 +1551,14 @@ foreach($autoban_list as $ab => $ab_title)
$text .= "
</select>
".$frm->help(PRFLAN_91, 'after')."
</td>
</tr>
<tr>
<td><label for='failed-login-limit'>".PRFLAN_231."</label>".$frm->help(PRFLAN_232, 'before')."</td>
<td><label for='failed-login-limit'>".PRFLAN_231."</label>".$frm->help(PRFLAN_232)."</td>
<td>
".$frm->number('failed_login_limit', varset($pref['failed_login_limit'],10), 3, array('max'=>10, 'min'=>0))."
".$frm->help(PRFLAN_232, 'after')."
</td>
</tr>
<tr>
@ -1636,10 +1589,9 @@ $text .= "
</td>
</tr>
<tr>
<td>".PRFLAN_32."".$frm->help(PRFLAN_33, 'before')."</td>
<td>".PRFLAN_32."".$frm->help(PRFLAN_33)."</td>
<td>
".$frm->radio_switch('anon_post', $pref['anon_post'], LAN_YES, LAN_NO)."
".$frm->help(PRFLAN_33, 'after')."
</td>
</tr>
<tr>
@ -1670,13 +1622,12 @@ $text .= "
</tr>
<tr>
<td><label>".PRFLAN_233."</label>".$frm->help(PRFLAN_234, 'before')."</td>
<td><label>".PRFLAN_233."</label>".$frm->help(PRFLAN_234)."</td>
<td>
".
$frm->uc_select('comments_moderate', $pref['comments_moderate'],"nobody,guest,new,bots,public,admin,main,classes").
"
".$frm->help(PRFLAN_234, 'after')."
</td>
</tr>
<tr>
@ -1754,29 +1705,25 @@ $text .= "
</colgroup>
<tbody>
<tr>
<td><label>".UPLLAN_25."</label>".$frm->help(UPLLAN_26, 'before')."</td>
<td><label>".UPLLAN_25."</label>".$frm->help(UPLLAN_26)."</td>
<td>".
$frm->radio_switch('upload_enabled', $pref['upload_enabled'])
."
".$frm->help(UPLLAN_26, 'after')."
</td>
."</td>
</tr>
<tr>
<td><label>".UPLLAN_33."</label>".$frm->help(UPLLAN_34, 'before')."
<td><label>".UPLLAN_33."</label>".$frm->help(UPLLAN_34)."
</td>
<td>".
$frm->text('upload_maxfilesize', $pref['upload_maxfilesize'], 10)
."
".$frm->help(UPLLAN_34, 'after')."
</td>
</tr>
<tr>
<td><label>".UPLLAN_37."</label>".$frm->help(UPLLAN_38, 'before')."</td>
<td><label>".UPLLAN_37."</label>".$frm->help(UPLLAN_38)."</td>
<td>".r_userclass("upload_class", $pref['upload_class'],"off","nobody,public,guest,member,admin,classes")."
".$frm->help(UPLLAN_38, 'after')."
</td>
</tr>
<tr><td>".PRFLAN_240."</td>
@ -1870,31 +1817,27 @@ if(E107_DEBUG_LEVEL > 0)
</thead>
<tbody>
<tr>
<td><label>" . PRFLAN_248 . "</label>".$frm->help( PRFLAN_249 , 'before')."</td>
<td><label>" . PRFLAN_248 . "</label>".$frm->help( PRFLAN_249 )."</td>
<td>
" . $frm->radio_switch('e_jslib_nocombine', $pref['e_jslib_nocombine'], LAN_YES, LAN_NO) . "
".$frm->help( PRFLAN_249 , 'after')."
</td>
</tr>
<tr>
<td><label>" . PRFLAN_250 ."</label>".$frm->help( PRFLAN_251 , 'before')."</td>
<td><label>" . PRFLAN_250 ."</label>".$frm->help( PRFLAN_251 )."</td>
<td>
" . $frm->radio_switch('e_jslib_gzip', $pref['e_jslib_gzip'], LAN_YES, LAN_NO) . "
".$frm->help( PRFLAN_251 , 'after')."
</td>
</tr>
<tr>
<td><label>" . PRFLAN_252 . "</label>".$frm->help( PRFLAN_251 , 'before')."</td>
<td><label>" . PRFLAN_252 . "</label>".$frm->help( PRFLAN_251 )."</td>
<td>
" . $frm->radio_switch('e_jslib_nocache', $pref['e_jslib_nocache'], LAN_YES, LAN_NO) . "
".$frm->help( PRFLAN_251 , 'after')."
</td>
</tr>
<tr>
<td><label>" . PRFLAN_253 . "</label>".$frm->help( PRFLAN_251 , 'before')."</td>
<td><label>" . PRFLAN_253 . "</label>".$frm->help( PRFLAN_251 )."</td>
<td>
" . $frm->radio_switch('e_jslib_nobcache', $pref['e_jslib_nobcache'], LAN_YES, LAN_NO) . "
".$frm->help( PRFLAN_251 , 'after')."
</td>
</tr>
";
@ -2037,17 +1980,15 @@ $text .= "
</colgroup>
<tbody>
<tr>
<td>".PRFLAN_147.":".$frm->help(PRFLAN_148, 'before')."</td>
<td>".PRFLAN_147.":".$frm->help(PRFLAN_148)."</td>
<td>
".$frm->radio_switch('developer', $pref['developer'])."
".$frm->help(PRFLAN_148, 'after')."
</td>
</tr>
<tr>
<td>".PRFLAN_196."".$frm->help(PRFLAN_196a." <strong>".e_LOG."</strong>", 'before')."</td>
<td>".PRFLAN_196."".$frm->help(PRFLAN_196a." <strong>".e_LOG."</strong>")."</td>
<td>
".$frm->radio_switch('log_page_accesses', $pref['log_page_accesses'])."
".$frm->help(PRFLAN_196a." <strong>".e_LOG."</strong>", 'after')."
</td>
</tr>
<tr>

View File

@ -1649,7 +1649,6 @@ class users_admin_ui extends e_admin_ui
<td>".USRLAN_239."</td>
<td>
".$frm->select('sendconfemail', array('0' => USRLAN_240, '1' => USRLAN_241, '2' => USRLAN_242), (int) varset($_POST['sendconfemail'], 0), array('size'=>'xlarge'))."
".$frm->help(USRLAN_181, 'after')."
</td>
</tr>";

View File

@ -6,7 +6,7 @@
<core name="admin_separate_plugins">0</core>
<core name="admin_collapse_sidebar">0</core>
<core name="admin_navbar_labels">0</core>
<core name="admin_helptip_location">1</core>
<core name="admin_helptip">1</core>
<core name="admincode">0</core>
<core name="admincss">css/modern-light.css</core>
<core name="adminlanguage"></core>

View File

@ -70,7 +70,7 @@ class e_form
private $_inline_token;
public $_snippets = false; // use snippets or not. - experimental, and may be removed - use at own risk.
private $_fontawesome = false;
private $_help_location = 0;
private $_helptip = 1;
/**
* @var user_class
*/
@ -96,27 +96,9 @@ class e_form
$this->_fontawesome = true;
}
$this->_help_location = (int) e107::getPref('admin_helptip_location');
$this->_helptip = (int) e107::getPref('admin_helptip', 1);
}
/**
* Set the location of where tooltips will be rendered.
* @param $val
*/
public function setHelpLocation($val)
{
$opts = array(
'before' => 1, // icon
'after' => 0, // hover
'none' => -1 // disabled.
);
if(isset($opts[$val]))
{
$this->_help_location = $opts[$val];
}
}
/**
* @param $tmp
@ -3051,19 +3033,15 @@ class e_form
return "<label$for_id class='e-tip legacy'>{$text}</label>";
}
public function help($text, $mode='after')
public function help($text)
{
if(empty($text)
|| $this->_help_location === -1
|| ($this->_help_location === 0 && $mode === 'before')
|| ($this->_help_location === 1 && $mode === 'after')
)
if(empty($text) || $this->_helptip === 0)
{
return null;
}
$ret = '';
$ret .= ($mode === 'before') ? '<i class="admin-ui-help-tip far fa-question-circle"><!-- --></i>' : '';
$ret .= '<i class="admin-ui-help-tip far fa-question-circle"><!-- --></i>';
$ret .= '<div class="field-help" data-placement="left" style="display:none">'.defset($text,$text).'</div>'; // display:none to prevent visibility during page load.
return $ret;
@ -7408,7 +7386,7 @@ var_dump($select_options);*/
$model_required = $model->getValidationRules();
$required_help = false;
$hidden_fields = array();
$helpTipLocation = $this->_help_location;
$helpTipLocation = $this->_helptip;
foreach($fdata['fields'] as $key => $att)
{
@ -7520,9 +7498,9 @@ var_dump($select_options);*/
$leftCell = "<span{$required_class}>".defset(vartrue($att['title']), vartrue($att['title'])). '</span>' .$required.$label;
$leftCell .= $this->help(varset($att['help']), 'before');
$leftCell .= $this->help(varset($att['help']));
$rightCell = $this->renderElement($keyName, $model->getIfPosted($valPath), $att, varset($model_required[$key], array()), $model->getId());
$rightCell .= $this->help(varset($att['help']), 'after');
$att['writeParms'] = $writeParms;

View File

@ -307,5 +307,4 @@ define("PRFLAN_282", "Session Save Method");
define("PRFLAN_283", "Display navigation-bar labels");
define("PRFLAN_284", "Collapse navigation side-bar by default");
define("PRFLAN_285", "Display field help tips");
define("PRFLAN_286", "When hovering over the field.");
define("PRFLAN_287", "When hovering on a help icon to the left of the field.");

View File

@ -455,11 +455,10 @@ e107::css('inline',"
</tr>
<tr>
<td>".LAN_TYPE."".$frm->help(FORLAN_2, 'before')."</td>
<td>".LAN_TYPE."".$frm->help(FORLAN_2)."</td>
<td>
".$frm->radio('prune_type','delete',false, array('label'=>FORLAN_89)).
$frm->radio('prune_type','make_inactive',true, array('label'=>FORLAN_90))."
".$frm->help(FORLAN_2, 'after')."
</td>
</tr>

View File

@ -567,9 +567,9 @@ class import_main_ui extends e_admin_ui
$text .= "
<tr>
<td>".LAN_CONVERT_38."".$frm->help(LAN_CONVERT_39, 'before')."</td>
<td>".LAN_CONVERT_38."".$frm->help(LAN_CONVERT_39)."</td>
<td>".$frm->radio_switch('import_delete_existing_data', $_POST['import_delete_existing_data'])."
".$frm->help(LAN_CONVERT_39, 'after')."</td>
</td>
</tr>";
//TODO

View File

@ -417,10 +417,11 @@ class social_ui extends e_admin_ui
$text2 .= "
<tr>
<td><label for='".$text_label."'>".LAN_SOCIAL_ADMIN_11." ".$var['label']." ".LAN_SOCIAL_ADMIN_12."</label>".$frm->help($help, 'before')."</td>
<td><label for='".$text_label."'>".LAN_SOCIAL_ADMIN_11." ".$var['label']." ".LAN_SOCIAL_ADMIN_12."</label>".
$frm->help($help)."</td>
<td>
".$frm->text($keypref, varset($pref['xurl'][$k]), false, $opts).
$frm->help($help, 'after')."
"
</td>
</tr>
";

View File

@ -280,32 +280,8 @@ class e_formTest extends \Codeception\Test\Unit
public function testHelp()
{
// disabled
$this->_frm->setHelpLocation('none');
$result = $this->_frm->help('my tip', 'before');
$this->assertEmpty($result);
$result = $this->_frm->help('my tip', 'after');
$this->assertEmpty($result);
// display after only.
$this->_frm->setHelpLocation('after');
$result = $this->_frm->help('my tip', 'before');
$this->assertEmpty($result);
$result = $this->_frm->help('my tip', 'after');
$this->assertSame('<div class="field-help" data-placement="left" style="display:none">my tip</div>', $result);
// display as icon before field only.
$this->_frm->setHelpLocation('before');
$result = $this->_frm->help('my tip', 'before');
$result = $this->_frm->help('my tip');
$this->assertSame('<i class="admin-ui-help-tip far fa-question-circle"><!-- --></i><div class="field-help" data-placement="left" style="display:none">my tip</div>', $result);
$result = $this->_frm->help('my tip', 'after');
$this->assertEmpty($result);
$this->_frm->setHelpLocation('after');
}
/*

View File

@ -1926,6 +1926,10 @@ div.admin-left-panel-collapsed .nav-pills > li > a > span > i { opacity: 1 }
#core-thememanager-configure .admin-css-selector .active { opacity: 1 }
#admin-ui-edit td > ol { padding-left: 1.2em; }
/* Bootstrap switch expandit in pure-css */
.bootstrap-switch-on + .e-expandit-container { max-height:500px; overflow:hidden; transition:all 1s ease-in-out; }
.bootstrap-switch-off + .e-expandit-container { max-height:0; overflow:hidden; transition: all 1s ease-in-out; }
@media (min-width: 1101px ){
.navbar-fixed-top { height: 51px; }