Commit 5bdcfab8 authored by Penny Leach's avatar Penny Leach
Browse files

account settings page starting

parent cb0a4d58
......@@ -29,9 +29,73 @@ define('MENUITEM', 'account');
define('SUBMENUITEM', 'accountprefs');
require(dirname(dirname(__FILE__)) . '/init.php');
require('form.php');
$smarty = smarty();
// load up user preferences
$prefs = (object)($SESSION->get('accountprefs'));
$prefsform = array(
'name' => 'accountprefs',
'method' => 'post',
'ajaxpost' => true,
'plugintype ' => 'core',
'pluginname' => 'account',
'elements' => array(
'friendscontrol' => array(
'type' => 'radio',
'value' => $prefs->friendscontrol,
'title' => get_string('friendsdescr', 'account'),
'separator' => HTML_BR,
'options' => array(
'nobody' => get_string('friendsnobody', 'account'),
'auth' => get_string('friendsauth', 'account'),
'auto' => get_string('friendsauto', 'account')
),
'rules' => array(
'required' => true
)
),
'wysiwyg' => array(
'type' => 'radio',
'value' => $prefs->wysiwyg,
'title' => get_string('wysiwygdescr', 'account'),
'options' => array(
1 => get_string('on', 'account'),
0 => get_string('off', 'account'),
),
'rules' => array(
'required' => true
)
),
'messages' => array(
'type' => 'radio',
'value' => $prefs->messages,
'title' => get_string('messagesdescr', 'account'),
'options' => array(
'nobody' => get_string('messagesnobody', 'account'),
'friends' => get_string('messagesfriends', 'account'),
'allow' => get_string('messagesallow', 'account'),
),
'rules' => array(
'required' => true
)
),
'submit' => array(
'type' => 'submit',
'value' => get_string('save'),
),
),
);
$smarty = smarty();
$smarty->assign('form', form($prefsform));
$smarty->display('account/index.tpl');
function accountprefs_submit($values) {
}
?>
<?php
/**
* This program is part of Mahara
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* @package mahara
* @subpackage core
* @author Penny Leach <penny@catalyst.net.nz>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2006,2007 Catalyst IT Ltd http://catalyst.net.nz
*
*/
defined('INTERNAL') || die();
$string['friendsnobody'] = 'Nobody may add me as a friend';
$string['friendsauth'] = 'New friends require my authorisation';
$string['friendsauto'] = 'New friends are automatically authorised';
$string['friendsdescr'] = 'Friends control';
$string['wysiwygdescr'] = 'Rich text editor';
$string['on'] = 'On';
$string['off'] = 'Off';
$string['messagesdescr'] = 'Messages from other users';
$string['messagesnobody'] = 'Allow no-one to message me';
$string['messagesfriends'] = 'Allow people on my friends list to message me';
$string['messagesallow'] = 'Allow anyone to message me';
?>
......@@ -5,7 +5,7 @@
<h2>{str tag="account"}</h2>
<div class="content">
Content from database here
{$form}
</div>
{include file="footer.tpl"}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment