]> git.mxchange.org Git - friendica.git/commitdiff
Merge branch 'develop' into task/fix-scrutinizer-issues
authorHypolite Petovan <mrpetovan@gmail.com>
Fri, 5 Jan 2018 14:18:14 +0000 (09:18 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Fri, 5 Jan 2018 14:18:14 +0000 (09:18 -0500)
49 files changed:
mod/community.php
mod/settings.php
src/Object/Post.php
src/Protocol/Email.php
view/templates/settings-end.tpl [deleted file]
view/templates/settings-head.tpl [deleted file]
view/templates/settings.tpl [deleted file]
view/templates/settings/addons.tpl [new file with mode: 0644]
view/templates/settings/connectors.tpl [new file with mode: 0644]
view/templates/settings/display.tpl [new file with mode: 0644]
view/templates/settings/display_end.tpl [new file with mode: 0644]
view/templates/settings/features.tpl [new file with mode: 0644]
view/templates/settings/head.tpl [new file with mode: 0644]
view/templates/settings/nick_set.tpl [new file with mode: 0644]
view/templates/settings/oauth.tpl [new file with mode: 0644]
view/templates/settings/oauth_edit.tpl [new file with mode: 0644]
view/templates/settings/pagetypes.tpl [new file with mode: 0644]
view/templates/settings/settings.tpl [new file with mode: 0644]
view/templates/settings_addons.tpl [deleted file]
view/templates/settings_connectors.tpl [deleted file]
view/templates/settings_display.tpl [deleted file]
view/templates/settings_display_end.tpl [deleted file]
view/templates/settings_features.tpl [deleted file]
view/templates/settings_nick_set.tpl [deleted file]
view/templates/settings_nick_subdir.tpl [deleted file]
view/templates/settings_oauth.tpl [deleted file]
view/templates/settings_oauth_edit.tpl [deleted file]
view/templates/settings_pagetypes.tpl [deleted file]
view/theme/frio/templates/settings.tpl [deleted file]
view/theme/frio/templates/settings/connectors.tpl [new file with mode: 0644]
view/theme/frio/templates/settings/display.tpl [new file with mode: 0644]
view/theme/frio/templates/settings/features.tpl [new file with mode: 0644]
view/theme/frio/templates/settings/oauth.tpl [new file with mode: 0644]
view/theme/frio/templates/settings/oauth_edit.tpl [new file with mode: 0644]
view/theme/frio/templates/settings/settings.tpl [new file with mode: 0644]
view/theme/frio/templates/settings_display.tpl [deleted file]
view/theme/frio/templates/settings_features.tpl [deleted file]
view/theme/frio/templates/settings_oauth.tpl [deleted file]
view/theme/frio/templates/settings_oauth_edit.tpl [deleted file]
view/theme/frost-mobile/templates/settings-head.tpl [deleted file]
view/theme/frost-mobile/templates/settings.tpl [deleted file]
view/theme/frost-mobile/templates/settings/display_end.tpl [new file with mode: 0644]
view/theme/frost-mobile/templates/settings/head.tpl [new file with mode: 0644]
view/theme/frost-mobile/templates/settings/settings.tpl [new file with mode: 0644]
view/theme/frost-mobile/templates/settings_display_end.tpl [deleted file]
view/theme/frost/templates/settings-head.tpl [deleted file]
view/theme/frost/templates/settings/display_end.tpl [new file with mode: 0644]
view/theme/frost/templates/settings/head.tpl [new file with mode: 0644]
view/theme/frost/templates/settings_display_end.tpl [deleted file]

index 1f5f848cc0641fc706c896ca9d3c655695379abf..781f31302c2253b35c1249e2dba16c84df91f86d 100644 (file)
@@ -87,6 +87,22 @@ function community_content(App $a, $update = 0)
                $o .= replace_macros($tab_tpl, array('$tabs' => $tabs));
 
                nav_set_selected('community');
+
+               // We need the editor here to be able to reshare an item.
+               if (local_user()) {
+                       $x = array(
+                               'is_owner' => true,
+                               'allow_location' => $a->user['allow_location'],
+                               'default_location' => $a->user['default-location'],
+                               'nickname' => $a->user['nickname'],
+                               'lockstate' => (is_array($a->user) && (strlen($a->user['allow_cid']) || strlen($a->user['allow_gid']) || strlen($a->user['deny_cid']) || strlen($a->user['deny_gid'])) ? 'lock' : 'unlock'),
+                               'acl' => populate_acl($a->user, true),
+                               'bang' => '',
+                               'visitor' => 'block',
+                               'profile_uid' => local_user(),
+                       );
+                       $o .= status_editor($a, $x, 0, true);
+               }
        }
 
        if (Config::get('system', 'comment_public')) {
index 5a430e39d15b8e1643009deda7d1cca5f46199f1..10c57ff8b6e2572a2c77dcfe6bdcc21479b3e71e 100644 (file)
@@ -14,7 +14,8 @@ use Friendica\Model\Group;
 use Friendica\Model\User;
 use Friendica\Protocol\Email;
 
-function get_theme_config_file($theme) {
+function get_theme_config_file($theme)
+{
        $a = get_app();
        $base_theme = $a->theme_info['extends'];
 
@@ -27,8 +28,8 @@ function get_theme_config_file($theme) {
        return null;
 }
 
-function settings_init(App $a) {
-
+function settings_init(App $a)
+{
        if (!local_user()) {
                notice(t('Permission denied.') . EOL);
                return;
@@ -36,13 +37,11 @@ function settings_init(App $a) {
 
        // These lines provide the javascript needed by the acl selector
 
-       $tpl = get_markup_template("settings-head.tpl");
+       $tpl = get_markup_template('settings/head.tpl');
        $a->page['htmlhead'] .= replace_macros($tpl,array(
                '$ispublic' => t('everybody')
        ));
 
-
-
        $tabs = array(
                array(
                        'label' => t('Account'),
@@ -120,9 +119,8 @@ function settings_init(App $a) {
 
 }
 
-
-function settings_post(App $a) {
-
+function settings_post(App $a)
+{
        if (!local_user()) {
                return;
        }
@@ -150,20 +148,19 @@ function settings_post(App $a) {
        }
 
        if (($a->argc > 2) && ($a->argv[1] === 'oauth')  && ($a->argv[2] === 'edit'||($a->argv[2] === 'add')) && x($_POST, 'submit')) {
-
                check_form_security_token_redirectOnErr('/settings/oauth', 'settings_oauth');
 
-               $name           = ((x($_POST, 'name')) ? $_POST['name'] : '');
-               $key            = ((x($_POST, 'key')) ? $_POST['key'] : '');
-               $secret         = ((x($_POST, 'secret')) ? $_POST['secret'] : '');
-               $redirect       = ((x($_POST, 'redirect')) ? $_POST['redirect'] : '');
-               $icon           = ((x($_POST, 'icon')) ? $_POST['icon'] : '');
-               if ($name=="" || $key=="" || $secret=="") {
-                       notice(t("Missing some important data!"));
+               $name     = defaults($_POST, 'name'    , '');
+               $key      = defaults($_POST, 'key'     , '');
+               $secret   = defaults($_POST, 'secret'  , '');
+               $redirect = defaults($_POST, 'redirect', '');
+               $icon     = defaults($_POST, 'icon'    , '');
 
+               if ($name == "" || $key == "" || $secret == "") {
+                       notice(t("Missing some important data!"));
                } else {
                        if ($_POST['submit']==t("Update")) {
-                               $r = q("UPDATE clients SET
+                               q("UPDATE clients SET
                                                        client_id='%s',
                                                        pw='%s',
                                                        name='%s',
@@ -179,7 +176,7 @@ function settings_post(App $a) {
                                                local_user(),
                                                dbesc($key));
                        } else {
-                               $r = q("INSERT INTO clients
+                               q("INSERT INTO clients
                                                        (client_id, pw, name, redirect_uri, icon, uid)
                                                VALUES ('%s', '%s', '%s', '%s', '%s',%d)",
                                                dbesc($key),
@@ -342,8 +339,8 @@ function settings_post(App $a) {
 
                if ($theme == $a->user['theme']) {
                        // call theme_post only if theme has not been changed
-                       if (($themeconfigfile = get_theme_config_file($theme)) != null) {
-                               require_once($themeconfigfile);
+                       if (($themeconfigfile = get_theme_config_file($theme)) !== null) {
+                               require_once $themeconfigfile;
                                theme_post($a);
                        }
                }
@@ -395,7 +392,7 @@ function settings_post(App $a) {
                                dbesc($password),
                                intval(local_user())
                        );
-                       if ($r) {
+                       if (DBM::is_result($r)) {
                                info(t('Password changed.') . EOL);
                        } else {
                                notice(t('Password update failed. Please try again.') . EOL);
@@ -535,9 +532,8 @@ function settings_post(App $a) {
        //$openid = normalise_openid($openid);
 
        // If openid has changed or if there's an openid but no openidserver, try and discover it.
-
        if ($openid != $a->user['openid'] || (strlen($openid) && (!strlen($openidserver)))) {
-               if (strlen($tmp_str) && validate_url($openid)) {
+               if (validate_url($openid)) {
                        logger('updating openidserver');
                        require_once 'library/openid.php';
                        $open_id_obj = new LightOpenID;
@@ -608,7 +604,7 @@ function settings_post(App $a) {
                        dbesc($language),
                        intval(local_user())
        );
-       if ($r) {
+       if (DBM::is_result($r)) {
                info(t('Settings updated.') . EOL);
        }
 
@@ -650,21 +646,13 @@ function settings_post(App $a) {
        // Update the global contact for the user
        GContact::updateForUser(local_user());
 
-       //$_SESSION['theme'] = $theme;
-       if ($email_changed && $a->config['register_policy'] == REGISTER_VERIFY) {
-
-               /// @TODO set to un-verified, blocked and redirect to logout
-               /// @TODO Why? Are we verifying people or email addresses?
-
-       }
-
        goaway('settings');
        return; // NOTREACHED
 }
 
 
-function settings_content(App $a) {
-
+function settings_content(App $a)
+{
        $o = '';
        nav_set_selected('settings');
 
@@ -678,12 +666,9 @@ function settings_content(App $a) {
                return;
        }
 
-
-
        if (($a->argc > 1) && ($a->argv[1] === 'oauth')) {
-
                if (($a->argc > 2) && ($a->argv[2] === 'add')) {
-                       $tpl = get_markup_template("settings_oauth_edit.tpl");
+                       $tpl = get_markup_template('settings/oauth_edit.tpl');
                        $o .= replace_macros($tpl, array(
                                '$form_security_token' => get_form_security_token("settings_oauth"),
                                '$title'        => t('Add application'),
@@ -709,7 +694,7 @@ function settings_content(App $a) {
                        }
                        $app = $r[0];
 
-                       $tpl = get_markup_template("settings_oauth_edit.tpl");
+                       $tpl = get_markup_template('settings/oauth_edit.tpl');
                        $o .= replace_macros($tpl, array(
                                '$form_security_token' => get_form_security_token("settings_oauth"),
                                '$title'        => t('Add application'),
@@ -727,7 +712,7 @@ function settings_content(App $a) {
                if (($a->argc > 3) && ($a->argv[2] === 'delete')) {
                        check_form_security_token_redirectOnErr('/settings/oauth', 'settings_oauth', 't');
 
-                       $r = q("DELETE FROM clients WHERE client_id='%s' AND uid=%d",
+                       q("DELETE FROM clients WHERE client_id='%s' AND uid=%d",
                                        dbesc($a->argv[3]),
                                        local_user());
                        goaway(System::baseUrl(true)."/settings/oauth/");
@@ -743,7 +728,7 @@ function settings_content(App $a) {
                                local_user());
 
 
-               $tpl = get_markup_template("settings_oauth.tpl");
+               $tpl = get_markup_template('settings/oauth.tpl');
                $o .= replace_macros($tpl, array(
                        '$form_security_token' => get_form_security_token("settings_oauth"),
                        '$baseurl'      => System::baseUrl(true),
@@ -757,7 +742,6 @@ function settings_content(App $a) {
                        '$apps'         => $r,
                ));
                return $o;
-
        }
 
        if (($a->argc > 1) && ($a->argv[1] === 'addon')) {
@@ -771,7 +755,7 @@ function settings_content(App $a) {
                call_hooks('plugin_settings', $settings_addons);
 
 
-               $tpl = get_markup_template("settings_addons.tpl");
+               $tpl = get_markup_template('settings/addons.tpl');
                $o .= replace_macros($tpl, array(
                        '$form_security_token' => get_form_security_token("settings_addon"),
                        '$title'        => t('Plugin Settings'),
@@ -792,8 +776,7 @@ function settings_content(App $a) {
                        }
                }
 
-
-               $tpl = get_markup_template("settings_features.tpl");
+               $tpl = get_markup_template('settings/features.tpl');
                $o .= replace_macros($tpl, array(
                        '$form_security_token' => get_form_security_token("settings_features"),
                        '$title'               => t('Additional Features'),
@@ -804,58 +787,22 @@ function settings_content(App $a) {
        }
 
        if (($a->argc > 1) && ($a->argv[1] === 'connectors')) {
-
-               $settings_connectors = '<span id="settings_general_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_general_expanded\'); openClose(\'settings_general_inflated\');">';
-               $settings_connectors .= '<h3 class="connector">'. t('General Social Media Settings').'</h3>';
-               $settings_connectors .= '</span>';
-               $settings_connectors .= '<div id="settings_general_expanded" class="settings-block" style="display: none;">';
-               $settings_connectors .= '<span class="fakelink" onclick="openClose(\'settings_general_expanded\'); openClose(\'settings_general_inflated\');">';
-               $settings_connectors .= '<h3 class="connector">'. t('General Social Media Settings').'</h3>';
-               $settings_connectors .= '</span>';
-
-               $checked = ((PConfig::get(local_user(), 'system', 'no_intelligent_shortening')) ? ' checked="checked" ' : '');
-
-               $settings_connectors .= '<div id="no_intelligent_shortening" class="field checkbox">';
-               $settings_connectors .= '<label id="no_intelligent_shortening-label" for="shortening-checkbox">'. t('Disable intelligent shortening'). '</label>';
-               $settings_connectors .= '<input id="shortening-checkbox" type="checkbox" name="no_intelligent_shortening" value="1" ' . $checked . '/>';
-               $settings_connectors .= '<span class="field_help">'.t('Normally the system tries to find the best link to add to shortened posts. If this option is enabled then every shortened post will always point to the original friendica post.').'</span>';
-               $settings_connectors .= '</div>';
-
-               $checked = ((PConfig::get(local_user(), 'system', 'ostatus_autofriend')) ? ' checked="checked" ' : '');
-
-               $settings_connectors .= '<div id="snautofollow-wrapper" class="field checkbox">';
-               $settings_connectors .= '<label id="snautofollow-label" for="snautofollow-checkbox">'. t('Automatically follow any GNU Social (OStatus) followers/mentioners'). '</label>';
-               $settings_connectors .= '<input id="snautofollow-checkbox" type="checkbox" name="snautofollow" value="1" ' . $checked . '/>';
-               $settings_connectors .= '<span class="field_help">'.t('If you receive a message from an unknown OStatus user, this option decides what to do. If it is checked, a new contact will be created for every unknown user.').'</span>';
-               $settings_connectors .= '</div>';
-
-               $default_group = PConfig::get(local_user(), 'ostatus', 'default_group');
-               $legacy_contact = PConfig::get(local_user(), 'ostatus', 'legacy_contact');
-
-               $settings_connectors .= Group::displayGroupSelection(local_user(), $default_group, t("Default group for OStatus contacts"));
-
-               /// @TODO Found to much different usage to test empty/non-empty strings (e.g. empty(), trim() == '') which is wanted?
-               if ($legacy_contact != "") {
-                       $a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL='.System::baseUrl().'/ostatus_subscribe?url='.urlencode($legacy_contact).'">';
+               $no_intelligent_shortening = intval(PConfig::get(local_user(), 'system', 'no_intelligent_shortening'));
+               $ostatus_autofriend        = intval(PConfig::get(local_user(), 'system', 'ostatus_autofriend'));
+               $default_group             = PConfig::get(local_user(), 'ostatus', 'default_group');
+               $legacy_contact            = PConfig::get(local_user(), 'ostatus', 'legacy_contact');
+
+               if (x($legacy_contact)) {
+                       /// @todo Isn't it supposed to be a goaway() call?
+                       $a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL=' . System::baseUrl().'/ostatus_subscribe?url=' . urlencode($legacy_contact) . '">';
                }
 
-               $settings_connectors .= '<div id="legacy-contact-wrapper" class="field input">';
-               $settings_connectors .= '<label id="legacy-contact-label" for="snautofollow-checkbox">'. t('Your legacy GNU Social account'). '</label>';
-               $settings_connectors .= '<input id="legacy-contact-checkbox" name="legacy_contact" value="'.$legacy_contact.'"/>';
-               $settings_connectors .= '<span class="field_help">'.t('If you enter your old GNU Social/Statusnet account name here (in the format user@domain.tld), your contacts will be added automatically. The field will be emptied when done.').'</span>';
-               $settings_connectors .= '</div>';
-
-               $settings_connectors .= '<p><a href="'.System::baseUrl().'/repair_ostatus">'.t("Repair OStatus subscriptions").'</a></p>';
-
-               $settings_connectors .= '<div class="settings-submit-wrapper" ><input type="submit" name="general-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div>';
-
-               $settings_connectors .= '</div><div class="clear"></div>';
-
+               $settings_connectors = '';
                call_hooks('connector_settings', $settings_connectors);
 
                if (is_site_admin()) {
-                       $diasp_enabled = sprintf(t('Built-in support for %s connectivity is %s'), t('Diaspora'), ((Config::get('system', 'diaspora_enabled')) ? t('enabled') : t('disabled')));
-                       $ostat_enabled = sprintf(t('Built-in support for %s connectivity is %s'), t('GNU Social (OStatus)'), ((Config::get('system', 'ostatus_disabled')) ? t('disabled') : t('enabled')));
+                       $diasp_enabled = t('Built-in support for %s connectivity is %s', t('Diaspora'), ((Config::get('system', 'diaspora_enabled')) ? t('enabled') : t('disabled')));
+                       $ostat_enabled = t('Built-in support for %s connectivity is %s', t('GNU Social (OStatus)'), ((Config::get('system', 'ostatus_disabled')) ? t('disabled') : t('enabled')));
                } else {
                        $diasp_enabled = "";
                        $ostat_enabled = "";
@@ -884,7 +831,7 @@ function settings_content(App $a) {
                $mail_chk          = ((DBM::is_result($r)) ? $r[0]['last_check'] : NULL_DATE);
 
 
-               $tpl = get_markup_template("settings_connectors.tpl");
+               $tpl = get_markup_template('settings/connectors.tpl');
 
                $mail_disabled_message = (($mail_disabled) ? t('Email access is disabled on this site.') : '');
 
@@ -896,6 +843,17 @@ function settings_content(App $a) {
                        '$diasp_enabled' => $diasp_enabled,
                        '$ostat_enabled' => $ostat_enabled,
 
+                       '$general_settings' => t('General Social Media Settings'),
+                       '$no_intelligent_shortening' => array('no_intelligent_shortening', t('Disable intelligent shortening'), $no_intelligent_shortening, t('Normally the system tries to find the best link to add to shortened posts. If this option is enabled then every shortened post will always point to the original friendica post.')),
+                       '$ostatus_autofriend' => array('snautofollow', t('Automatically follow any GNU Social (OStatus) followers/mentioners'), $ostatus_autofriend, t('If you receive a message from an unknown OStatus user, this option decides what to do. If it is checked, a new contact will be created for every unknown user.')),
+                       '$default_group' => Group::displayGroupSelection(local_user(), $default_group, t("Default group for OStatus contacts")),
+                       '$legacy_contact' => array('legacy_contact', t('Your legacy GNU Social account'), $legacy_contact, t('If you enter your old GNU Social/Statusnet account name here (in the format user@domain.tld), your contacts will be added automatically. The field will be emptied when done.')),
+
+                       '$repair_ostatus_url' => System::baseUrl() . '/repair_ostatus',
+                       '$repair_ostatus_text' => t('Repair OStatus subscriptions'),
+
+                       '$settings_connectors' => $settings_connectors,
+
                        '$h_imap' => t('Email/Mailbox Setup'),
                        '$imap_desc' => t("If you wish to communicate with email contacts using this service \x28optional\x29, please specify how to connect to your mailbox."),
                        '$imap_lastcheck' => array('imap_lastcheck', t('Last successful email check:'), $mail_chk, ''),
@@ -910,8 +868,6 @@ function settings_content(App $a) {
                        '$mail_action'  => array('mail_action',  t('Action after import:'), $mail_action, '', array(0=>t('None'), /*1=>t('Delete'),*/ 2=>t('Mark as seen'), 3=>t('Move to folder'))),
                        '$mail_movetofolder'    => array('mail_movetofolder',    t('Move to folder:'), $mail_movetofolder, ''),
                        '$submit' => t('Save Settings'),
-
-                       '$settings_connectors' => $settings_connectors
                ));
 
                call_hooks('display_settings', $o);
@@ -927,8 +883,8 @@ function settings_content(App $a) {
                        $default_theme = 'default';
                }
                $default_mobile_theme = Config::get('system', 'mobile-theme');
-               if (!$mobile_default_theme) {
-                       $mobile_default_theme = 'none';
+               if (!$default_mobile_theme) {
+                       $default_mobile_theme = 'none';
                }
 
                $allowed_themes_str = Config::get('system', 'allowed_themes');
@@ -945,25 +901,28 @@ function settings_content(App $a) {
 
                $themes = array();
                $mobile_themes = array("---" => t('No special theme for mobile devices'));
-               $files = glob('view/theme/*'); /* */
                if ($allowed_themes) {
-                       foreach ($allowed_themes as $th) {
-                               $f = $th;
-                               $is_experimental = file_exists('view/theme/' . $th . '/experimental');
-                               $unsupported = file_exists('view/theme/' . $th . '/unsupported');
-                               $is_mobile = file_exists('view/theme/' . $th . '/mobile');
+                       foreach ($allowed_themes as $theme) {
+                               $is_experimental = file_exists('view/theme/' . $theme . '/experimental');
+                               $is_unsupported  = file_exists('view/theme/' . $theme . '/unsupported');
+                               $is_mobile       = file_exists('view/theme/' . $theme . '/mobile');
                                if (!$is_experimental || ($is_experimental && (Config::get('experimentals', 'exp_themes')==1 || is_null(Config::get('experimentals', 'exp_themes'))))) {
-                                       $theme_name = (($is_experimental) ?  sprintf("%s - \x28Experimental\x29", $f) : $f);
+                                       $theme_name = ucfirst($theme);
+                                       if ($is_unsupported) {
+                                               $theme_name = t("%s - (Unsupported)", $theme_name);
+                                       } elseif ($is_experimental) {
+                                               $theme_name = t("%s - (Experimental)", $theme_name);
+                                       }
                                        if ($is_mobile) {
-                                               $mobile_themes[$f]=$theme_name;
+                                               $mobile_themes[$theme] = $theme_name;
                                        } else {
-                                               $themes[$f]=$theme_name;
+                                               $themes[$theme] = $theme_name;
                                        }
                                }
                        }
                }
-               $theme_selected = (!x($_SESSION, 'theme')? $default_theme : $_SESSION['theme']);
-               $mobile_theme_selected = (!x($_SESSION, 'mobile-theme')? $default_mobile_theme : $_SESSION['mobile-theme']);
+               $theme_selected        = defaults($_SESSION, 'theme'       , $default_theme);
+               $mobile_theme_selected = defaults($_SESSION, 'mobile-theme', $default_mobile_theme);
 
                $nowarn_insecure = intval(PConfig::get(local_user(), 'system', 'nowarn_insecure'));
 
@@ -988,12 +947,12 @@ function settings_content(App $a) {
                $smart_threading = PConfig::get(local_user(), 'system', 'smart_threading', 0);
 
                $theme_config = "";
-               if (($themeconfigfile = get_theme_config_file($theme_selected)) != null) {
-                       require_once($themeconfigfile);
+               if (($themeconfigfile = get_theme_config_file($theme_selected)) !== null) {
+                       require_once $themeconfigfile;
                        $theme_config = theme_content($a);
                }
 
-               $tpl = get_markup_template("settings_display.tpl");
+               $tpl = get_markup_template('settings/display.tpl');
                $o = replace_macros($tpl, array(
                        '$ptitle'       => t('Display Settings'),
                        '$form_security_token' => get_form_security_token("settings_display"),
@@ -1023,7 +982,7 @@ function settings_content(App $a) {
                        '$theme_config' => $theme_config,
                ));
 
-               $tpl = get_markup_template("settings_display_end.tpl");
+               $tpl = get_markup_template('settings/display_end.tpl');
                $a->page['end'] .= replace_macros($tpl, array(
                        '$theme'        => array('theme', t('Display Theme:'), $theme_selected, '', $themes)
                ));
@@ -1038,11 +997,10 @@ function settings_content(App $a) {
 
        require_once('include/acl_selectors.php');
 
-       $p = q("SELECT * FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1",
-               intval(local_user())
-       );
-       if (count($p)) {
-               $profile = $p[0];
+       $profile = dba::select('profile', [], ['is-default' => true, 'uid' => local_user()], ['limit' => 1]);
+       if (!DBM::is_result($profile)) {
+               notice(t('Unable to find your profile. Please contact your admin.') . EOL);
+               return;
        }
 
        $username   = $a->user['username'];
@@ -1055,8 +1013,6 @@ function settings_content(App $a) {
        $openid     = $a->user['openid'];
        $maxreq     = $a->user['maxreq'];
        $expire     = ((intval($a->user['expire'])) ? $a->user['expire'] : '');
-       $blockwall  = $a->user['blockwall'];
-       $blocktags  = $a->user['blocktags'];
        $unkmail    = $a->user['unkmail'];
        $cntunkmail = $a->user['cntunkmail'];
 
@@ -1082,7 +1038,7 @@ function settings_content(App $a) {
                ($a->user['account-type'] != ACCOUNT_TYPE_COMMUNITY))
                $a->user['account-type'] = ACCOUNT_TYPE_COMMUNITY;
 
-       $pageset_tpl = get_markup_template('settings_pagetypes.tpl');
+       $pageset_tpl = get_markup_template('settings/pagetypes.tpl');
 
        $pagetype = replace_macros($pageset_tpl, array(
                '$account_types'        => t("Account Types"),
@@ -1158,52 +1114,42 @@ function settings_content(App $a) {
                $profile_in_net_dir = '';
        }
 
-       $hide_friends = replace_macros($opt_tpl,array(
-                       '$field'        => array('hide-friends', t('Hide your contact/friend list from viewers of your default profile?'), $profile['hide-friends'], '', array(t('No'), t('Yes'))),
+       $hide_friends = replace_macros($opt_tpl, array(
+               '$field' => array('hide-friends', t('Hide your contact/friend list from viewers of your default profile?'), $profile['hide-friends'], '', array(t('No'), t('Yes'))),
        ));
 
-       $hide_wall = replace_macros($opt_tpl,array(
-                       '$field'        => array('hidewall',  t('Hide your profile details from unknown viewers?'), $a->user['hidewall'], t("If enabled, posting public messages to Diaspora and other networks isn't possible."), array(t('No'), t('Yes'))),
-
+       $hide_wall = replace_macros($opt_tpl, array(
+               '$field' => array('hidewall', t('Hide your profile details from unknown viewers?'), $a->user['hidewall'], t("If enabled, posting public messages to Diaspora and other networks isn't possible."), array(t('No'), t('Yes'))),
        ));
 
-       $blockwall = replace_macros($opt_tpl,array(
-                       '$field'        => array('blockwall',  t('Allow friends to post to your profile page?'), (intval($a->user['blockwall']) ? '0' : '1'), '', array(t('No'), t('Yes'))),
-
+       $blockwall = replace_macros($opt_tpl, array(
+               '$field' => array('blockwall', t('Allow friends to post to your profile page?'), (intval($a->user['blockwall']) ? '0' : '1'), '', array(t('No'), t('Yes'))),
        ));
 
-       $blocktags = replace_macros($opt_tpl,array(
-                       '$field'        => array('blocktags',  t('Allow friends to tag your posts?'), (intval($a->user['blocktags']) ? '0' : '1'), '', array(t('No'), t('Yes'))),
-
+       $blocktags = replace_macros($opt_tpl, array(
+               '$field' => array('blocktags', t('Allow friends to tag your posts?'), (intval($a->user['blocktags']) ? '0' : '1'), '', array(t('No'), t('Yes'))),
        ));
 
-       $suggestme = replace_macros($opt_tpl,array(
-                       '$field'        => array('suggestme',  t('Allow us to suggest you as a potential friend to new members?'), $suggestme, '', array(t('No'), t('Yes'))),
-
+       $suggestme = replace_macros($opt_tpl, array(
+               '$field' => array('suggestme', t('Allow us to suggest you as a potential friend to new members?'), $suggestme, '', array(t('No'), t('Yes'))),
        ));
 
-       $unkmail = replace_macros($opt_tpl,array(
-                       '$field'        => array('unkmail',  t('Permit unknown people to send you private mail?'), $unkmail, '', array(t('No'), t('Yes'))),
-
+       $unkmail = replace_macros($opt_tpl, array(
+               '$field' => array('unkmail', t('Permit unknown people to send you private mail?'), $unkmail, '', array(t('No'), t('Yes'))),
        ));
 
-       $invisible = (((!$profile['publish']) && (!$profile['net-publish']))
-               ? true : false);
-
-       if ($invisible) {
+       if (!$profile['publish'] && !$profile['net-publish']) {
                info(t('Profile is <strong>not published</strong>.') . EOL);
        }
 
-       //$subdir = ((strlen($a->get_path())) ? '<br />' . t('or') . ' ' . 'profile/' . $nickname : '');
-
-       $tpl_addr = get_markup_template("settings_nick_set.tpl");
+       $tpl_addr = get_markup_template('settings/nick_set.tpl');
 
        $prof_addr = replace_macros($tpl_addr,array(
-               '$desc' => sprintf(t("Your Identity Address is <strong>'%s'</strong> or '%s'."), $nickname.'@'.$a->get_hostname().$a->get_path(), System::baseUrl().'/profile/'.$nickname),
+               '$desc' => t("Your Identity Address is <strong>'%s'</strong> or '%s'.", $nickname . '@' . $a->get_hostname() . $a->get_path(), System::baseUrl() . '/profile/' . $nickname),
                '$basepath' => $a->get_hostname()
        ));
 
-       $stpl = get_markup_template('settings.tpl');
+       $stpl = get_markup_template('settings/settings.tpl');
 
        $expire_arr = array(
                'days' => array('expire',  t("Automatically expire posts after this many days:"), $expire, t('If empty, posts will not expire. Expired posts will be deleted')),
index 7ffbe6e726f8236162ed671ca564331cbb949364..ebeaccb7edf5095920f787fe0c5f8de119846579 100644 (file)
@@ -155,6 +155,13 @@ class Post extends BaseObject
                        $edpost = false;
                }
 
+               // Editing on items of not subscribed users isn't currently possible
+               // There are some issues on editing that prevent this.
+               // But also it is an issue of the supported protocols that doesn't allow editing at all.
+               if ($item['uid'] == 0) {
+                       $edpost = false;
+               }
+
                if (($this->getDataValue('uid') == local_user()) || $this->isVisiting()) {
                        $dropping = true;
                }
index 77e92616cc345a32321327008e269a568194dc58..89f7808c9986e30bda4b8c074c109e16a61e537b 100644 (file)
@@ -66,8 +66,8 @@ class Email
        }
 
        /**
-        * @param array $mailacct mail account
-        * @return object
+        * @param array   $mailacct mail account
+        * @return string
         */
        public static function constructMailboxName($mailacct)
        {
diff --git a/view/templates/settings-end.tpl b/view/templates/settings-end.tpl
deleted file mode 100644 (file)
index 8b13789..0000000
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/view/templates/settings-head.tpl b/view/templates/settings-head.tpl
deleted file mode 100644 (file)
index a5558dd..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-<script>
-       var ispublic = "{{$ispublic}}";
-
-
-       $(document).ready(function() {
-
-               $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
-                       var selstr;
-                       $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
-                               selstr = $(this).text();
-                               $('#jot-perms-icon').removeClass('unlock').addClass('lock');
-                               $('#jot-public').hide();
-                       });
-                       if(selstr == null) { 
-                               $('#jot-perms-icon').removeClass('lock').addClass('unlock');
-                               $('#jot-public').show();
-                       }
-
-               }).trigger('change');
-               
-               $('.settings-content-block').hide();
-               $('.settings-heading').click(function(){
-                       $('.settings-content-block').hide();
-                       $(this).next('.settings-content-block').toggle();
-               });
-
-       });
-
-</script>
-
diff --git a/view/templates/settings.tpl b/view/templates/settings.tpl
deleted file mode 100644 (file)
index 099014f..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-<h1>{{$ptitle}}</h1>
-
-{{$nickname_block}}
-
-<form action="settings" id="settings-form" method="post" autocomplete="off" >
-<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
-
-<h3 class="settings-heading"><a href="javascript:;">{{$h_pass}}</a></h3>
-<div class="settings-content-block">
-{{include file="field_password.tpl" field=$password1}}
-{{include file="field_password.tpl" field=$password2}}
-{{include file="field_password.tpl" field=$password3}}
-
-{{if $oid_enable}}
-{{include file="field_input.tpl" field=$openid}}
-{{/if}}
-
-<div class="settings-submit-wrapper" >
-<input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
-</div>
-</div>
-
-<h3 class="settings-heading"><a href="javascript:;">{{$h_basic}}</a></h3>
-<div class="settings-content-block">
-
-{{include file="field_input.tpl" field=$username}}
-{{include file="field_input.tpl" field=$email}}
-{{include file="field_password.tpl" field=$password4}}
-{{include file="field_custom.tpl" field=$timezone}}
-{{include file="field_select.tpl" field=$language}}
-{{include file="field_input.tpl" field=$defloc}}
-{{include file="field_checkbox.tpl" field=$allowloc}}
-
-
-<div class="settings-submit-wrapper" >
-<input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
-</div>
-</div>
-
-
-<h3 class="settings-heading"><a href="javascript:;">{{$h_prv}}</a></h3>
-<div class="settings-content-block">
-
-<input type="hidden" name="visibility" value="{{$visibility}}" />
-
-{{include file="field_input.tpl" field=$maxreq}}
-
-{{$profile_in_dir}}
-
-{{$profile_in_net_dir}}
-
-{{$hide_friends}}
-
-{{$hide_wall}}
-
-{{$blockwall}}
-
-{{$blocktags}}
-
-{{$suggestme}}
-
-{{$unkmail}}
-
-
-{{include file="field_input.tpl" field=$cntunkmail}}
-
-{{include file="field_input.tpl" field=$expire.days}}
-
-
-<div class="field input">
-       <span class="field_help"><a href="#advanced-expire-popup" id="advanced-expire" class='popupbox' title="{{$expire.advanced}}">{{$expire.label}}</a></span>
-       <div style="display: none;">
-               <div id="advanced-expire-popup" style="width:auto;height:auto;overflow:auto;">
-                       <h3>{{$expire.advanced}}</h3>
-                       {{include file="field_yesno.tpl" field=$expire.items}}
-                       {{include file="field_yesno.tpl" field=$expire.notes}}
-                       {{include file="field_yesno.tpl" field=$expire.starred}}
-                       {{include file="field_yesno.tpl" field=$expire.network_only}}
-               </div>
-       </div>
-
-</div>
-
-
-<div id="settings-default-perms" class="settings-default-perms" >
-       <a href="#profile-jot-acl-wrapper" id="settings-default-perms-menu" class='popupbox'>{{$permissions}} {{$permdesc}}</a>
-       <div id="settings-default-perms-menu-end"></div>
-
-       <div id="settings-default-perms-select" style="display: none; margin-bottom: 20px" >
-
-       <div style="display: none;">
-               <div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">
-                       {{$aclselect}}
-               </div>
-       </div>
-
-       </div>
-</div>
-<br/>
-<div id="settings-default-perms-end"></div>
-
-{{$group_select}}
-
-
-<div class="settings-submit-wrapper" >
-<input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
-</div>
-</div>
-
-
-
-
-<h3 class="settings-heading"><a href="javascript:;">{{$h_not}}</a></h3>
-<div class="settings-content-block">
-<div id="settings-notifications">
-
-<div id="settings-activity-desc">{{$activity_options}}</div>
-
-{{include file="field_checkbox.tpl" field=$post_newfriend}}
-{{include file="field_checkbox.tpl" field=$post_joingroup}}
-{{include file="field_checkbox.tpl" field=$post_profilechange}}
-
-
-<div id="settings-notify-desc">{{$lbl_not}}</div>
-
-<div class="group">
-{{include file="field_intcheckbox.tpl" field=$notify1}}
-{{include file="field_intcheckbox.tpl" field=$notify2}}
-{{include file="field_intcheckbox.tpl" field=$notify3}}
-{{include file="field_intcheckbox.tpl" field=$notify4}}
-{{include file="field_intcheckbox.tpl" field=$notify5}}
-{{include file="field_intcheckbox.tpl" field=$notify6}}
-{{include file="field_intcheckbox.tpl" field=$notify7}}
-{{include file="field_intcheckbox.tpl" field=$notify8}}
-</div>
-
-{{include file="field_checkbox.tpl" field=$email_textonly}}
-{{include file="field_checkbox.tpl" field=$detailed_notif}}
-
-
-<!--
-<div class="field">
- <button onclick="javascript:Notification.requestPermission(function(perm){if(perm === 'granted')alert('{{$desktop_notifications_success_message}}');});return false;">{{$desktop_notifications}}</button>
- <span class="field_help">{{$desktop_notifications_note}}</span>
-</div>
--->
-{{include file="field_yesno.tpl" field=$desktop_notifications}}
-<script>
-(function(){
-    var elm = $("#id_{{$desktop_notifications.0}}_onoff");
-    var ckbox = $("#id_{{$desktop_notifications.0}}");
-
-    if (getNotificationPermission() === 'granted') {
-        ckbox.val(1);
-        elm.find(".off").addClass("hidden");
-        elm.find(".on").removeClass("hidden");
-    }
-       if (getNotificationPermission() === null) {
-               elm.parent(".field.yesno").hide();
-       }
-
-    $("#id_{{$desktop_notifications.0}}_onoff").on("click", function(e){
-
-        if (Notification.permission === 'granted') {
-            localStorage.setItem('notification-permissions', ckbox.val()==1 ? 'granted' : 'denied');
-        } else if (Notification.permission === 'denied') {
-            localStorage.setItem('notification-permissions', 'denied');
-
-            ckbox.val(0);
-            elm.find(".on").addClass("hidden");
-            elm.find(".off").removeClass("hidden");
-
-        } else if (Notification.permission === 'default') {
-            Notification.requestPermission(function(choice) {
-                if (choice === 'granted') {
-                    localStorage.setItem('notification-permissions', ckbox.val()==1 ? 'granted' : 'denied');
-
-                } else {
-                    localStorage.setItem('notification-permissions', 'denied');
-                    ckbox.val(0);
-                    elm.find(".on").addClass("hidden");
-                    elm.find(".off").removeClass("hidden");
-                }
-            });
-        }
-
-               //console.log(getNotificationPermission());
-
-
-    })
-})();
-</script>
-
-</div>
-
-<div class="settings-submit-wrapper" >
-<input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
-</div>
-</div>
-
-
-<h3 class="settings-heading"><a href="javascript:;">{{$h_advn}}</a></h3>
-<div class="settings-content-block">
-<div id="settings-pagetype-desc">{{$h_descadvn}}</div>
-
-{{$pagetype}}
-
-<div class="settings-submit-wrapper" >
-<input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
-</div>
-</div>
-
-<h3 class="settings-heading"><a href="javascript:;">{{$relocate}}</a></h3>
-<div class="settings-content-block">
-<div id="settings-pagetype-desc">{{$relocate_text}}</div>
-
-<div class="settings-submit-wrapper" >
-<input type="submit" name="resend_relocate" class="settings-submit" value="{{$relocate_button|escape:'html'}}" />
-</div>
-</div>
-
-
-
diff --git a/view/templates/settings/addons.tpl b/view/templates/settings/addons.tpl
new file mode 100644 (file)
index 0000000..32ec5a0
--- /dev/null
@@ -0,0 +1,11 @@
+
+<h1>{{$title}}</h1>
+
+
+<form action="settings/addon" method="post" autocomplete="off">
+<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+
+{{$settings_addons}}
+
+</form>
+
diff --git a/view/templates/settings/connectors.tpl b/view/templates/settings/connectors.tpl
new file mode 100644 (file)
index 0000000..58306fb
--- /dev/null
@@ -0,0 +1,60 @@
+
+<h1>{{$title}}</h1>
+
+<div class="connector_statusmsg">{{$diasp_enabled}}</div>
+<div class="connector_statusmsg">{{$ostat_enabled}}</div>
+
+<form action="settings/connectors" method="post" autocomplete="off">
+<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+
+<span id="settings_general_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose('settings_general_expanded'); openClose('settings_general_inflated');">
+       <h3 class="connector">{{$general_settings}}</h3>
+</span>
+<div id="settings_general_expanded" class="settings-block" style="display: none;">
+       <span class="fakelink" onclick="openClose('settings_general_expanded'); openClose('settings_general_inflated');">
+               <h3 class="connector">{{$general_settings}}</h3>
+       </span>
+
+       {{include file="field_checkbox.tpl" field=$no_intelligent_shortening}}
+       {{include file="field_checkbox.tpl" field=$ostatus_autofriend}}
+       {{$default_group}}
+       {{include file="field_input.tpl" field=$legacy_contact}}
+
+       <p><a href="{{$repair_ostatus_url}}">{{$repair_ostatus_text}}</a></p>
+
+       <div class="settings-submit-wrapper" ><input type="submit" name="general-submit" class="settings-submit" value="{{$submit}}" /></div>
+</div>
+<div class="clear"></div>
+
+{{$settings_connectors}}
+
+{{if $mail_disabled}}
+
+{{else}}
+       <span id="settings_mail_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose('settings_mail_expanded'); openClose('settings_mail_inflated');">
+               <img class="connector" src="images/mail.png" /><h3 class="settings-heading connector">{{$h_imap}}</h3>
+       </span>
+       <div id="settings_mail_expanded" class="settings-block" style="display: none;">
+       <span class="fakelink" onclick="openClose('settings_mail_expanded'); openClose('settings_mail_inflated');">
+               <img class="connector" src="images/mail.png" /><h3 class="settings-heading connector">{{$h_imap}}</h3>
+       </span>
+       <p>{{$imap_desc}}</p>
+       {{include file="field_custom.tpl" field=$imap_lastcheck}}
+       {{include file="field_input.tpl" field=$mail_server}}
+       {{include file="field_input.tpl" field=$mail_port}}
+       {{include file="field_select.tpl" field=$mail_ssl}}
+       {{include file="field_input.tpl" field=$mail_user}}
+       {{include file="field_password.tpl" field=$mail_pass}}
+       {{include file="field_input.tpl" field=$mail_replyto}}
+       {{include file="field_checkbox.tpl" field=$mail_pubmail}}
+       {{include file="field_select.tpl" field=$mail_action}}
+       {{include file="field_input.tpl" field=$mail_movetofolder}}
+
+       <div class="settings-submit-wrapper" >
+               <input type="submit" id="imap-submit" name="imap-submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
+       </div>
+       </div>
+{{/if}}
+
+</form>
+
diff --git a/view/templates/settings/display.tpl b/view/templates/settings/display.tpl
new file mode 100644 (file)
index 0000000..ff3e4fb
--- /dev/null
@@ -0,0 +1,37 @@
+
+<h1>{{$ptitle}}</h1>
+
+<form action="settings/display" id="settings-form" method="post" autocomplete="off" >
+<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+
+{{include file="field_themeselect.tpl" field=$theme}}
+{{include file="field_input.tpl" field=$itemspage_network}}
+
+{{* Show the mobile theme selection only if mobile themes are available *}}
+{{if count($mobile_theme.4) > 1}}
+{{include file="field_themeselect.tpl" field=$mobile_theme}}
+{{/if}}
+
+{{include file="field_input.tpl" field=$itemspage_mobile_network}}
+{{include file="field_input.tpl" field=$ajaxint}}
+{{include file="field_checkbox.tpl" field=$nowarn_insecure}}
+{{include file="field_checkbox.tpl" field=$no_auto_update}}
+{{include file="field_checkbox.tpl" field=$nosmile}}
+{{include file="field_checkbox.tpl" field=$noinfo}}
+{{include file="field_checkbox.tpl" field=$infinite_scroll}}
+{{include file="field_checkbox.tpl" field=$bandwidth_saver}}
+{{include file="field_checkbox.tpl" field=$smart_threading}}
+<h2>{{$calendar_title}}</h2>
+{{include file="field_select.tpl" field=$first_day_of_week}}
+
+
+<div class="settings-submit-wrapper" >
+<input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
+</div>
+
+{{if $theme_config}}
+<h2>{{$stitle}}</h2>
+{{$theme_config}}
+{{/if}}
+
+</form>
diff --git a/view/templates/settings/display_end.tpl b/view/templates/settings/display_end.tpl
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/view/templates/settings/features.tpl b/view/templates/settings/features.tpl
new file mode 100644 (file)
index 0000000..eb3f67f
--- /dev/null
@@ -0,0 +1,22 @@
+
+<h1>{{$title}}</h1>
+
+
+<form action="settings/features" method="post" autocomplete="off">
+<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+
+{{foreach $features as $f}}
+<h3 class="settings-heading"><a href="javascript:;">{{$f.0}}</a></h3>
+<div class="settings-content-block">
+
+{{foreach $f.1 as $fcat}}
+       {{include file="field_yesno.tpl" field=$fcat}}
+{{/foreach}}
+<div class="settings-submit-wrapper" >
+<input type="submit" name="submit" class="settings-features-submit" value="{{$submit|escape:'html'}}" />
+</div>
+</div>
+{{/foreach}}
+
+</form>
+
diff --git a/view/templates/settings/head.tpl b/view/templates/settings/head.tpl
new file mode 100644 (file)
index 0000000..a5558dd
--- /dev/null
@@ -0,0 +1,32 @@
+
+
+<script>
+       var ispublic = "{{$ispublic}}";
+
+
+       $(document).ready(function() {
+
+               $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
+                       var selstr;
+                       $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
+                               selstr = $(this).text();
+                               $('#jot-perms-icon').removeClass('unlock').addClass('lock');
+                               $('#jot-public').hide();
+                       });
+                       if(selstr == null) { 
+                               $('#jot-perms-icon').removeClass('lock').addClass('unlock');
+                               $('#jot-public').show();
+                       }
+
+               }).trigger('change');
+               
+               $('.settings-content-block').hide();
+               $('.settings-heading').click(function(){
+                       $('.settings-content-block').hide();
+                       $(this).next('.settings-content-block').toggle();
+               });
+
+       });
+
+</script>
+
diff --git a/view/templates/settings/nick_set.tpl b/view/templates/settings/nick_set.tpl
new file mode 100644 (file)
index 0000000..8decc2d
--- /dev/null
@@ -0,0 +1,6 @@
+
+
+<div id="settings-nick-wrapper" >
+<div id="settings-nickname-desc" class="info-message">{{$desc}}</div>
+</div>
+<div id="settings-nick-end" ></div>
diff --git a/view/templates/settings/oauth.tpl b/view/templates/settings/oauth.tpl
new file mode 100644 (file)
index 0000000..164930e
--- /dev/null
@@ -0,0 +1,32 @@
+
+<h1>{{$title}}</h1>
+
+
+<form action="settings/oauth" method="post" autocomplete="off">
+<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+
+       <div id="profile-edit-links">
+               <ul>
+                       <li>
+                               <a id="profile-edit-view-link" href="{{$baseurl}}/settings/oauth/add">{{$add}}</a>
+                       </li>
+               </ul>
+       </div>
+
+       {{foreach $apps as $app}}
+       <div class='oauthapp'>
+               <img src='{{$app.icon}}' class="{{if $app.icon}} {{else}}noicon{{/if}}">
+               {{if $app.name}}<h4>{{$app.name}}</h4>{{else}}<h4>{{$noname}}</h4>{{/if}}
+               {{if $app.my}}
+                       {{if $app.oauth_token}}
+                       <div class="settings-submit-wrapper" ><button class="settings-submit"  type="submit" name="remove" value="{{$app.oauth_token}}">{{$remove}}</button></div>
+                       {{/if}}
+               {{/if}}
+               {{if $app.my}}
+               <a href="{{$baseurl}}/settings/oauth/edit/{{$app.client_id}}" class="icon s22 edit" title="{{$edit|escape:'html'}}">&nbsp;</a>
+               <a href="{{$baseurl}}/settings/oauth/delete/{{$app.client_id}}?t={{$form_security_token}}" class="icon s22 delete" title="{{$delete|escape:'html'}}">&nbsp;</a>
+               {{/if}}         
+       </div>
+       {{/foreach}}
+
+</form>
diff --git a/view/templates/settings/oauth_edit.tpl b/view/templates/settings/oauth_edit.tpl
new file mode 100644 (file)
index 0000000..9019981
--- /dev/null
@@ -0,0 +1,18 @@
+
+<h1>{{$title}}</h1>
+
+<form method="POST">
+<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+
+{{include file="field_input.tpl" field=$name}}
+{{include file="field_input.tpl" field=$key}}
+{{include file="field_input.tpl" field=$secret}}
+{{include file="field_input.tpl" field=$redirect}}
+{{include file="field_input.tpl" field=$icon}}
+
+<div class="settings-submit-wrapper" >
+<input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
+<!-- <input type="submit" name="cancel" class="settings-submit" value="{{$cancel}}" /> -->
+</div>
+
+</form>
diff --git a/view/templates/settings/pagetypes.tpl b/view/templates/settings/pagetypes.tpl
new file mode 100644 (file)
index 0000000..1c2f96e
--- /dev/null
@@ -0,0 +1,71 @@
+
+<h4>{{$account_types}}</h4>
+{{include file="field_radio.tpl" field=$account_person}}
+<div id="account-type-sub-0" class="pageflags">
+       <h5>{{$user}}</h5>
+       {{include file="field_radio.tpl" field=$page_normal}}
+       {{include file="field_radio.tpl" field=$page_soapbox}}
+       {{include file="field_radio.tpl" field=$page_freelove}}
+</div>
+
+{{include file="field_radio.tpl" field=$account_organisation}}
+{{include file="field_radio.tpl" field=$account_news}}
+
+{{include file="field_radio.tpl" field=$account_community}}
+<div id="account-type-sub-3" class="pageflags">
+       <h5>{{$community}}</h5>
+       {{include file="field_radio.tpl" field=$page_community}}
+       {{include file="field_radio.tpl" field=$page_prvgroup}}
+</div>
+
+<script language="javascript" type="text/javascript">
+       // This js part changes the state of page-flags radio buttons according
+       // to the selected account type. For a translation of the different
+       // account-types and page-flags have a look in the define section in boot.php
+       var accountType = {{$account_type}};
+
+       $(document).ready(function(){
+               // Hide all DIV for page-flags expet the one which belongs to the present
+               // account-type
+               showPageFlags(accountType);
+
+               // Save the ID of the active page-flage
+               var activeFlag = $('[id^=id_page-flags_]:checked');
+
+               $("[id^=id_account-type_]").change(function(){
+                       // Since the ID of the radio buttons containing the type of
+                       // the account-type we catch the last character of the ID to
+                       // know for what account-type the radio button stands for.
+                       var type = this.id.substr(this.id.length - 1);
+
+                       // Hide all DIV with page-flags and show only the one which belongs
+                       // to the selected radio button
+                       showPageFlags(type);
+
+                       // Uncheck all page-flags radio buttons
+                       $('input:radio[name="page-flags"]').prop("checked", false);
+
+                       // If the selected account type is the active one mark the page-flag
+                       // radio button as checked which is already by database state
+                       if (accountType == type) {
+                               $(activeFlag).prop("checked", true);
+                       } else if (type == 1 || type == 2) {
+                               // For account-type 1 or 2 the page-flags are always set to 1
+                               $('#id_page-flags_1').prop("checked", true);
+                       } else {
+                               // Mark the first available page-flags radio button of the selected
+                               // account-type as checked
+                               $('#account-type-sub-' + type + ' input:radio[name="page-flags"]').first().prop("checked", true);
+                       }
+               });
+       });
+
+       // Show/Hide the page-flags according to the selected account-type
+       function showPageFlags(type) {
+               $(".pageflags").hide();
+
+               if (type == 0 || type == 3) {
+                       $("#account-type-sub-" + type).show();
+               }
+       }
+</script>
diff --git a/view/templates/settings/settings.tpl b/view/templates/settings/settings.tpl
new file mode 100644 (file)
index 0000000..099014f
--- /dev/null
@@ -0,0 +1,223 @@
+<h1>{{$ptitle}}</h1>
+
+{{$nickname_block}}
+
+<form action="settings" id="settings-form" method="post" autocomplete="off" >
+<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+
+<h3 class="settings-heading"><a href="javascript:;">{{$h_pass}}</a></h3>
+<div class="settings-content-block">
+{{include file="field_password.tpl" field=$password1}}
+{{include file="field_password.tpl" field=$password2}}
+{{include file="field_password.tpl" field=$password3}}
+
+{{if $oid_enable}}
+{{include file="field_input.tpl" field=$openid}}
+{{/if}}
+
+<div class="settings-submit-wrapper" >
+<input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
+</div>
+</div>
+
+<h3 class="settings-heading"><a href="javascript:;">{{$h_basic}}</a></h3>
+<div class="settings-content-block">
+
+{{include file="field_input.tpl" field=$username}}
+{{include file="field_input.tpl" field=$email}}
+{{include file="field_password.tpl" field=$password4}}
+{{include file="field_custom.tpl" field=$timezone}}
+{{include file="field_select.tpl" field=$language}}
+{{include file="field_input.tpl" field=$defloc}}
+{{include file="field_checkbox.tpl" field=$allowloc}}
+
+
+<div class="settings-submit-wrapper" >
+<input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
+</div>
+</div>
+
+
+<h3 class="settings-heading"><a href="javascript:;">{{$h_prv}}</a></h3>
+<div class="settings-content-block">
+
+<input type="hidden" name="visibility" value="{{$visibility}}" />
+
+{{include file="field_input.tpl" field=$maxreq}}
+
+{{$profile_in_dir}}
+
+{{$profile_in_net_dir}}
+
+{{$hide_friends}}
+
+{{$hide_wall}}
+
+{{$blockwall}}
+
+{{$blocktags}}
+
+{{$suggestme}}
+
+{{$unkmail}}
+
+
+{{include file="field_input.tpl" field=$cntunkmail}}
+
+{{include file="field_input.tpl" field=$expire.days}}
+
+
+<div class="field input">
+       <span class="field_help"><a href="#advanced-expire-popup" id="advanced-expire" class='popupbox' title="{{$expire.advanced}}">{{$expire.label}}</a></span>
+       <div style="display: none;">
+               <div id="advanced-expire-popup" style="width:auto;height:auto;overflow:auto;">
+                       <h3>{{$expire.advanced}}</h3>
+                       {{include file="field_yesno.tpl" field=$expire.items}}
+                       {{include file="field_yesno.tpl" field=$expire.notes}}
+                       {{include file="field_yesno.tpl" field=$expire.starred}}
+                       {{include file="field_yesno.tpl" field=$expire.network_only}}
+               </div>
+       </div>
+
+</div>
+
+
+<div id="settings-default-perms" class="settings-default-perms" >
+       <a href="#profile-jot-acl-wrapper" id="settings-default-perms-menu" class='popupbox'>{{$permissions}} {{$permdesc}}</a>
+       <div id="settings-default-perms-menu-end"></div>
+
+       <div id="settings-default-perms-select" style="display: none; margin-bottom: 20px" >
+
+       <div style="display: none;">
+               <div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">
+                       {{$aclselect}}
+               </div>
+       </div>
+
+       </div>
+</div>
+<br/>
+<div id="settings-default-perms-end"></div>
+
+{{$group_select}}
+
+
+<div class="settings-submit-wrapper" >
+<input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
+</div>
+</div>
+
+
+
+
+<h3 class="settings-heading"><a href="javascript:;">{{$h_not}}</a></h3>
+<div class="settings-content-block">
+<div id="settings-notifications">
+
+<div id="settings-activity-desc">{{$activity_options}}</div>
+
+{{include file="field_checkbox.tpl" field=$post_newfriend}}
+{{include file="field_checkbox.tpl" field=$post_joingroup}}
+{{include file="field_checkbox.tpl" field=$post_profilechange}}
+
+
+<div id="settings-notify-desc">{{$lbl_not}}</div>
+
+<div class="group">
+{{include file="field_intcheckbox.tpl" field=$notify1}}
+{{include file="field_intcheckbox.tpl" field=$notify2}}
+{{include file="field_intcheckbox.tpl" field=$notify3}}
+{{include file="field_intcheckbox.tpl" field=$notify4}}
+{{include file="field_intcheckbox.tpl" field=$notify5}}
+{{include file="field_intcheckbox.tpl" field=$notify6}}
+{{include file="field_intcheckbox.tpl" field=$notify7}}
+{{include file="field_intcheckbox.tpl" field=$notify8}}
+</div>
+
+{{include file="field_checkbox.tpl" field=$email_textonly}}
+{{include file="field_checkbox.tpl" field=$detailed_notif}}
+
+
+<!--
+<div class="field">
+ <button onclick="javascript:Notification.requestPermission(function(perm){if(perm === 'granted')alert('{{$desktop_notifications_success_message}}');});return false;">{{$desktop_notifications}}</button>
+ <span class="field_help">{{$desktop_notifications_note}}</span>
+</div>
+-->
+{{include file="field_yesno.tpl" field=$desktop_notifications}}
+<script>
+(function(){
+    var elm = $("#id_{{$desktop_notifications.0}}_onoff");
+    var ckbox = $("#id_{{$desktop_notifications.0}}");
+
+    if (getNotificationPermission() === 'granted') {
+        ckbox.val(1);
+        elm.find(".off").addClass("hidden");
+        elm.find(".on").removeClass("hidden");
+    }
+       if (getNotificationPermission() === null) {
+               elm.parent(".field.yesno").hide();
+       }
+
+    $("#id_{{$desktop_notifications.0}}_onoff").on("click", function(e){
+
+        if (Notification.permission === 'granted') {
+            localStorage.setItem('notification-permissions', ckbox.val()==1 ? 'granted' : 'denied');
+        } else if (Notification.permission === 'denied') {
+            localStorage.setItem('notification-permissions', 'denied');
+
+            ckbox.val(0);
+            elm.find(".on").addClass("hidden");
+            elm.find(".off").removeClass("hidden");
+
+        } else if (Notification.permission === 'default') {
+            Notification.requestPermission(function(choice) {
+                if (choice === 'granted') {
+                    localStorage.setItem('notification-permissions', ckbox.val()==1 ? 'granted' : 'denied');
+
+                } else {
+                    localStorage.setItem('notification-permissions', 'denied');
+                    ckbox.val(0);
+                    elm.find(".on").addClass("hidden");
+                    elm.find(".off").removeClass("hidden");
+                }
+            });
+        }
+
+               //console.log(getNotificationPermission());
+
+
+    })
+})();
+</script>
+
+</div>
+
+<div class="settings-submit-wrapper" >
+<input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
+</div>
+</div>
+
+
+<h3 class="settings-heading"><a href="javascript:;">{{$h_advn}}</a></h3>
+<div class="settings-content-block">
+<div id="settings-pagetype-desc">{{$h_descadvn}}</div>
+
+{{$pagetype}}
+
+<div class="settings-submit-wrapper" >
+<input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
+</div>
+</div>
+
+<h3 class="settings-heading"><a href="javascript:;">{{$relocate}}</a></h3>
+<div class="settings-content-block">
+<div id="settings-pagetype-desc">{{$relocate_text}}</div>
+
+<div class="settings-submit-wrapper" >
+<input type="submit" name="resend_relocate" class="settings-submit" value="{{$relocate_button|escape:'html'}}" />
+</div>
+</div>
+
+
+
diff --git a/view/templates/settings_addons.tpl b/view/templates/settings_addons.tpl
deleted file mode 100644 (file)
index 32ec5a0..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-
-<h1>{{$title}}</h1>
-
-
-<form action="settings/addon" method="post" autocomplete="off">
-<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
-
-{{$settings_addons}}
-
-</form>
-
diff --git a/view/templates/settings_connectors.tpl b/view/templates/settings_connectors.tpl
deleted file mode 100644 (file)
index bdb928f..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-
-<h1>{{$title}}</h1>
-
-<div class="connector_statusmsg">{{$diasp_enabled}}</div>
-<div class="connector_statusmsg">{{$ostat_enabled}}</div>
-
-<form action="settings/connectors" method="post" autocomplete="off">
-<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
-
-{{$settings_connectors}}
-
-{{if $mail_disabled}}
-
-{{else}}
-       <span id="settings_mail_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose('settings_mail_expanded'); openClose('settings_mail_inflated');">
-               <img class="connector" src="images/mail.png" /><h3 class="settings-heading connector">{{$h_imap}}</h3>
-       </span>
-       <div id="settings_mail_expanded" class="settings-block" style="display: none;">
-       <span class="fakelink" onclick="openClose('settings_mail_expanded'); openClose('settings_mail_inflated');">
-               <img class="connector" src="images/mail.png" /><h3 class="settings-heading connector">{{$h_imap}}</h3>
-       </span>
-       <p>{{$imap_desc}}</p>
-       {{include file="field_custom.tpl" field=$imap_lastcheck}}
-       {{include file="field_input.tpl" field=$mail_server}}
-       {{include file="field_input.tpl" field=$mail_port}}
-       {{include file="field_select.tpl" field=$mail_ssl}}
-       {{include file="field_input.tpl" field=$mail_user}}
-       {{include file="field_password.tpl" field=$mail_pass}}
-       {{include file="field_input.tpl" field=$mail_replyto}}
-       {{include file="field_checkbox.tpl" field=$mail_pubmail}}
-       {{include file="field_select.tpl" field=$mail_action}}
-       {{include file="field_input.tpl" field=$mail_movetofolder}}
-
-       <div class="settings-submit-wrapper" >
-               <input type="submit" id="imap-submit" name="imap-submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
-       </div>
-       </div>
-{{/if}}
-
-</form>
-
diff --git a/view/templates/settings_display.tpl b/view/templates/settings_display.tpl
deleted file mode 100644 (file)
index ff3e4fb..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-
-<h1>{{$ptitle}}</h1>
-
-<form action="settings/display" id="settings-form" method="post" autocomplete="off" >
-<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
-
-{{include file="field_themeselect.tpl" field=$theme}}
-{{include file="field_input.tpl" field=$itemspage_network}}
-
-{{* Show the mobile theme selection only if mobile themes are available *}}
-{{if count($mobile_theme.4) > 1}}
-{{include file="field_themeselect.tpl" field=$mobile_theme}}
-{{/if}}
-
-{{include file="field_input.tpl" field=$itemspage_mobile_network}}
-{{include file="field_input.tpl" field=$ajaxint}}
-{{include file="field_checkbox.tpl" field=$nowarn_insecure}}
-{{include file="field_checkbox.tpl" field=$no_auto_update}}
-{{include file="field_checkbox.tpl" field=$nosmile}}
-{{include file="field_checkbox.tpl" field=$noinfo}}
-{{include file="field_checkbox.tpl" field=$infinite_scroll}}
-{{include file="field_checkbox.tpl" field=$bandwidth_saver}}
-{{include file="field_checkbox.tpl" field=$smart_threading}}
-<h2>{{$calendar_title}}</h2>
-{{include file="field_select.tpl" field=$first_day_of_week}}
-
-
-<div class="settings-submit-wrapper" >
-<input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
-</div>
-
-{{if $theme_config}}
-<h2>{{$stitle}}</h2>
-{{$theme_config}}
-{{/if}}
-
-</form>
diff --git a/view/templates/settings_display_end.tpl b/view/templates/settings_display_end.tpl
deleted file mode 100644 (file)
index 8b13789..0000000
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/view/templates/settings_features.tpl b/view/templates/settings_features.tpl
deleted file mode 100644 (file)
index eb3f67f..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-
-<h1>{{$title}}</h1>
-
-
-<form action="settings/features" method="post" autocomplete="off">
-<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
-
-{{foreach $features as $f}}
-<h3 class="settings-heading"><a href="javascript:;">{{$f.0}}</a></h3>
-<div class="settings-content-block">
-
-{{foreach $f.1 as $fcat}}
-       {{include file="field_yesno.tpl" field=$fcat}}
-{{/foreach}}
-<div class="settings-submit-wrapper" >
-<input type="submit" name="submit" class="settings-features-submit" value="{{$submit|escape:'html'}}" />
-</div>
-</div>
-{{/foreach}}
-
-</form>
-
diff --git a/view/templates/settings_nick_set.tpl b/view/templates/settings_nick_set.tpl
deleted file mode 100644 (file)
index 8decc2d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-<div id="settings-nick-wrapper" >
-<div id="settings-nickname-desc" class="info-message">{{$desc}}</div>
-</div>
-<div id="settings-nick-end" ></div>
diff --git a/view/templates/settings_nick_subdir.tpl b/view/templates/settings_nick_subdir.tpl
deleted file mode 100644 (file)
index 49fad53..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-
-<p>
-It appears that your website is located in a subdirectory of the<br />
-{{$hostname}} website, so this setting may not work reliably.<br />
-</p>
-<p>If you have any issues, you may have better results using the profile<br /> address '<strong>{{$baseurl}}/profile/{{$nickname}}</strong>'.
-</p>
\ No newline at end of file
diff --git a/view/templates/settings_oauth.tpl b/view/templates/settings_oauth.tpl
deleted file mode 100644 (file)
index 164930e..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-
-<h1>{{$title}}</h1>
-
-
-<form action="settings/oauth" method="post" autocomplete="off">
-<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
-
-       <div id="profile-edit-links">
-               <ul>
-                       <li>
-                               <a id="profile-edit-view-link" href="{{$baseurl}}/settings/oauth/add">{{$add}}</a>
-                       </li>
-               </ul>
-       </div>
-
-       {{foreach $apps as $app}}
-       <div class='oauthapp'>
-               <img src='{{$app.icon}}' class="{{if $app.icon}} {{else}}noicon{{/if}}">
-               {{if $app.name}}<h4>{{$app.name}}</h4>{{else}}<h4>{{$noname}}</h4>{{/if}}
-               {{if $app.my}}
-                       {{if $app.oauth_token}}
-                       <div class="settings-submit-wrapper" ><button class="settings-submit"  type="submit" name="remove" value="{{$app.oauth_token}}">{{$remove}}</button></div>
-                       {{/if}}
-               {{/if}}
-               {{if $app.my}}
-               <a href="{{$baseurl}}/settings/oauth/edit/{{$app.client_id}}" class="icon s22 edit" title="{{$edit|escape:'html'}}">&nbsp;</a>
-               <a href="{{$baseurl}}/settings/oauth/delete/{{$app.client_id}}?t={{$form_security_token}}" class="icon s22 delete" title="{{$delete|escape:'html'}}">&nbsp;</a>
-               {{/if}}         
-       </div>
-       {{/foreach}}
-
-</form>
diff --git a/view/templates/settings_oauth_edit.tpl b/view/templates/settings_oauth_edit.tpl
deleted file mode 100644 (file)
index 9019981..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-
-<h1>{{$title}}</h1>
-
-<form method="POST">
-<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
-
-{{include file="field_input.tpl" field=$name}}
-{{include file="field_input.tpl" field=$key}}
-{{include file="field_input.tpl" field=$secret}}
-{{include file="field_input.tpl" field=$redirect}}
-{{include file="field_input.tpl" field=$icon}}
-
-<div class="settings-submit-wrapper" >
-<input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
-<!-- <input type="submit" name="cancel" class="settings-submit" value="{{$cancel}}" /> -->
-</div>
-
-</form>
diff --git a/view/templates/settings_pagetypes.tpl b/view/templates/settings_pagetypes.tpl
deleted file mode 100644 (file)
index 1c2f96e..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-
-<h4>{{$account_types}}</h4>
-{{include file="field_radio.tpl" field=$account_person}}
-<div id="account-type-sub-0" class="pageflags">
-       <h5>{{$user}}</h5>
-       {{include file="field_radio.tpl" field=$page_normal}}
-       {{include file="field_radio.tpl" field=$page_soapbox}}
-       {{include file="field_radio.tpl" field=$page_freelove}}
-</div>
-
-{{include file="field_radio.tpl" field=$account_organisation}}
-{{include file="field_radio.tpl" field=$account_news}}
-
-{{include file="field_radio.tpl" field=$account_community}}
-<div id="account-type-sub-3" class="pageflags">
-       <h5>{{$community}}</h5>
-       {{include file="field_radio.tpl" field=$page_community}}
-       {{include file="field_radio.tpl" field=$page_prvgroup}}
-</div>
-
-<script language="javascript" type="text/javascript">
-       // This js part changes the state of page-flags radio buttons according
-       // to the selected account type. For a translation of the different
-       // account-types and page-flags have a look in the define section in boot.php
-       var accountType = {{$account_type}};
-
-       $(document).ready(function(){
-               // Hide all DIV for page-flags expet the one which belongs to the present
-               // account-type
-               showPageFlags(accountType);
-
-               // Save the ID of the active page-flage
-               var activeFlag = $('[id^=id_page-flags_]:checked');
-
-               $("[id^=id_account-type_]").change(function(){
-                       // Since the ID of the radio buttons containing the type of
-                       // the account-type we catch the last character of the ID to
-                       // know for what account-type the radio button stands for.
-                       var type = this.id.substr(this.id.length - 1);
-
-                       // Hide all DIV with page-flags and show only the one which belongs
-                       // to the selected radio button
-                       showPageFlags(type);
-
-                       // Uncheck all page-flags radio buttons
-                       $('input:radio[name="page-flags"]').prop("checked", false);
-
-                       // If the selected account type is the active one mark the page-flag
-                       // radio button as checked which is already by database state
-                       if (accountType == type) {
-                               $(activeFlag).prop("checked", true);
-                       } else if (type == 1 || type == 2) {
-                               // For account-type 1 or 2 the page-flags are always set to 1
-                               $('#id_page-flags_1').prop("checked", true);
-                       } else {
-                               // Mark the first available page-flags radio button of the selected
-                               // account-type as checked
-                               $('#account-type-sub-' + type + ' input:radio[name="page-flags"]').first().prop("checked", true);
-                       }
-               });
-       });
-
-       // Show/Hide the page-flags according to the selected account-type
-       function showPageFlags(type) {
-               $(".pageflags").hide();
-
-               if (type == 0 || type == 3) {
-                       $("#account-type-sub-" + type).show();
-               }
-       }
-</script>
diff --git a/view/theme/frio/templates/settings.tpl b/view/theme/frio/templates/settings.tpl
deleted file mode 100644 (file)
index f197eb5..0000000
+++ /dev/null
@@ -1,308 +0,0 @@
-<div class="generic-page-wrapper">
-       {{* include the title template for the settings title *}}
-       {{include file="section_title.tpl" title=$ptitle }}
-
-       {{$nickname_block}}
-
-       <form action="settings" id="settings-form" method="post" autocomplete="off" >
-               <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
-
-               {{* We organize the settings in collapsable panel-groups *}}
-               <div class="panel-group panel-group-settings" id="settings" role="tablist" aria-multiselectable="true">
-                       {{* The password setting section *}}
-                       <div class="panel">
-                               <div class="section-subtitle-wrapper" role="tab" id="password-settings">
-                                       <h4>
-                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#password-settings-collapse" aria-expanded="false" aria-controls="password-settings-collapse">
-                                                       {{$h_pass}}
-                                               </a>
-                                       </h4>
-                               </div>
-                               <div id="password-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="password-settings">
-                                       <div class="section-content-tools-wrapper">
-                                               {{include file="field_password.tpl" field=$password1}}
-                                               {{include file="field_password.tpl" field=$password2}}
-                                               {{include file="field_password.tpl" field=$password3}}
-
-                                               {{if $oid_enable}}
-                                               {{include file="field_input.tpl" field=$openid}}
-                                               {{/if}}
-
-                                               <div class="form-group pull-right settings-submit-wrapper" >
-                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
-                                               </div>
-                                               <div class="clear"></div>
-                                       </div>
-                               </div>
-                       </div>
-
-                       {{* The basic setting section *}}
-                       <div class="panel">
-                               <div class="section-subtitle-wrapper" role="tab" id="basic-settings">
-                                       <h4>
-                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#basic-settings-collapse" aria-expanded="false" aria-controls="basic-settings-collapse">
-                                                       {{$h_basic}}
-                                               </a>
-                                       </h4>
-                               </div>
-                               <div id="basic-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="basic-settings">
-                                       <div class="section-content-tools-wrapper">
-
-                                               {{include file="field_input.tpl" field=$username}}
-                                               {{include file="field_input.tpl" field=$email}}
-                                               {{include file="field_password.tpl" field=$password4}}
-                                               {{include file="field_custom.tpl" field=$timezone}}
-                                               {{include file="field_select.tpl" field=$language}}
-                                               {{include file="field_input.tpl" field=$defloc}}
-                                               {{include file="field_checkbox.tpl" field=$allowloc}}
-
-                                               <div class="form-group pull-right settings-submit-wrapper" >
-                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
-                                               </div>
-                                               <div class="clear"></div>
-                                       </div>
-                               </div>
-                       </div>
-
-                       {{* The privacity setting section *}}
-                       <div class="panel">
-                               <div class="section-subtitle-wrapper" role="tab" id="privacy-settings">
-                                       <h4>
-                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#privacy-settings-collapse" aria-expanded="false" aria-controls="privacy-settings-collapse">
-                                                       {{$h_prv}}
-                                               </a>
-                                       </h4>
-                               </div>
-                               <div id="privacy-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="privacy-settings">
-                                       <div class="section-content-tools-wrapper">
-
-                                               <input type="hidden" name="visibility" value="{{$visibility}}" />
-
-                                               {{include file="field_input.tpl" field=$maxreq}}
-
-                                               {{$profile_in_dir}}
-
-                                               {{$profile_in_net_dir}}
-
-                                               {{$hide_friends}}
-
-                                               {{$hide_wall}}
-
-                                               {{$blockwall}}
-
-                                               {{$blocktags}}
-
-                                               {{$suggestme}}
-
-                                               {{$unkmail}}
-
-
-                                               {{include file="field_input.tpl" field=$cntunkmail}}
-
-                                               {{include file="field_input.tpl" field=$expire.days}}
-
-
-                                               <div id="settings-advanced-expire">
-                                                       <a id="advanced-expire-menu" title="{{$expire.advanced}}" data-toggle="modal" data-target="#aeModal">{{$expire.label}}</a>
-
-                                                       {{* The modal for advanced-expire *}}
-                                                       <div class="modal" id="aeModal">
-                                                               <div class="modal-dialog">
-                                                                       <div class="modal-content">
-                                                                               <div class="modal-header">
-                                                                                       <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-                                                                                       <h4 class="modal-title">{{$expire.advanced}}</h4>
-                                                                               </div>
-                                                                               <div class="modal-body">
-                                                                                       {{include file="field_yesno.tpl" field=$expire.items}}
-                                                                                       {{include file="field_yesno.tpl" field=$expire.notes}}
-                                                                                       {{include file="field_yesno.tpl" field=$expire.starred}}
-                                                                                       {{include file="field_yesno.tpl" field=$expire.network_only}}
-                                                                               </div>
-                                                                       </div>
-                                                               </div>
-                                                       </div>
-                                               </div>
-
-                                               {{* Block for setting default permissions *}}
-                                               <div id="settings-default-perms" class="settings-default-perms">
-                                                       <a id="settings-default-perms-menu" class="settings-default-perms" data-toggle="modal" data-target="#aclModal">{{$permissions}} {{$permdesc}}</a>
-                                                       <div id="settings-default-perms-menu-end"></div>
-
-                                                       {{* We include the aclModal directly into the template since we cant use frio's default modal *}}
-                                                       <div class="modal" id="aclModal">
-                                                               <div class="modal-dialog">
-                                                                       <div class="modal-content">
-                                                                               <div class="modal-header">
-                                                                                       <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-                                                                                       <h4 class="modal-title">{{$permissions}}</h4>
-                                                                               </div>
-                                                                               <div class="modal-body">
-                                                                                       {{$aclselect}}
-                                                                               </div>
-                                                                       </div>
-                                                               </div>
-                                                       </div>
-                                               </div>
-                                               <br/>
-                                               <div class="clear"></div>
-
-                                               {{$group_select}}
-
-
-                                               <div class="form-group pull-right settings-submit-wrapper" >
-                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
-                                               </div>
-                                               <div class="clear"></div>
-                                       </div>
-                               </div>
-                       </div>
-
-                       {{* The notification setting section *}}
-                       <div class="panel">
-                               <div class="section-subtitle-wrapper" role="tab" id="notification-settings">
-                                       <h4>
-                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#notification-settings-collapse" aria-expanded="false" aria-controls="notification-settings-collapse">
-                                                       {{$h_not}}
-                                               </a>
-                                       </h4>
-                               </div>
-                               <div id="notification-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="notification-settings">
-                                       <div class="section-content-tools-wrapper">
-                                               <div id="settings-notifications">
-
-                                                       <div id="settings-activity-desc"><h4>{{$activity_options}}</h4></div>
-
-                                                       <div class="group">
-                                                               {{include file="field_checkbox.tpl" field=$post_newfriend}}
-                                                               {{include file="field_checkbox.tpl" field=$post_joingroup}}
-                                                               {{include file="field_checkbox.tpl" field=$post_profilechange}}
-                                                       </div>
-
-
-                                                       <div id="settings-notify-desc"><h4>{{$lbl_not}}</h4></div>
-
-                                                       <div class="group">
-                                                               {{include file="field_intcheckbox.tpl" field=$notify1}}
-                                                               {{include file="field_intcheckbox.tpl" field=$notify2}}
-                                                               {{include file="field_intcheckbox.tpl" field=$notify3}}
-                                                               {{include file="field_intcheckbox.tpl" field=$notify4}}
-                                                               {{include file="field_intcheckbox.tpl" field=$notify5}}
-                                                               {{include file="field_intcheckbox.tpl" field=$notify6}}
-                                                               {{include file="field_intcheckbox.tpl" field=$notify7}}
-                                                               {{include file="field_intcheckbox.tpl" field=$notify8}}
-                                                       </div>
-
-                                                       {{include file="field_checkbox.tpl" field=$email_textonly}}
-                                                       {{include file="field_checkbox.tpl" field=$detailed_notif}}
-
-                                                       {{* commented out because it was commented out in the original template
-                                                       <div class="field">
-                                                        <button type="button" onclick="javascript:Notification.requestPermission(function(perm){if(perm === 'granted')alert('{{$desktop_notifications_success_message}}');});">{{$desktop_notifications}}</button>
-                                                        <span class="field_help">{{$desktop_notifications_note}}</span>
-                                                       </div>
-                                                       *}}
-
-                                                       {{include file="field_yesno.tpl" field=$desktop_notifications}}
-                                                       <script type="text/javascript">
-                                                               (function(){
-                                                                       var elm = $("#id_{{$desktop_notifications.0}}_onoff");
-                                                                       var ckbox = $("#id_{{$desktop_notifications.0}}");
-
-                                                                       if (getNotificationPermission() === 'granted') {
-                                                                               ckbox.val(1);
-                                                                               elm.find(".off").addClass("hidden");
-                                                                               elm.find(".on").removeClass("hidden");
-                                                                       }
-                                                                       if (getNotificationPermission() === null) {
-                                                                               elm.parent(".field.yesno").hide();
-                                                                       }
-
-                                                                       $("#id_{{$desktop_notifications.0}}_onoff").on("click", function(e){
-
-                                                                               if (Notification.permission === 'granted') {
-                                                                                       localStorage.setItem('notification-permissions', ckbox.val()==1 ? 'granted' : 'denied');
-                                                                               } else if (Notification.permission === 'denied') {
-                                                                                       localStorage.setItem('notification-permissions', 'denied');
-
-                                                                                       ckbox.val(0);
-                                                                                       elm.find(".on").addClass("hidden");
-                                                                                       elm.find(".off").removeClass("hidden");
-
-                                                                               } else if (Notification.permission === 'default') {
-                                                                                       Notification.requestPermission(function(choice) {
-                                                                                               if (choice === 'granted') {
-                                                                                                       localStorage.setItem('notification-permissions', ckbox.val()==1 ? 'granted' : 'denied');
-
-                                                                                               } else {
-                                                                                                       localStorage.setItem('notification-permissions', 'denied');
-                                                                                                       ckbox.val(0);
-                                                                                                       elm.find(".on").addClass("hidden");
-                                                                                                       elm.find(".off").removeClass("hidden");
-                                                                                               }
-                                                                                       });
-                                                                               }
-
-                                                                               //console.log(getNotificationPermission());
-                                                                       })
-                                                               })();
-                                                       </script>
-                                               </div>
-
-                                               <div class="form-group pull-right settings-submit-wrapper" >
-                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
-                                               </div>
-                                               <div class="clear"></div>
-                                       </div>
-                               </div>
-                       </div>
-
-                       {{* The additional account setting section *}}
-                       <div class="panel">
-                               <div class="section-subtitle-wrapper" role="tab" id="additional-account-settings">
-                                       <h4>
-                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#additional-account-settings-collapse" aria-expanded="false" aria-controls="additional-account-settings-collapse">
-                                                       {{$h_advn}}
-                                               </a>
-                                       </h4>
-                               </div>
-                               <div id="additional-account-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="additional-account-settings">
-                                       <div class="section-content-tools-wrapper">
-
-                                               <div id="settings-pagetype-desc">{{$h_descadvn}}</div>
-
-                                               {{$pagetype}}
-
-                                               <div class="form-group pull-right settings-submit-wrapper" >
-                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
-                                               </div>
-                                               <div class="clear"></div>
-                                       </div>
-                               </div>
-                       </div>
-
-                       {{* The relocate setting section *}}
-                       <div class="panel">
-                               <div class="section-subtitle-wrapper" role="tab" id="relocate-settings">
-                                       <h4>
-                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#relocate-settings-collapse" aria-expanded="false" aria-controls="relocate-settings-collapse">
-                                                       {{$relocate}}
-                                               </a>
-                                       </h4>
-                               </div>
-                               <div id="relocate-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="relocate-settings">
-                                       <div class="section-content-tools-wrapper">
-
-                                               <div id="settings-relocate-desc">{{$relocate_text}}</div>
-
-                                               <br/>
-                                               <div class="form-group pull-right settings-submit-wrapper" >
-                                                       <button type="submit" name="resend_relocate" class="btn btn-primary" value="{{$relocate_button|escape:'html'}}">{{$relocate_button|escape:'html'}}</button>
-                                               </div>
-                                               <div class="clear"></div>
-                                       </div>
-                               </div>
-                       </div>
-               </div>
-       </form>
-</div>
diff --git a/view/theme/frio/templates/settings/connectors.tpl b/view/theme/frio/templates/settings/connectors.tpl
new file mode 100644 (file)
index 0000000..c388a6e
--- /dev/null
@@ -0,0 +1,70 @@
+<div class="generic-page-wrapper">
+       {{* include the title template for the settings title *}}
+       {{include file="section_title.tpl" title=$title}}
+
+       <p class="connector_statusmsg">{{$diasp_enabled}}</p>
+       <p class="connector_statusmsg">{{$ostat_enabled}}</p>
+
+       <form action="settings/connectors" method="post" autocomplete="off">
+               <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+
+               <div class="panel-group panel-group-settings" id="settings" role="tablist" aria-multiselectable="true">
+                       <div class="panel">
+                               <div class="section-subtitle-wrapper" role="tab" id="content-settings-title">
+                                       <h4>
+                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#content-settings-content" aria-expanded="false" aria-controls="content-settings-content">
+                                                       {{$general_settings}}
+                                               </a>
+                                       </h4>
+                               </div>
+                               <div id="content-settings-content" class="panel-collapse collapse" role="tabpanel" aria-labelledby="content-settings">
+                                       <div class="section-content-wrapper">
+
+                                               {{include file="field_checkbox.tpl" field=$no_intelligent_shortening}}
+                                               {{include file="field_checkbox.tpl" field=$ostatus_autofriend}}
+                                               {{$default_group}}
+                                               {{include file="field_input.tpl" field=$legacy_contact}}
+
+                                               <p><a href="{{$repair_ostatus_url}}">{{$repair_ostatus_text}}</a></p>
+
+                                               <div class="form-group pull-right settings-submit-wrapper" >
+                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
+                                               </div>
+                                               <div class="clear"></div>
+                                       </div>
+                               </div>
+                       </div>
+               </div>
+
+               {{$settings_connectors}}
+
+{{if $mail_disabled}}
+
+{{else}}
+               <span id="settings_mail_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose('settings_mail_expanded'); openClose('settings_mail_inflated');">
+                       <img class="connector" src="images/mail.png" /><h3 class="settings-heading connector">{{$h_imap}}</h3>
+               </span>
+               <div id="settings_mail_expanded" class="settings-block" style="display: none;">
+               <span class="fakelink" onclick="openClose('settings_mail_expanded'); openClose('settings_mail_inflated');">
+                       <img class="connector" src="images/mail.png" /><h3 class="settings-heading connector">{{$h_imap}}</h3>
+               </span>
+               <p>{{$imap_desc}}</p>
+               {{include file="field_custom.tpl" field=$imap_lastcheck}}
+               {{include file="field_input.tpl" field=$mail_server}}
+               {{include file="field_input.tpl" field=$mail_port}}
+               {{include file="field_select.tpl" field=$mail_ssl}}
+               {{include file="field_input.tpl" field=$mail_user}}
+               {{include file="field_password.tpl" field=$mail_pass}}
+               {{include file="field_input.tpl" field=$mail_replyto}}
+               {{include file="field_checkbox.tpl" field=$mail_pubmail}}
+               {{include file="field_select.tpl" field=$mail_action}}
+               {{include file="field_input.tpl" field=$mail_movetofolder}}
+
+               <div class="settings-submit-wrapper" >
+                       <input type="submit" id="imap-submit" name="imap-submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
+               </div>
+               </div>
+{{/if}}
+
+       </form>
+</div>
\ No newline at end of file
diff --git a/view/theme/frio/templates/settings/display.tpl b/view/theme/frio/templates/settings/display.tpl
new file mode 100644 (file)
index 0000000..cc36762
--- /dev/null
@@ -0,0 +1,110 @@
+
+<div class="generic-page-wrapper">
+       {{* include the title template for the settings title *}}
+       {{include file="section_title.tpl" title=$ptitle }}
+
+
+       <form action="settings/display" id="settings-form" method="post" autocomplete="off" >
+               <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+
+               <div class="panel-group panel-group-settings" id="settings" role="tablist" aria-multiselectable="true">
+                       <div class="panel">
+                               <div class="section-subtitle-wrapper" role="tab" id="theme-settings-title">
+                                       <h4>
+                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#theme-settings-content" aria-expanded="true" aria-controls="theme-settings-content">
+                                                       {{$d_tset}}
+                                               </a>
+                                       </h4>
+                               </div>
+
+                               <div id="theme-settings-content" class="panel-collapse collapse" role="tabpanel" aria-labelledby="theme-settings">
+                                       <div class="section-content-tools-wrapper">
+
+                                               {{include file="field_themeselect.tpl" field=$theme}}
+
+                                               {{* Show the mobile theme selection only if mobile themes are available *}}
+                                               {{if count($mobile_theme.4) > 1}}
+                                               {{include file="field_themeselect.tpl" field=$mobile_theme}}
+                                               {{/if}}
+
+                                               <div class="form-group pull-right settings-submit-wrapper" >
+                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
+                                               </div>
+                                               <div class="clear"></div>
+
+                                       </div>
+                               </div>
+                       </div>
+
+                       <div class="panel">
+                               <div class="section-subtitle-wrapper" role="tab" id="custom-settings-title">
+                                       <h4>
+                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#custom-settings-content" aria-expanded="false" aria-controls="custom-settings-content">
+                                                       {{$d_ctset}}
+                                               </a>
+                                       </h4>
+                               </div>
+                               <div id="custom-settings-content" class="panel-collapse collapse{{if !$theme && !$mobile_theme}} in{{/if}}" role="tabpanel" aria-labelledby="custom-settings">
+                                       <div class="section-content-tools-wrapper">
+
+                                               {{if $theme_config}}
+                                               {{$theme_config}}
+                                               {{/if}}
+
+                                       </div>
+                               </div>
+                       </div>
+
+                       <div class="panel">
+                               <div class="section-subtitle-wrapper" role="tab" id="content-settings-title">
+                                       <h4>
+                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#content-settings-content" aria-expanded="false" aria-controls="content-settings-content">
+                                                       {{$d_cset}}
+                                               </a>
+                                       </h4>
+                               </div>
+                               <div id="content-settings-content" class="panel-collapse collapse{{if !$theme && !$mobile_theme && !$theme_config}} in{{/if}}" role="tabpanel" aria-labelledby="content-settings">
+                                       <div class="section-content-wrapper">
+
+                                               {{include file="field_input.tpl" field=$itemspage_network}}
+                                               {{include file="field_input.tpl" field=$itemspage_mobile_network}}
+                                               {{include file="field_input.tpl" field=$ajaxint}}
+                                               {{include file="field_checkbox.tpl" field=$nowarn_insecure}}
+                                               {{include file="field_checkbox.tpl" field=$no_auto_update}}
+                                               {{include file="field_checkbox.tpl" field=$nosmile}}
+                                               {{include file="field_checkbox.tpl" field=$noinfo}}
+                                               {{include file="field_checkbox.tpl" field=$infinite_scroll}}
+                                               {{include file="field_checkbox.tpl" field=$bandwidth_saver}}
+                                               {{include file="field_checkbox.tpl" field=$smart_threading}}
+
+                                               <div class="form-group pull-right settings-submit-wrapper" >
+                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
+                                               </div>
+                                               <div class="clear"></div>
+                                       </div>
+                               </div>
+                       </div>
+
+                       <div class="panel">
+                               <div class="section-subtitle-wrapper" role="tab" id="calendar-settings-title">
+                                       <h4>
+                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#calendar-settings-content" aria-expanded="false" aria-controls="calendar-settings-content">
+                                                       {{$calendar_title}}
+                                               </a>
+                                       </h4>
+                               </div>
+                               <div id="calendar-settings-content" class="panel-collapse collapse{{if !$theme && !$mobile_theme && !$theme_config}} in{{/if}}" role="tabpanel" aria-labelledby="calendar-settings">
+                                       <div class="section-content-wrapper">
+
+                                               {{include file="field_select.tpl" field=$first_day_of_week}}
+
+                                               <div class="form-group pull-right settings-submit-wrapper" >
+                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
+                                               </div>
+                                               <div class="clear"></div>
+                                       </div>
+                               </div>
+                       </div>
+               </div>
+       </form>
+</div>
diff --git a/view/theme/frio/templates/settings/features.tpl b/view/theme/frio/templates/settings/features.tpl
new file mode 100644 (file)
index 0000000..c811b8c
--- /dev/null
@@ -0,0 +1,36 @@
+<div class="generic-page-wrapper">
+       {{* include the title template for the settings title *}}
+       {{include file="section_title.tpl" title=$title }}
+
+
+       <form action="settings/features" method="post" autocomplete="off">
+               <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+               {{* We organize the settings in collapsable panel-groups *}}
+               <div class="panel-group panel-group-settings" id="settings" role="tablist" aria-multiselectable="true">
+                       {{foreach $features as $g => $f}}
+                       <div class="panel">
+                               <div class="section-subtitle-wrapper" role="tab" id="{{$g}}-settings-title">
+                                       <h4>
+                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#{{$g}}-settings-content" aria-expanded="true" aria-controls="{{$g}}-settings-content">
+                                                       {{$f.0}}
+                                               </a>
+                                       </h4>
+                               </div>
+                               <div id="{{$g}}-settings-content" class="panel-collapse collapse" role="tabpanel" aria-labelledby="{{$g}}-settings-title">
+                                       <div class="section-content-tools-wrapper">
+                                               {{foreach $f.1 as $fcat}}
+                                                       {{include file="field_yesno.tpl" field=$fcat}}
+                                               {{/foreach}}
+
+                                               <div class="form-group pull-right settings-submit-wrapper" >
+                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
+                                               </div>
+                                               <div class="clear"></div>
+                                       </div>
+                               </div>
+                       </div>
+                       {{/foreach}}
+               </div>
+
+       </form>
+</div>
diff --git a/view/theme/frio/templates/settings/oauth.tpl b/view/theme/frio/templates/settings/oauth.tpl
new file mode 100644 (file)
index 0000000..ffd40f2
--- /dev/null
@@ -0,0 +1,44 @@
+<div class="generic-page-wrapper">
+       {{* include the title template for the settings title *}}
+       {{include file="section_title.tpl" title=$title }}
+
+
+       <form action="settings/oauth" method="post" autocomplete="off">
+               <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+
+               <div id="profile-edit-links">
+                       <ul>
+                               {{*
+                               I commented this out. Initially I wanted to to load the oauth/add into a modal dialog but settings.php
+                               does need $a->argv[2] === 'add' to work and argv[2] isn't available if you load a modal
+                               I leave it at this place as reminder that we need an other solution in settings.php 
+
+                               <li role="menuitem">
+                                       <a id="profile-edit-view-link" onclick="addToModal('{{$baseurl}}/settings/oauth/add')">{{$add}}</a>
+                               </li>
+                               *}}
+
+                               <li role="menuitem">
+                                       <a id="profile-edit-view-link" href="{{$baseurl}}/settings/oauth/add">{{$add}}</a>
+                               </li>
+                       </ul>
+               </div>
+
+               {{foreach $apps as $app}}
+               <div class='oauthapp'>
+                       <img src='{{$app.icon}}' class="{{if $app.icon}} {{else}}noicon{{/if}}">
+                       {{if $app.name}}<h4>{{$app.name}}</h4>{{else}}<h4>{{$noname}}</h4>{{/if}}
+                       {{if $app.my}}
+                               {{if $app.oauth_token}}
+                               <div class="settings-submit-wrapper" ><button class="settings-submit"  type="submit" name="remove" value="{{$app.oauth_token}}">{{$remove}}</button></div>
+                               {{/if}}
+                       {{/if}}
+                       {{if $app.my}}
+                       <a href="{{$baseurl}}/settings/oauth/edit/{{$app.client_id}}" class="btn" title="{{$edit|escape:'html'}}"><i class="fa fa-pencil-square-o" aria-hidden="true"></i>&nbsp;</a>
+                       <a href="{{$baseurl}}/settings/oauth/delete/{{$app.client_id}}?t={{$form_security_token}}" class="btn" title="{{$delete|escape:'html'}}"><i class="fa fa-trash" aria-hidden="true"></i></a>
+                       {{/if}}
+               </div>
+               {{/foreach}}
+
+       </form>
+</div>
diff --git a/view/theme/frio/templates/settings/oauth_edit.tpl b/view/theme/frio/templates/settings/oauth_edit.tpl
new file mode 100644 (file)
index 0000000..91dfa04
--- /dev/null
@@ -0,0 +1,18 @@
+
+<h2 class="heading">{{$title}}</h2>
+
+<form method="POST">
+       <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+
+       {{include file="field_input.tpl" field=$name}}
+       {{include file="field_input.tpl" field=$key}}
+       {{include file="field_input.tpl" field=$secret}}
+       {{include file="field_input.tpl" field=$redirect}}
+       {{include file="field_input.tpl" field=$icon}}
+
+       <div class="form-group pull-right settings-submit-wrapper" >
+               <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
+       </div>
+       <div class="clear"></div>
+
+</form>
diff --git a/view/theme/frio/templates/settings/settings.tpl b/view/theme/frio/templates/settings/settings.tpl
new file mode 100644 (file)
index 0000000..f197eb5
--- /dev/null
@@ -0,0 +1,308 @@
+<div class="generic-page-wrapper">
+       {{* include the title template for the settings title *}}
+       {{include file="section_title.tpl" title=$ptitle }}
+
+       {{$nickname_block}}
+
+       <form action="settings" id="settings-form" method="post" autocomplete="off" >
+               <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+
+               {{* We organize the settings in collapsable panel-groups *}}
+               <div class="panel-group panel-group-settings" id="settings" role="tablist" aria-multiselectable="true">
+                       {{* The password setting section *}}
+                       <div class="panel">
+                               <div class="section-subtitle-wrapper" role="tab" id="password-settings">
+                                       <h4>
+                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#password-settings-collapse" aria-expanded="false" aria-controls="password-settings-collapse">
+                                                       {{$h_pass}}
+                                               </a>
+                                       </h4>
+                               </div>
+                               <div id="password-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="password-settings">
+                                       <div class="section-content-tools-wrapper">
+                                               {{include file="field_password.tpl" field=$password1}}
+                                               {{include file="field_password.tpl" field=$password2}}
+                                               {{include file="field_password.tpl" field=$password3}}
+
+                                               {{if $oid_enable}}
+                                               {{include file="field_input.tpl" field=$openid}}
+                                               {{/if}}
+
+                                               <div class="form-group pull-right settings-submit-wrapper" >
+                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
+                                               </div>
+                                               <div class="clear"></div>
+                                       </div>
+                               </div>
+                       </div>
+
+                       {{* The basic setting section *}}
+                       <div class="panel">
+                               <div class="section-subtitle-wrapper" role="tab" id="basic-settings">
+                                       <h4>
+                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#basic-settings-collapse" aria-expanded="false" aria-controls="basic-settings-collapse">
+                                                       {{$h_basic}}
+                                               </a>
+                                       </h4>
+                               </div>
+                               <div id="basic-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="basic-settings">
+                                       <div class="section-content-tools-wrapper">
+
+                                               {{include file="field_input.tpl" field=$username}}
+                                               {{include file="field_input.tpl" field=$email}}
+                                               {{include file="field_password.tpl" field=$password4}}
+                                               {{include file="field_custom.tpl" field=$timezone}}
+                                               {{include file="field_select.tpl" field=$language}}
+                                               {{include file="field_input.tpl" field=$defloc}}
+                                               {{include file="field_checkbox.tpl" field=$allowloc}}
+
+                                               <div class="form-group pull-right settings-submit-wrapper" >
+                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
+                                               </div>
+                                               <div class="clear"></div>
+                                       </div>
+                               </div>
+                       </div>
+
+                       {{* The privacity setting section *}}
+                       <div class="panel">
+                               <div class="section-subtitle-wrapper" role="tab" id="privacy-settings">
+                                       <h4>
+                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#privacy-settings-collapse" aria-expanded="false" aria-controls="privacy-settings-collapse">
+                                                       {{$h_prv}}
+                                               </a>
+                                       </h4>
+                               </div>
+                               <div id="privacy-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="privacy-settings">
+                                       <div class="section-content-tools-wrapper">
+
+                                               <input type="hidden" name="visibility" value="{{$visibility}}" />
+
+                                               {{include file="field_input.tpl" field=$maxreq}}
+
+                                               {{$profile_in_dir}}
+
+                                               {{$profile_in_net_dir}}
+
+                                               {{$hide_friends}}
+
+                                               {{$hide_wall}}
+
+                                               {{$blockwall}}
+
+                                               {{$blocktags}}
+
+                                               {{$suggestme}}
+
+                                               {{$unkmail}}
+
+
+                                               {{include file="field_input.tpl" field=$cntunkmail}}
+
+                                               {{include file="field_input.tpl" field=$expire.days}}
+
+
+                                               <div id="settings-advanced-expire">
+                                                       <a id="advanced-expire-menu" title="{{$expire.advanced}}" data-toggle="modal" data-target="#aeModal">{{$expire.label}}</a>
+
+                                                       {{* The modal for advanced-expire *}}
+                                                       <div class="modal" id="aeModal">
+                                                               <div class="modal-dialog">
+                                                                       <div class="modal-content">
+                                                                               <div class="modal-header">
+                                                                                       <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+                                                                                       <h4 class="modal-title">{{$expire.advanced}}</h4>
+                                                                               </div>
+                                                                               <div class="modal-body">
+                                                                                       {{include file="field_yesno.tpl" field=$expire.items}}
+                                                                                       {{include file="field_yesno.tpl" field=$expire.notes}}
+                                                                                       {{include file="field_yesno.tpl" field=$expire.starred}}
+                                                                                       {{include file="field_yesno.tpl" field=$expire.network_only}}
+                                                                               </div>
+                                                                       </div>
+                                                               </div>
+                                                       </div>
+                                               </div>
+
+                                               {{* Block for setting default permissions *}}
+                                               <div id="settings-default-perms" class="settings-default-perms">
+                                                       <a id="settings-default-perms-menu" class="settings-default-perms" data-toggle="modal" data-target="#aclModal">{{$permissions}} {{$permdesc}}</a>
+                                                       <div id="settings-default-perms-menu-end"></div>
+
+                                                       {{* We include the aclModal directly into the template since we cant use frio's default modal *}}
+                                                       <div class="modal" id="aclModal">
+                                                               <div class="modal-dialog">
+                                                                       <div class="modal-content">
+                                                                               <div class="modal-header">
+                                                                                       <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+                                                                                       <h4 class="modal-title">{{$permissions}}</h4>
+                                                                               </div>
+                                                                               <div class="modal-body">
+                                                                                       {{$aclselect}}
+                                                                               </div>
+                                                                       </div>
+                                                               </div>
+                                                       </div>
+                                               </div>
+                                               <br/>
+                                               <div class="clear"></div>
+
+                                               {{$group_select}}
+
+
+                                               <div class="form-group pull-right settings-submit-wrapper" >
+                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
+                                               </div>
+                                               <div class="clear"></div>
+                                       </div>
+                               </div>
+                       </div>
+
+                       {{* The notification setting section *}}
+                       <div class="panel">
+                               <div class="section-subtitle-wrapper" role="tab" id="notification-settings">
+                                       <h4>
+                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#notification-settings-collapse" aria-expanded="false" aria-controls="notification-settings-collapse">
+                                                       {{$h_not}}
+                                               </a>
+                                       </h4>
+                               </div>
+                               <div id="notification-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="notification-settings">
+                                       <div class="section-content-tools-wrapper">
+                                               <div id="settings-notifications">
+
+                                                       <div id="settings-activity-desc"><h4>{{$activity_options}}</h4></div>
+
+                                                       <div class="group">
+                                                               {{include file="field_checkbox.tpl" field=$post_newfriend}}
+                                                               {{include file="field_checkbox.tpl" field=$post_joingroup}}
+                                                               {{include file="field_checkbox.tpl" field=$post_profilechange}}
+                                                       </div>
+
+
+                                                       <div id="settings-notify-desc"><h4>{{$lbl_not}}</h4></div>
+
+                                                       <div class="group">
+                                                               {{include file="field_intcheckbox.tpl" field=$notify1}}
+                                                               {{include file="field_intcheckbox.tpl" field=$notify2}}
+                                                               {{include file="field_intcheckbox.tpl" field=$notify3}}
+                                                               {{include file="field_intcheckbox.tpl" field=$notify4}}
+                                                               {{include file="field_intcheckbox.tpl" field=$notify5}}
+                                                               {{include file="field_intcheckbox.tpl" field=$notify6}}
+                                                               {{include file="field_intcheckbox.tpl" field=$notify7}}
+                                                               {{include file="field_intcheckbox.tpl" field=$notify8}}
+                                                       </div>
+
+                                                       {{include file="field_checkbox.tpl" field=$email_textonly}}
+                                                       {{include file="field_checkbox.tpl" field=$detailed_notif}}
+
+                                                       {{* commented out because it was commented out in the original template
+                                                       <div class="field">
+                                                        <button type="button" onclick="javascript:Notification.requestPermission(function(perm){if(perm === 'granted')alert('{{$desktop_notifications_success_message}}');});">{{$desktop_notifications}}</button>
+                                                        <span class="field_help">{{$desktop_notifications_note}}</span>
+                                                       </div>
+                                                       *}}
+
+                                                       {{include file="field_yesno.tpl" field=$desktop_notifications}}
+                                                       <script type="text/javascript">
+                                                               (function(){
+                                                                       var elm = $("#id_{{$desktop_notifications.0}}_onoff");
+                                                                       var ckbox = $("#id_{{$desktop_notifications.0}}");
+
+                                                                       if (getNotificationPermission() === 'granted') {
+                                                                               ckbox.val(1);
+                                                                               elm.find(".off").addClass("hidden");
+                                                                               elm.find(".on").removeClass("hidden");
+                                                                       }
+                                                                       if (getNotificationPermission() === null) {
+                                                                               elm.parent(".field.yesno").hide();
+                                                                       }
+
+                                                                       $("#id_{{$desktop_notifications.0}}_onoff").on("click", function(e){
+
+                                                                               if (Notification.permission === 'granted') {
+                                                                                       localStorage.setItem('notification-permissions', ckbox.val()==1 ? 'granted' : 'denied');
+                                                                               } else if (Notification.permission === 'denied') {
+                                                                                       localStorage.setItem('notification-permissions', 'denied');
+
+                                                                                       ckbox.val(0);
+                                                                                       elm.find(".on").addClass("hidden");
+                                                                                       elm.find(".off").removeClass("hidden");
+
+                                                                               } else if (Notification.permission === 'default') {
+                                                                                       Notification.requestPermission(function(choice) {
+                                                                                               if (choice === 'granted') {
+                                                                                                       localStorage.setItem('notification-permissions', ckbox.val()==1 ? 'granted' : 'denied');
+
+                                                                                               } else {
+                                                                                                       localStorage.setItem('notification-permissions', 'denied');
+                                                                                                       ckbox.val(0);
+                                                                                                       elm.find(".on").addClass("hidden");
+                                                                                                       elm.find(".off").removeClass("hidden");
+                                                                                               }
+                                                                                       });
+                                                                               }
+
+                                                                               //console.log(getNotificationPermission());
+                                                                       })
+                                                               })();
+                                                       </script>
+                                               </div>
+
+                                               <div class="form-group pull-right settings-submit-wrapper" >
+                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
+                                               </div>
+                                               <div class="clear"></div>
+                                       </div>
+                               </div>
+                       </div>
+
+                       {{* The additional account setting section *}}
+                       <div class="panel">
+                               <div class="section-subtitle-wrapper" role="tab" id="additional-account-settings">
+                                       <h4>
+                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#additional-account-settings-collapse" aria-expanded="false" aria-controls="additional-account-settings-collapse">
+                                                       {{$h_advn}}
+                                               </a>
+                                       </h4>
+                               </div>
+                               <div id="additional-account-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="additional-account-settings">
+                                       <div class="section-content-tools-wrapper">
+
+                                               <div id="settings-pagetype-desc">{{$h_descadvn}}</div>
+
+                                               {{$pagetype}}
+
+                                               <div class="form-group pull-right settings-submit-wrapper" >
+                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
+                                               </div>
+                                               <div class="clear"></div>
+                                       </div>
+                               </div>
+                       </div>
+
+                       {{* The relocate setting section *}}
+                       <div class="panel">
+                               <div class="section-subtitle-wrapper" role="tab" id="relocate-settings">
+                                       <h4>
+                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#relocate-settings-collapse" aria-expanded="false" aria-controls="relocate-settings-collapse">
+                                                       {{$relocate}}
+                                               </a>
+                                       </h4>
+                               </div>
+                               <div id="relocate-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="relocate-settings">
+                                       <div class="section-content-tools-wrapper">
+
+                                               <div id="settings-relocate-desc">{{$relocate_text}}</div>
+
+                                               <br/>
+                                               <div class="form-group pull-right settings-submit-wrapper" >
+                                                       <button type="submit" name="resend_relocate" class="btn btn-primary" value="{{$relocate_button|escape:'html'}}">{{$relocate_button|escape:'html'}}</button>
+                                               </div>
+                                               <div class="clear"></div>
+                                       </div>
+                               </div>
+                       </div>
+               </div>
+       </form>
+</div>
diff --git a/view/theme/frio/templates/settings_display.tpl b/view/theme/frio/templates/settings_display.tpl
deleted file mode 100644 (file)
index cc36762..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-
-<div class="generic-page-wrapper">
-       {{* include the title template for the settings title *}}
-       {{include file="section_title.tpl" title=$ptitle }}
-
-
-       <form action="settings/display" id="settings-form" method="post" autocomplete="off" >
-               <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
-
-               <div class="panel-group panel-group-settings" id="settings" role="tablist" aria-multiselectable="true">
-                       <div class="panel">
-                               <div class="section-subtitle-wrapper" role="tab" id="theme-settings-title">
-                                       <h4>
-                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#theme-settings-content" aria-expanded="true" aria-controls="theme-settings-content">
-                                                       {{$d_tset}}
-                                               </a>
-                                       </h4>
-                               </div>
-
-                               <div id="theme-settings-content" class="panel-collapse collapse" role="tabpanel" aria-labelledby="theme-settings">
-                                       <div class="section-content-tools-wrapper">
-
-                                               {{include file="field_themeselect.tpl" field=$theme}}
-
-                                               {{* Show the mobile theme selection only if mobile themes are available *}}
-                                               {{if count($mobile_theme.4) > 1}}
-                                               {{include file="field_themeselect.tpl" field=$mobile_theme}}
-                                               {{/if}}
-
-                                               <div class="form-group pull-right settings-submit-wrapper" >
-                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
-                                               </div>
-                                               <div class="clear"></div>
-
-                                       </div>
-                               </div>
-                       </div>
-
-                       <div class="panel">
-                               <div class="section-subtitle-wrapper" role="tab" id="custom-settings-title">
-                                       <h4>
-                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#custom-settings-content" aria-expanded="false" aria-controls="custom-settings-content">
-                                                       {{$d_ctset}}
-                                               </a>
-                                       </h4>
-                               </div>
-                               <div id="custom-settings-content" class="panel-collapse collapse{{if !$theme && !$mobile_theme}} in{{/if}}" role="tabpanel" aria-labelledby="custom-settings">
-                                       <div class="section-content-tools-wrapper">
-
-                                               {{if $theme_config}}
-                                               {{$theme_config}}
-                                               {{/if}}
-
-                                       </div>
-                               </div>
-                       </div>
-
-                       <div class="panel">
-                               <div class="section-subtitle-wrapper" role="tab" id="content-settings-title">
-                                       <h4>
-                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#content-settings-content" aria-expanded="false" aria-controls="content-settings-content">
-                                                       {{$d_cset}}
-                                               </a>
-                                       </h4>
-                               </div>
-                               <div id="content-settings-content" class="panel-collapse collapse{{if !$theme && !$mobile_theme && !$theme_config}} in{{/if}}" role="tabpanel" aria-labelledby="content-settings">
-                                       <div class="section-content-wrapper">
-
-                                               {{include file="field_input.tpl" field=$itemspage_network}}
-                                               {{include file="field_input.tpl" field=$itemspage_mobile_network}}
-                                               {{include file="field_input.tpl" field=$ajaxint}}
-                                               {{include file="field_checkbox.tpl" field=$nowarn_insecure}}
-                                               {{include file="field_checkbox.tpl" field=$no_auto_update}}
-                                               {{include file="field_checkbox.tpl" field=$nosmile}}
-                                               {{include file="field_checkbox.tpl" field=$noinfo}}
-                                               {{include file="field_checkbox.tpl" field=$infinite_scroll}}
-                                               {{include file="field_checkbox.tpl" field=$bandwidth_saver}}
-                                               {{include file="field_checkbox.tpl" field=$smart_threading}}
-
-                                               <div class="form-group pull-right settings-submit-wrapper" >
-                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
-                                               </div>
-                                               <div class="clear"></div>
-                                       </div>
-                               </div>
-                       </div>
-
-                       <div class="panel">
-                               <div class="section-subtitle-wrapper" role="tab" id="calendar-settings-title">
-                                       <h4>
-                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#calendar-settings-content" aria-expanded="false" aria-controls="calendar-settings-content">
-                                                       {{$calendar_title}}
-                                               </a>
-                                       </h4>
-                               </div>
-                               <div id="calendar-settings-content" class="panel-collapse collapse{{if !$theme && !$mobile_theme && !$theme_config}} in{{/if}}" role="tabpanel" aria-labelledby="calendar-settings">
-                                       <div class="section-content-wrapper">
-
-                                               {{include file="field_select.tpl" field=$first_day_of_week}}
-
-                                               <div class="form-group pull-right settings-submit-wrapper" >
-                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
-                                               </div>
-                                               <div class="clear"></div>
-                                       </div>
-                               </div>
-                       </div>
-               </div>
-       </form>
-</div>
diff --git a/view/theme/frio/templates/settings_features.tpl b/view/theme/frio/templates/settings_features.tpl
deleted file mode 100644 (file)
index c811b8c..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<div class="generic-page-wrapper">
-       {{* include the title template for the settings title *}}
-       {{include file="section_title.tpl" title=$title }}
-
-
-       <form action="settings/features" method="post" autocomplete="off">
-               <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
-               {{* We organize the settings in collapsable panel-groups *}}
-               <div class="panel-group panel-group-settings" id="settings" role="tablist" aria-multiselectable="true">
-                       {{foreach $features as $g => $f}}
-                       <div class="panel">
-                               <div class="section-subtitle-wrapper" role="tab" id="{{$g}}-settings-title">
-                                       <h4>
-                                               <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#{{$g}}-settings-content" aria-expanded="true" aria-controls="{{$g}}-settings-content">
-                                                       {{$f.0}}
-                                               </a>
-                                       </h4>
-                               </div>
-                               <div id="{{$g}}-settings-content" class="panel-collapse collapse" role="tabpanel" aria-labelledby="{{$g}}-settings-title">
-                                       <div class="section-content-tools-wrapper">
-                                               {{foreach $f.1 as $fcat}}
-                                                       {{include file="field_yesno.tpl" field=$fcat}}
-                                               {{/foreach}}
-
-                                               <div class="form-group pull-right settings-submit-wrapper" >
-                                                       <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
-                                               </div>
-                                               <div class="clear"></div>
-                                       </div>
-                               </div>
-                       </div>
-                       {{/foreach}}
-               </div>
-
-       </form>
-</div>
diff --git a/view/theme/frio/templates/settings_oauth.tpl b/view/theme/frio/templates/settings_oauth.tpl
deleted file mode 100644 (file)
index ffd40f2..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<div class="generic-page-wrapper">
-       {{* include the title template for the settings title *}}
-       {{include file="section_title.tpl" title=$title }}
-
-
-       <form action="settings/oauth" method="post" autocomplete="off">
-               <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
-
-               <div id="profile-edit-links">
-                       <ul>
-                               {{*
-                               I commented this out. Initially I wanted to to load the oauth/add into a modal dialog but settings.php
-                               does need $a->argv[2] === 'add' to work and argv[2] isn't available if you load a modal
-                               I leave it at this place as reminder that we need an other solution in settings.php 
-
-                               <li role="menuitem">
-                                       <a id="profile-edit-view-link" onclick="addToModal('{{$baseurl}}/settings/oauth/add')">{{$add}}</a>
-                               </li>
-                               *}}
-
-                               <li role="menuitem">
-                                       <a id="profile-edit-view-link" href="{{$baseurl}}/settings/oauth/add">{{$add}}</a>
-                               </li>
-                       </ul>
-               </div>
-
-               {{foreach $apps as $app}}
-               <div class='oauthapp'>
-                       <img src='{{$app.icon}}' class="{{if $app.icon}} {{else}}noicon{{/if}}">
-                       {{if $app.name}}<h4>{{$app.name}}</h4>{{else}}<h4>{{$noname}}</h4>{{/if}}
-                       {{if $app.my}}
-                               {{if $app.oauth_token}}
-                               <div class="settings-submit-wrapper" ><button class="settings-submit"  type="submit" name="remove" value="{{$app.oauth_token}}">{{$remove}}</button></div>
-                               {{/if}}
-                       {{/if}}
-                       {{if $app.my}}
-                       <a href="{{$baseurl}}/settings/oauth/edit/{{$app.client_id}}" class="btn" title="{{$edit|escape:'html'}}"><i class="fa fa-pencil-square-o" aria-hidden="true"></i>&nbsp;</a>
-                       <a href="{{$baseurl}}/settings/oauth/delete/{{$app.client_id}}?t={{$form_security_token}}" class="btn" title="{{$delete|escape:'html'}}"><i class="fa fa-trash" aria-hidden="true"></i></a>
-                       {{/if}}
-               </div>
-               {{/foreach}}
-
-       </form>
-</div>
diff --git a/view/theme/frio/templates/settings_oauth_edit.tpl b/view/theme/frio/templates/settings_oauth_edit.tpl
deleted file mode 100644 (file)
index 91dfa04..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-
-<h2 class="heading">{{$title}}</h2>
-
-<form method="POST">
-       <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
-
-       {{include file="field_input.tpl" field=$name}}
-       {{include file="field_input.tpl" field=$key}}
-       {{include file="field_input.tpl" field=$secret}}
-       {{include file="field_input.tpl" field=$redirect}}
-       {{include file="field_input.tpl" field=$icon}}
-
-       <div class="form-group pull-right settings-submit-wrapper" >
-               <button type="submit" name="submit" class="btn btn-primary" value="{{$submit|escape:'html'}}">{{$submit}}</button>
-       </div>
-       <div class="clear"></div>
-
-</form>
diff --git a/view/theme/frost-mobile/templates/settings-head.tpl b/view/theme/frost-mobile/templates/settings-head.tpl
deleted file mode 100644 (file)
index 5ba31db..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-<script>
-       window.isPublic = "{{$ispublic}}";
-</script>
-
diff --git a/view/theme/frost-mobile/templates/settings.tpl b/view/theme/frost-mobile/templates/settings.tpl
deleted file mode 100644 (file)
index ccca7ea..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-
-<h1>{{$ptitle}}</h1>
-
-{{$nickname_block}}
-
-<form action="settings" id="settings-form" method="post" autocomplete="off" >
-<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
-
-<h3 class="settings-heading">{{$h_pass}}</h3>
-
-{{include file="field_password.tpl" field=$password1}}
-{{include file="field_password.tpl" field=$password2}}
-{{include file="field_password.tpl" field=$password3}}
-
-{{if $oid_enable}}
-{{include file="field_input.tpl" field=$openid}}
-{{/if}}
-
-<div class="settings-submit-wrapper" >
-<input type="submit" name="submit" class="settings-submit" value="{{$submit}}" />
-</div>
-
-
-<h3 class="settings-heading">{{$h_basic}}</h3>
-
-{{include file="field_input.tpl" field=$username}}
-{{include file="field_input.tpl" field=$email}}
-{{include file="field_password.tpl" field=$password4}}
-{{include file="field_custom.tpl" field=$timezone}}
-{{include file="field_select.tpl" field=$language}}
-{{include file="field_input.tpl" field=$defloc}}
-{{include file="field_checkbox.tpl" field=$allowloc}}
-
-
-<div class="settings-submit-wrapper" >
-<input type="submit" name="submit" class="settings-submit" value="{{$submit}}" />
-</div>
-
-
-<h3 class="settings-heading">{{$h_prv}}</h3>
-
-
-<input type="hidden" name="visibility" value="{{$visibility}}" />
-
-{{include file="field_input.tpl" field=$maxreq}}
-
-{{$profile_in_dir}}
-
-{{$profile_in_net_dir}}
-
-{{$hide_friends}}
-
-{{$hide_wall}}
-
-{{$blockwall}}
-
-{{$blocktags}}
-
-{{$suggestme}}
-
-{{$unkmail}}
-
-
-{{include file="field_input.tpl" field=$cntunkmail}}
-
-{{include file="field_input.tpl" field=$expire.days}}
-
-
-<div class="field input">
-       <span class="field_help"><a href="#advanced-expire-popup" id="advanced-expire" class='popupbox' title="{{$expire.advanced}}">{{$expire.label}}</a></span>
-       <div style="display: none;">
-               <div id="advanced-expire-popup" style="width:auto;height:auto;overflow:auto;">
-                       <h3>{{$expire.advanced}}</h3>
-                       {{include file="field_yesno.tpl" field=$expire.items}}
-                       {{include file="field_yesno.tpl" field=$expire.notes}}
-                       {{include file="field_yesno.tpl" field=$expire.starred}}
-                       {{include file="field_yesno.tpl" field=$expire.network_only}}
-               </div>
-       </div>
-
-</div>
-
-
-<div id="settings-default-perms" class="settings-default-perms" >
-       <a href="#settings-jot-acl-wrapper" id="settings-default-perms-menu" class='popupbox'>{{$permissions}} {{$permdesc}}</a>
-       <div id="settings-default-perms-menu-end"></div>
-
-{{*<!--        <div id="settings-default-perms-select" style="display: none; margin-bottom: 20px" >-->*}}
-
-       <div style="display: none;">
-               <div id="settings-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;margin-bottom: 20px">
-                       {{$aclselect}}
-               </div>
-       </div>
-
-{{*<!--        </div>-->*}}
-</div>
-<br/>
-<div id="settings-default-perms-end"></div>
-
-{{$group_select}}
-
-
-<div class="settings-submit-wrapper" >
-<input type="submit" name="submit" class="settings-submit" value="{{$submit}}" />
-</div>
-
-
-
-<h3 class="settings-heading">{{$h_not}}</h3>
-<div id="settings-notifications">
-
-<div id="settings-activity-desc">{{$activity_options}}</div>
-
-{{include file="field_checkbox.tpl" field=$post_newfriend}}
-{{include file="field_checkbox.tpl" field=$post_joingroup}}
-{{include file="field_checkbox.tpl" field=$post_profilechange}}
-
-
-<div id="settings-notify-desc">{{$lbl_not}}</div>
-
-<div class="group">
-{{include file="field_intcheckbox.tpl" field=$notify1}}
-{{include file="field_intcheckbox.tpl" field=$notify2}}
-{{include file="field_intcheckbox.tpl" field=$notify3}}
-{{include file="field_intcheckbox.tpl" field=$notify4}}
-{{include file="field_intcheckbox.tpl" field=$notify5}}
-{{include file="field_intcheckbox.tpl" field=$notify6}}
-{{include file="field_intcheckbox.tpl" field=$notify7}}
-{{include file="field_intcheckbox.tpl" field=$notify8}}
-</div>
-
-{{include file="field_checkbox.tpl" field=$email_textonly}}
-{{include file="field_checkbox.tpl" field=$detailed_notif}}
-
-</div>
-
-<div class="settings-submit-wrapper" >
-<input type="submit" name="submit" class="settings-submit" value="{{$submit}}" />
-</div>
-
-
-<h3 class="settings-heading">{{$h_advn}}</h3>
-<div id="settings-pagetype-desc">{{$h_descadvn}}</div>
-
-{{$pagetype}}
-
-<div class="settings-submit-wrapper" >
-<input type="submit" name="submit" class="settings-submit" value="{{$submit}}" />
-</div>
-
-
diff --git a/view/theme/frost-mobile/templates/settings/display_end.tpl b/view/theme/frost-mobile/templates/settings/display_end.tpl
new file mode 100644 (file)
index 0000000..14af582
--- /dev/null
@@ -0,0 +1,2 @@
+       <script>$(function(){ previewTheme($("#id_{{$theme.0}}")[0]); });</script>
+
diff --git a/view/theme/frost-mobile/templates/settings/head.tpl b/view/theme/frost-mobile/templates/settings/head.tpl
new file mode 100644 (file)
index 0000000..5ba31db
--- /dev/null
@@ -0,0 +1,6 @@
+
+
+<script>
+       window.isPublic = "{{$ispublic}}";
+</script>
+
diff --git a/view/theme/frost-mobile/templates/settings/settings.tpl b/view/theme/frost-mobile/templates/settings/settings.tpl
new file mode 100644 (file)
index 0000000..ccca7ea
--- /dev/null
@@ -0,0 +1,152 @@
+
+<h1>{{$ptitle}}</h1>
+
+{{$nickname_block}}
+
+<form action="settings" id="settings-form" method="post" autocomplete="off" >
+<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+
+<h3 class="settings-heading">{{$h_pass}}</h3>
+
+{{include file="field_password.tpl" field=$password1}}
+{{include file="field_password.tpl" field=$password2}}
+{{include file="field_password.tpl" field=$password3}}
+
+{{if $oid_enable}}
+{{include file="field_input.tpl" field=$openid}}
+{{/if}}
+
+<div class="settings-submit-wrapper" >
+<input type="submit" name="submit" class="settings-submit" value="{{$submit}}" />
+</div>
+
+
+<h3 class="settings-heading">{{$h_basic}}</h3>
+
+{{include file="field_input.tpl" field=$username}}
+{{include file="field_input.tpl" field=$email}}
+{{include file="field_password.tpl" field=$password4}}
+{{include file="field_custom.tpl" field=$timezone}}
+{{include file="field_select.tpl" field=$language}}
+{{include file="field_input.tpl" field=$defloc}}
+{{include file="field_checkbox.tpl" field=$allowloc}}
+
+
+<div class="settings-submit-wrapper" >
+<input type="submit" name="submit" class="settings-submit" value="{{$submit}}" />
+</div>
+
+
+<h3 class="settings-heading">{{$h_prv}}</h3>
+
+
+<input type="hidden" name="visibility" value="{{$visibility}}" />
+
+{{include file="field_input.tpl" field=$maxreq}}
+
+{{$profile_in_dir}}
+
+{{$profile_in_net_dir}}
+
+{{$hide_friends}}
+
+{{$hide_wall}}
+
+{{$blockwall}}
+
+{{$blocktags}}
+
+{{$suggestme}}
+
+{{$unkmail}}
+
+
+{{include file="field_input.tpl" field=$cntunkmail}}
+
+{{include file="field_input.tpl" field=$expire.days}}
+
+
+<div class="field input">
+       <span class="field_help"><a href="#advanced-expire-popup" id="advanced-expire" class='popupbox' title="{{$expire.advanced}}">{{$expire.label}}</a></span>
+       <div style="display: none;">
+               <div id="advanced-expire-popup" style="width:auto;height:auto;overflow:auto;">
+                       <h3>{{$expire.advanced}}</h3>
+                       {{include file="field_yesno.tpl" field=$expire.items}}
+                       {{include file="field_yesno.tpl" field=$expire.notes}}
+                       {{include file="field_yesno.tpl" field=$expire.starred}}
+                       {{include file="field_yesno.tpl" field=$expire.network_only}}
+               </div>
+       </div>
+
+</div>
+
+
+<div id="settings-default-perms" class="settings-default-perms" >
+       <a href="#settings-jot-acl-wrapper" id="settings-default-perms-menu" class='popupbox'>{{$permissions}} {{$permdesc}}</a>
+       <div id="settings-default-perms-menu-end"></div>
+
+{{*<!--        <div id="settings-default-perms-select" style="display: none; margin-bottom: 20px" >-->*}}
+
+       <div style="display: none;">
+               <div id="settings-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;margin-bottom: 20px">
+                       {{$aclselect}}
+               </div>
+       </div>
+
+{{*<!--        </div>-->*}}
+</div>
+<br/>
+<div id="settings-default-perms-end"></div>
+
+{{$group_select}}
+
+
+<div class="settings-submit-wrapper" >
+<input type="submit" name="submit" class="settings-submit" value="{{$submit}}" />
+</div>
+
+
+
+<h3 class="settings-heading">{{$h_not}}</h3>
+<div id="settings-notifications">
+
+<div id="settings-activity-desc">{{$activity_options}}</div>
+
+{{include file="field_checkbox.tpl" field=$post_newfriend}}
+{{include file="field_checkbox.tpl" field=$post_joingroup}}
+{{include file="field_checkbox.tpl" field=$post_profilechange}}
+
+
+<div id="settings-notify-desc">{{$lbl_not}}</div>
+
+<div class="group">
+{{include file="field_intcheckbox.tpl" field=$notify1}}
+{{include file="field_intcheckbox.tpl" field=$notify2}}
+{{include file="field_intcheckbox.tpl" field=$notify3}}
+{{include file="field_intcheckbox.tpl" field=$notify4}}
+{{include file="field_intcheckbox.tpl" field=$notify5}}
+{{include file="field_intcheckbox.tpl" field=$notify6}}
+{{include file="field_intcheckbox.tpl" field=$notify7}}
+{{include file="field_intcheckbox.tpl" field=$notify8}}
+</div>
+
+{{include file="field_checkbox.tpl" field=$email_textonly}}
+{{include file="field_checkbox.tpl" field=$detailed_notif}}
+
+</div>
+
+<div class="settings-submit-wrapper" >
+<input type="submit" name="submit" class="settings-submit" value="{{$submit}}" />
+</div>
+
+
+<h3 class="settings-heading">{{$h_advn}}</h3>
+<div id="settings-pagetype-desc">{{$h_descadvn}}</div>
+
+{{$pagetype}}
+
+<div class="settings-submit-wrapper" >
+<input type="submit" name="submit" class="settings-submit" value="{{$submit}}" />
+</div>
+
+
diff --git a/view/theme/frost-mobile/templates/settings_display_end.tpl b/view/theme/frost-mobile/templates/settings_display_end.tpl
deleted file mode 100644 (file)
index 14af582..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-       <script>$(function(){ previewTheme($("#id_{{$theme.0}}")[0]); });</script>
-
diff --git a/view/theme/frost/templates/settings-head.tpl b/view/theme/frost/templates/settings-head.tpl
deleted file mode 100644 (file)
index 5ba31db..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-<script>
-       window.isPublic = "{{$ispublic}}";
-</script>
-
diff --git a/view/theme/frost/templates/settings/display_end.tpl b/view/theme/frost/templates/settings/display_end.tpl
new file mode 100644 (file)
index 0000000..14af582
--- /dev/null
@@ -0,0 +1,2 @@
+       <script>$(function(){ previewTheme($("#id_{{$theme.0}}")[0]); });</script>
+
diff --git a/view/theme/frost/templates/settings/head.tpl b/view/theme/frost/templates/settings/head.tpl
new file mode 100644 (file)
index 0000000..5ba31db
--- /dev/null
@@ -0,0 +1,6 @@
+
+
+<script>
+       window.isPublic = "{{$ispublic}}";
+</script>
+
diff --git a/view/theme/frost/templates/settings_display_end.tpl b/view/theme/frost/templates/settings_display_end.tpl
deleted file mode 100644 (file)
index 14af582..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-       <script>$(function(){ previewTheme($("#id_{{$theme.0}}")[0]); });</script>
-