diff --git a/e107_admin/prefs.php b/e107_admin/prefs.php index 908a8e6aa..8e3f1b414 100644 --- a/e107_admin/prefs.php +++ b/e107_admin/prefs.php @@ -304,7 +304,7 @@ $text = " ".PRFLAN_2." - ".$frm->text('sitename', $pref['sitename'], 100)." + ".$frm->text('sitename', $pref['sitename'], 100, 'required=1')." @@ -367,14 +367,14 @@ $text .= " ".PRFLAN_6." - ".$frm->textarea('sitedescription', $pref['sitedescription'], 6, 59)." + ".$frm->textarea('sitedescription', $pref['sitedescription'], 3, 80)." ".PRFLAN_9." - ".$frm->textarea('sitedisclaimer', str_replace(array('<', '>', '"'), array('<', '>', '"'), $pref['sitedisclaimer']), 6, 59)." + ".$frm->textarea('sitedisclaimer', str_replace(array('<', '>', '"'), array('<', '>', '"'), $pref['sitedisclaimer']), 3, 80)." @@ -536,8 +536,8 @@ $text .= "
'texthtml' => LAN_MAILOUT_126, 'texttheme' => LAN_MAILOUT_127 ); - $text .= $frm->selectbox('mail_sendstyle', $emFormat,$pref['mail_sendstyle']); // $mailAdmin->sendStyleSelect(varset($pref['mail_sendstyle'], 'textonly'), 'mail_sendstyle'); - $text .= "".LAN_MAILOUT_223." + $text .= $frm->selectbox('mail_sendstyle', $emFormat,$pref['mail_sendstyle']); + $text .= " @@ -871,18 +871,19 @@ $text .= " ".PRFLAN_58." - - ".$frm->radio_switch('membersonly_enabled', $pref['membersonly_enabled'])." + "; + + $memDisp = !vartrue($pref['membersonly_enabled']) ? "e-hideme" : ""; + + $text .= $frm->radio_switch('membersonly_enabled', $pref['membersonly_enabled'],'', '', 'class=e-expandit')."
".PRFLAN_59."
- - - - ".PRFLAN_206." - - ".$frm->textarea('membersonly_exceptions', $pref['membersonly_exceptions'], 3, 1)." +
". + $frm->textarea('membersonly_exceptions', $pref['membersonly_exceptions'], 3, 1, 'placeholder='.PRFLAN_206)."
".PRFLAN_207."
+
+ ".PRFLAN_197.": @@ -908,7 +909,7 @@ $text .= " "; -// Single Login / / copied from hybridAuth config.php so it's easy to add more. +// Single/ Social Login / / copied from hybridAuth config.php so it's easy to add more. // Used Below. $social_logins = array ( @@ -1023,8 +1024,8 @@ $text .= " case 'keys': // $cls = vartrue($pref['single_login'][$prov]['keys'][$tk]) ? "class='e-hideme'" : ''; - $sty = vartrue($pref['social_login'][$prov]['keys'][vartrue($tk)]) ? "" : "display:none"; - $text .= "
"; + $sty = vartrue($pref['social_login'][$prov]['keys'][vartrue($tk)]) ? "" : "e-hideme"; + $text .= "
"; foreach($v as $tk=>$idk) { $opt['placeholder'] = $tk; @@ -1071,43 +1072,50 @@ $text .= " - + "; + + $signup_option_names = array( + // "signup_option_loginname" => "Login Name", + "signup_option_email_confirm" => "Email Confirmation", + "signup_option_realname" => CUSTSIG_2, + "signup_option_signature" => CUSTSIG_6, + "signup_option_image" => CUSTSIG_7, + "signup_option_class" => CUSTSIG_17, + 'signup_option_customtitle' => CUSTSIG_20, + 'signup_option_hideemail' => 'Option to hide email' + ); + + foreach($signup_option_names as $value => $key) + { + $text .= " + + ".$key." + + ".$frm->radio($value, 0, !$pref[$value]).$frm->label(CUSTSIG_12, $value, 0)."   + ".$frm->radio($value, 1, ($pref[$value] == 1)).$frm->label(CUSTSIG_14, $value, 1)."   + ".$frm->radio($value, 2, ($pref[$value] == 2)).$frm->label(CUSTSIG_15, $value, 2)." + + + "; + } + + + $text .= " ".PRFLAN_126." - ".$frm->textarea('signup_text', $pref['signup_text'], 3, 1)." + ".$frm->textarea('signup_text', $pref['signup_text'], 2, 1)." ".PRFLAN_140." - ".$frm->textarea('signup_text_after', $pref['signup_text_after'], 3, 1)." + ".$frm->textarea('signup_text_after', $pref['signup_text_after'], 2, 1)." - - ".CUSTSIG_16." - - ".$frm->number('signup_pass_len', $pref['signup_pass_len'], 2)." - - - - - ".CUSTSIG_18." - - ".$frm->textarea('signup_disallow_text', $pref['signup_disallow_text'], 3, 1)." -
".CUSTSIG_19."
- - - - - ".PRFLAN_155.": - -
".$e_userclass->uc_dropdown('displayname_class', $pref['displayname_class'], 'nobody,member,admin,classes', "tabindex='".$frm->getNext()."'")."
- ".$frm->admin_button('submit_resetdisplaynames', PRFLAN_156)." - - + ".PRFLAN_192.": @@ -1139,30 +1147,7 @@ $text .= " --> */ - $signup_option_names = array( - // "signup_option_loginname" => "Login Name", - "signup_option_email_confirm" => "Email Confirmation", - "signup_option_realname" => CUSTSIG_2, - "signup_option_signature" => CUSTSIG_6, - "signup_option_image" => CUSTSIG_7, - "signup_option_class" => CUSTSIG_17, - 'signup_option_customtitle' => CUSTSIG_20, - 'signup_option_hideemail' => 'Option to hide email' - ); - foreach($signup_option_names as $value => $key) - { - $text .= " - - ".$key." - - ".$frm->radio($value, 0, !$pref[$value]).$frm->label(CUSTSIG_12, $value, 0)."   - ".$frm->radio($value, 1, ($pref[$value] == 1)).$frm->label(CUSTSIG_14, $value, 1)."   - ".$frm->radio($value, 2, ($pref[$value] == 2)).$frm->label(CUSTSIG_15, $value, 2)." - - - "; - } $text .= " @@ -1197,28 +1182,56 @@ $text .= " ".$frm->radio_switch('make_clickable', $pref['make_clickable'])."
".PRFLAN_128."
- + "; + + $replaceDisp = vartrue($pref['link_replace']) ? "" : "e-hideme"; + + $text .= " ".PRFLAN_102."?: - ".$frm->radio_switch('link_replace', $pref['link_replace'])." + ".$frm->radio_switch('link_replace', $pref['link_replace'],'', '', 'expandit=1')."
".PRFLAN_103."
+
+ ".$frm->text('link_text', $pref['link_text'], 200, 'placeholder='.PRFLAN_104)." +
".PRFLAN_105."
+
- + + ".PRFLAN_145."?: ".$frm->radio_switch('links_new_window', $pref['links_new_window'])."
".PRFLAN_146."
+ + - ".PRFLAN_104.": + ".PRFLAN_40." - ".$frm->text('link_text', $pref['link_text'], 200)." -
".PRFLAN_105."
+ ".$frm->radio_switch('profanity_filter', $pref['profanity_filter'])." +
".PRFLAN_41."
+ + + ".PRFLAN_42.": + + ".$frm->text('profanity_replace', $pref['profanity_replace'], 20)." + + + + ".PRFLAN_43.": + + ".$frm->tags('profanity_words', $pref['profanity_words'])." +
".PRFLAN_44."
+ + + + + ".PRFLAN_107.": @@ -1416,6 +1429,36 @@ $text .= " ".PRFLAN_55.":
".$frm->text('cookie_name', $pref['cookie_name'], 20)." + + + + + ".CUSTSIG_18." + + ".$frm->textarea('signup_disallow_text', $pref['signup_disallow_text'], 2, 1)." +
".CUSTSIG_19."
+ + + + + ".PRFLAN_155.": + +
".$e_userclass->uc_dropdown('displayname_class', $pref['displayname_class'], 'nobody,member,admin,classes', "tabindex='".$frm->getNext()."'")."
+ ".$frm->admin_button('submit_resetdisplaynames', PRFLAN_156)." + + + + + + + ".CUSTSIG_16." + + ".$frm->number('signup_pass_len', $pref['signup_pass_len'], 2)." + + + + + ".PRFLAN_188.": @@ -1423,48 +1466,22 @@ $text .= "
".PRFLAN_191."
- + "; + + $CHAP_list = array(PRFLAN_180, PRFLAN_181, PRFLAN_182); + + $text .= " ".PRFLAN_178." - + ".$frm->selectbox('password_CHAP',$CHAP_list,$pref['password_CHAP'] )." ".$frm->select_open('password_CHAP'); -//TODO - user tracking session name - visible only if Cookie is enabled (JS) -$CHAP_list[0] = PRFLAN_180; -$CHAP_list[1] = PRFLAN_181; -$CHAP_list[2] = PRFLAN_182; + + //TODO - user tracking session name - visible only if Cookie is enabled (JS) -foreach($CHAP_list as $ab => $ab_title) -{ - $text .= " - ".$frm->option($ab_title, $ab, ($pref['password_CHAP'] == $ab))." - "; -} - -$text .= " - + $text .= "
".PRFLAN_183."
".PRFLAN_179."
- - ".PRFLAN_40." - - ".$frm->radio_switch('profanity_filter', $pref['profanity_filter'])." -
".PRFLAN_41."
- - - - - ".PRFLAN_42.": - - ".$frm->text('profanity_replace', $pref['profanity_replace'], 20)." - - - - ".PRFLAN_43.": - - ".$frm->tags('profanity_words', $pref['profanity_words'])." -
".PRFLAN_44."
- - + ".PRFLAN_35.": diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index d50cdeaee..65fcd1f1f 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -743,7 +743,15 @@ class e_form } - // autoexpand done + /** + * Textarea Element + * @param $name + * @param $value + * @param $rows + * @param $cols + * @param $options + * @param $count + */ function textarea($name, $value, $rows = 10, $cols = 80, $options = array(), $counter = false) { if(is_string($options)) parse_str($options, $options); @@ -903,12 +911,21 @@ class e_form } + /** + * @param name + * @param check_enabled + * @param label_enabled + * @param label_disabled + * @param options + */ function radio_switch($name, $checked_enabled = false, $label_enabled = '', $label_disabled = '',$options=array()) { + if(!is_array($options)) parse_str($options, $options); + $options_on = varset($options['enabled'],array()); $options_off = varset($options['disabled'],array()); - if(vartrue($options['class']) == 'e-expandit') // See admin->prefs 'Single Login' for an example. + if(vartrue($options['class']) == 'e-expandit' || vartrue($options['expandit'])) // See admin->prefs 'Single Login' for an example. { $options_on = array('class' => 'e-expandit-on'); $options_off = array('class' => 'e-expandit-off'); diff --git a/e107_web/js/core/admin.jquery.css b/e107_web/js/core/admin.jquery.css index b17a1be72..768d55f0b 100644 --- a/e107_web/js/core/admin.jquery.css +++ b/e107_web/js/core/admin.jquery.css @@ -15,5 +15,6 @@ tr.highlight-odd { background-color: silver; } legend { display: none; } .chzn-choices { width: 350px; } .e-autocomplete { display: none } +.e-expandit-container { margin-top:10px } .col-selection { padding:5px; text-align:left; background-color: #FCFDFF; border: 1px outset black; width:200px; margin-right:0px;overflow:visible; position:absolute; z-index:101; right:0px;} diff --git a/e107_web/js/core/all.jquery.js b/e107_web/js/core/all.jquery.js index 1419d630c..0a7004fd1 100644 --- a/e107_web/js/core/all.jquery.js +++ b/e107_web/js/core/all.jquery.js @@ -88,7 +88,7 @@ $(document).ready(function() if(href === "#" || href == "") { - idt = $(this).nextAll("div"); + idt = $(this).nextAll("div.e-expandit-container"); $(idt).show("slow"); return true; // must be true or radio buttons etc. won't work } @@ -113,7 +113,7 @@ $(document).ready(function() if(href === "#" || href == "") { - idt = $(this).nextAll("div"); + idt = $(this).nextAll("div.e-expandit-container"); $(idt).hide("slow"); return true; // must be true or radio buttons etc. won't work }