Commit 2e79b021 authored by Martyn Smith's avatar Martyn Smith Committed by Martyn Smith
Browse files
parents 4a6762d6 63d51191
......@@ -170,7 +170,7 @@ function upload_submit(Pieform $form, $values) {
// Entry in artefact table
$artefact = new ArtefactTypeProfileIcon();
$artefact->set('owner', $USER->get('id'));
$artefact->set('title', $values['title']);
$artefact->set('title', ($values['title']) ? $values['title'] : $values['file']['name']);
$artefact->set('note', $values['file']['name']);
$artefact->commit();
......
......@@ -85,8 +85,8 @@ if (!$USER->is_logged_in()) {
'value' => get_string('login')
),
'register' => array(
'value' => '<div><a href="' . get_config('wwwroot') . 'register.php">' . get_string('register') . '</a>'
. '<br><a href="' . get_config('wwwroot') . 'forgotpass.php">' . get_string('passwordreminder') . '</a></div>'
'value' => '<div><a href="' . get_config('wwwroot') . 'register.php" tabindex="2">' . get_string('register') . '</a>'
. '<br><a href="' . get_config('wwwroot') . 'forgotpass.php" tabindex="2">' . get_string('passwordreminder') . '</a></div>'
)
)
)));
......
......@@ -144,6 +144,9 @@ $string['yournewpasswordagain'] = 'Your new password again';
$string['invalidsesskey'] = 'Invalid session key';
$string['cantremovedefaultemail'] = 'You cannot remove your primary email address';
$string['mustspecifyoldpassword'] = 'You must specify your old password';
$string['captchatitle'] = 'CAPTCHA Image';
$string['captchadescription'] = 'Enter the characters you see in the picture to the right. Letters are not case sensitive';
$string['captchaincorrect'] = 'Enter the letters as they are shown in the image';
// Misc. register stuff that could be used elsewhere
$string['emailaddress'] = 'Email address';
......@@ -362,7 +365,7 @@ $string['allusers'] = 'All users';
$string['addedtowatchlist'] = 'This %s has been added to your watchlist';
$string['addfeedbackfailed'] = 'Add feedback failed';
$string['addtowatchlist'] = 'Add %s to watchlist';
$string['addtowatchlistwithchildren'] = 'Add %s and children to watchlist';
$string['addtowatchlistwithchildren'] = 'Add entire %s contents to watchlist';
$string['alreadyinwatchlist'] = 'This %s is already in your watchlist';
$string['complaint'] = 'Complaint';
$string['date'] = 'Date';
......
......@@ -46,12 +46,6 @@ if (is_logged_in()) {
redirect('/');
}
// @todo stuff to do for registration:
// - captcha image for step 1
// - show mandatory profile fields as configured sitewide. Relies on penny
// doing profile database work (internal artefact)
// - allow uploading of optional profile icon. requires profile stuffs
// Step two of registration (first as it's the easiest): the user has
// registered, show them a screen telling them this.
if (!empty($_SESSION['registered'])) {
......@@ -100,7 +94,7 @@ if (isset($_REQUEST['key'])) {
// Entry in artefact table
$artefact = new ArtefactTypeProfileIcon();
$artefact->set('owner', $registration->id);
$artefact->set('title', $values['profileimgtitle']);
$artefact->set('title', ($values['profileimgtitle']) ? $values['profileimgtitle'] : $values['profileimg']['name']);
$artefact->set('note', $values['profileimg']['name']);
$artefact->commit();
......@@ -325,6 +319,7 @@ $elements['tandc'] = array(
$elements['captcha'] = array(
'type' => 'html',
'title' => get_string('captchatitle'),
'description' => get_string('captchadescription'),
'value' => '<img src="' . get_config('wwwroot') . 'captcha.php" alt="' . get_string('captchaimage') . '" style="padding: 2px 0;"><br>'
. '<input type="text" class="text required" name="captcha" style="width: 137px;" tabindex="3">',
'rules' => array('required' => true)
......
......@@ -1324,7 +1324,7 @@ span.block_targetted, div.block_targetted {
font-weight: bold;
padding: 0 0 3px 0;
text-align: right;
width: 137px;
width: 140px;
}
#createview4 #createview4_accesslist_container {
......
......@@ -52,22 +52,24 @@ function renderAccessListItem(item) {
makeCalendarLink(item, 'stop')
);
var row = TABLE(null,
TR(null,
TH(null, item.name),
TD({'class': 'right'}, removeButton)
),
TR(null,
TD({'colspan': 2},
dateDiv,
INPUT({
'type': 'hidden',
'name': 'accesslist[' + count + '][type]',
'value': item.type
}),
INPUT({
'type': 'hidden',
'name': 'accesslist[' + count + '][id]',
'value': item.id})
TBODY(null,
TR(null,
TH(null, item.name),
TD({'class': 'right'}, removeButton)
),
TR(null,
TD({'colspan': 2},
dateDiv,
INPUT({
'type': 'hidden',
'name': 'accesslist[' + count + '][type]',
'value': item.type
}),
INPUT({
'type': 'hidden',
'name': 'accesslist[' + count + '][id]',
'value': item.id})
)
)
)
);
......
{include file="header.tpl"}
<div id="column-right">
{include file="adminmenu.tpl"}
</div>
{include file="columnleftstart.tpl"}
{include file="columnfullstart.tpl"}
{if $EDITMODE}
<h2>{str tag="editmetadata" section="view"}</h2>
{else}
<h2>{str tag="createviewstep1" section="view"}</h2>
{/if}
{$createview1}
{include file="columnleftend.tpl"}
{include file="columnfullend.tpl"}
{include file="footer.tpl"}
......@@ -63,8 +63,6 @@ function createview4_submit(Pieform $form, $values) {
redirect(get_config('wwwroot') . 'view/create3.php?createid=' . $createid);
}
db_begin();
$time = db_format_timestamp(time());
......
Supports Markdown
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