Commit 3c640c9e authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1684267: Adding new templates to the raw_old theme



As well as adding some changes to raw_old that make sense to be there
from these bugs:
Bug 1681588
Bug 1451263
Bug 1675213
Bug 1674801
Bug 1661125
Bug 1658389

behatnotneeded

Change-Id: I62042f1279ca96ac17c8e2fef11f60ecbcaf04c6
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 119598f1
......@@ -15,8 +15,7 @@ echo $form_tag;
<div class="form-group">
<label><?php echo $elements[$field]['labelhtml']; ?></label>
<?php echo $elements[$field]['html']; ?>
<?php if ($elements[$field]['error']) { ?>
<?php if (isset($elements[$field]['error'])) { ?>
<p class="text-danger"><?php echo $elements[$field]['error']; ?></p>
<?php } ?>
</div>
......@@ -31,7 +30,7 @@ echo $form_tag;
<input type="radio" name="createmethod" class="ic"<?php if (isset($_POST['createmethod']) && $_POST['createmethod'] == 'leap2a') { ?> checked="checked"<?php } ?> id="uploadleap" value="leap2a"> <label for="uploadleap"><?php echo get_string('uploadleap2afile', 'admin'); ?></label> <?php echo get_help_icon('core', 'admin', 'adduser', 'leap2afile'); ?>
</div>
<?php echo $elements['leap2afile']['html']; ?>
<?php if ($elements['leap2afile']['error']) { ?>
<?php if (isset($elements['leap2afile']['error'])) { ?>
<div class="errmsg"><?php echo $elements['leap2afile']['error']; ?></div>
<?php } ?>
</div>
......@@ -93,7 +92,9 @@ echo $form_tag;
$accountprefs = array_keys(general_account_prefs_form_elements($accountprefs));
$fieldset_elements = array();
foreach ($accountprefs as $p) {
$fieldset_elements[] = $elements[$p];
if (isset($elements[$p])) {
$fieldset_elements[] = $elements[$p];
}
}
$accountoptions_fieldset = array(
......
......@@ -15,8 +15,7 @@ echo $form_tag;
<div class="form-group">
<label><?php echo $elements[$field]['labelhtml']; ?></label>
<?php echo $elements[$field]['html']; ?>
<?php if ($elements[$field]['error']) { ?>
<?php if (isset($elements[$field]['error'])) { ?>
<p class="text-danger"><?php echo $elements[$field]['error']; ?></p>
<?php } ?>
</div>
......@@ -31,7 +30,7 @@ echo $form_tag;
<input type="radio" name="createmethod" class="ic"<?php if (isset($_POST['createmethod']) && $_POST['createmethod'] == 'leap2a') { ?> checked="checked"<?php } ?> id="uploadleap" value="leap2a"> <label for="uploadleap"><?php echo get_string('uploadleap2afile', 'admin'); ?></label> <?php echo get_help_icon('core', 'admin', 'adduser', 'leap2afile'); ?>
</div>
<?php echo $elements['leap2afile']['html']; ?>
<?php if ($elements['leap2afile']['error']) { ?>
<?php if (isset($elements['leap2afile']['error'])) { ?>
<div class="errmsg"><?php echo $elements['leap2afile']['error']; ?></div>
<?php } ?>
</div>
......@@ -93,7 +92,9 @@ echo $form_tag;
$accountprefs = array_keys(general_account_prefs_form_elements($accountprefs));
$fieldset_elements = array();
foreach ($accountprefs as $p) {
$fieldset_elements[] = $elements[$p];
if (isset($elements[$p])) {
$fieldset_elements[] = $elements[$p];
}
}
$accountoptions_fieldset = array(
......
{foreach $views as item=view}
<li class="list-group-item">
<h4 class="title list-group-item-heading">
<a href="{$view.fullurl}">
{$view.title}
</a>
</h4>
{if $view.sharedby}
<div class="groupuserdate text-small">
{if $view.group && $loggedin}
<a class="inner-link" href="{group_homepage_url($view.groupdata)}">{$view.sharedby}</a>
{elseif $view.owner && $loggedin}
{if $view.anonymous}
{if $view.staff_or_admin}
{assign var='realauthor' value=$view.sharedby}
{assign var='realauthorlink' value=profile_url($view.user)}
{/if}
{assign var='author' value=get_string('anonymoususer')}
{include file=author.tpl}
{else}
<a class="inner-link" href="{profile_url($view.user)}">{$view.sharedby}</a>
{/if}
{else}
{$view.sharedby}
{/if}
<span class="postedon text-midtone">
- {str tag=Updated} {$view.mtime|strtotime|format_date:'strftimedatetime'}
</span>
</div>
{/if}
</li>
{/foreach}
{foreach $views as item=owner}
<li class="list-group-item">
<h4 class="title list-group-item-heading">
<span class="icon icon-user"></span>
<b>{$owner[0].sharedby}</b>
</h4>
</li>
{foreach $owner as item=view}
<li class="list-group-item">
<a href="{$view.fullurl}" class=" outer-link watchlist-showview">
<span class="sr-only">{$view.title}</span>
</a>
<h4 class="title list-group-item-heading">
{$view.title}
</h4>
{if $view.sharedby}
<div class="groupuserdate text-small">
{if $view.group && $loggedin}
<a class="inner-link" href="{group_homepage_url($view.groupdata)}">{$view.sharedby}</a>
{elseif $view.owner && $loggedin}
{if $view.anonymous}
{if $view.staff_or_admin}
{assign var='realauthor' value=$view.sharedby}
{assign var='realauthorlink' value=profile_url($view.user)}
{/if}
{assign var='author' value=get_string('anonymoususer')}
{include file=author.tpl}
{else}
<a class="inner-link" href="{profile_url($view.user)}">{$view.sharedby}</a>
{/if}
{else}
{$view.sharedby}
{/if}
<span class="postedon text-midtone">
- {str tag=Updated} {$view.mtime|strtotime|format_date:'strftimedatetime'}
</span>
</div>
{/if}
</li>
{/foreach}
{/foreach}
......@@ -50,6 +50,10 @@
margin-left: -1px;
}
.form-as-button.btn-first {
margin-right: -1px;
}
.group-item,
.btn-group-item {
&.btn,
......
......@@ -42,7 +42,7 @@
<div class="btn-group btn-group-top{if $siteadmin && $countinstitutions == 1} only-button{/if}">
{if $siteadmin}
<form class="form-as-button pull-left" action="" method="post">
<form class="form-as-button pull-left btn-first" action="" method="post">
<button class="submit btn btn-default" type="submit" name="add" value="{str tag="addinstitution" section="admin"}" id="admininstitution_add">
<span class="icon icon-plus icon-lg left" role="presentation" aria-hidden="true"></span>
<span class="btn-title">{str tag="addinstitution" section="admin"}</span>
......
......@@ -3,6 +3,11 @@
<thead>
<th>{str tag=pendingregistration section=admin}</th>
<th>{str tag=registrationreason section=admin}</th>
{if $extracols}
{foreach from=$extracols key=colkey item=col}
<th>{str tag=$colkey section=mahara}</th>
{/foreach}
{/if}
<th>&nbsp;</th>
</thead>
<tbody>
......@@ -17,6 +22,13 @@
<td class="pendinginfo">
<div class="detail">{$registration->reason}</div>
</td>
{if $extracols}
{foreach from=$extracols key=colkey item=col}
<td>
<div class="detail">{if property_exists($registration->extra, $colkey)}{$registration->extra->$colkey}{/if}</div>
</td>
{/foreach}
{/if}
<td class="">
<div class="btn-group">
<a class="btn btn-default btn-xs" href="{$WWWROOT}admin/users/actionregistration.php?r={$registration->id}&action=approve">
......
......@@ -20,15 +20,18 @@
var {{$name}}_newref = null;
function {{$name}}_addedemail() {
jQuery("#{{$name}}_newrefinput").remove();
jQuery("#{{$name}}_newref").remove();
var newEmail = {{$name}}_newrefinput.value;
// Are jQuery objects here so can deal with them directly
var newEmail = {{$name}}_newrefinput.val();
if (typeof(newEmail) == 'string' && newEmail.length > 0) {
if (newEmail.length > 255) {
alert(get_string('emailtoolong'));
}
else if (newEmail.indexOf("@") == -1 || newEmail.indexOf(".") == -1) {
alert(get_string('emailinvalid'));
}
else {
var email = {{$name}}_newrefinput.value;
var email = newEmail;
jQuery('#{{$name}}_list').append(jQuery('<div>', {'class': 'unsent'}).append(
jQuery('<input>', {'type': 'hidden', 'name': '{{$name}}_unsent[]' , 'value': email}),
' ',
......@@ -43,10 +46,12 @@
var form = jQuery(this).closest('form')[0];
formchangemanager.setFormState(form, FORM_CHANGED);
}
{{$name}}_newrefinput.remove();
{{$name}}_newref.remove();
{{$name}}_newrefinput = null;
{{$name}}_newref = null;
}
}
{{$name}}_newrefinput = null;
{{$name}}_newref = null;
}
function {{$name}}_new() {
......@@ -77,14 +82,11 @@
}
function {{$name}}_remove(x) {
var div = x.parentNode;
var radio = filter(
function(elem) { return jQuery(elem).prop('type') === 'radio'; },
jQuery(div).find('input')
);
var delbtn = jQuery(x);
var div = delbtn.closest('div');
var radio = div.find('[type=radio]');
if (radio[0] && radio[0].checked) {
if (radio.length && radio.is(':checked')) {
alert(get_string('cannotremovedefaultemail'));
return;
}
......@@ -94,7 +96,7 @@
formchangemanager.setFormState(form, FORM_CHANGED);
}
jQuery(x.parentNode).remove();
div.remove();
}
</script>
<div id="{{$name}}_list" class="{{$name}}-list email-list">
......
<div id="{{$id}}-container" data-rating="{{$value}}">{{if !$readonly}}<input type=hidden name="rating" id="{{$id}}">{{/if}}</div>
<div id="{{$id}}_wrapper" data-rating="{{$value}}"></div>
{{if !$readonly}}<input type=hidden name="rating" id="{{$id}}">{{/if}}
<script type="application/javascript">
jQuery(document).ready(function() {
jQuery("#{{$id}}-container").rating('create', {
jQuery("#{{$id}}_wrapper").rating('create', {
coloron:'{{$colouron}}',
coloroff:'{{$colouroff}}',
glyph:'icon-{{$icon}}',
......
......@@ -81,7 +81,7 @@
</select>
</div>
<span class="picker input-short{% if (!o.presets.role) { %} hidden{% } %}">
<select data-roles="grouproles" name="accesslist[{%=o.id%}][role]" class="form-control input-small select" {% if (o.presets.role) { %}disabled{% } %}>
<select data-roles="grouproles" name="accesslist[{%=o.id%}][role]" class="form-control input-small select">
{% if (o.presets.role) { %}<option value="{%=o.presets.role%}" selected>{%=o.presets.roledisplay%}</option>{% } %}
</select>
</span>
......
......@@ -36,11 +36,13 @@
<span class="btn-title">{str tag=settings}</span>
<span class="sr-only">{str(tag=editspecific arg1=$group->name)|escape:html|safe}</span>
</a>
{if $cancopy}
<a href="{$WWWROOT}group/copy.php?id={$group->id}&return=mygroups" title="{str(tag=copygroup section=group arg1=$group->name)|escape:html|safe}" class="btn btn-default">
<span class="icon icon-clone text-default" role="presentation" aria-hidden="true"></span>
<span class="btn-title">{str tag=copy}</span>
<span class="sr-only">{str(tag=copygroup section=group arg1=$group->name)|escape:html|safe}</span>
</a>
{/if}
<a href="{$WWWROOT}group/delete.php?id={$group->id}" title="{str(tag=deletespecific arg1=$group->name)|escape:html|safe}" class="btn btn-default">
<span class="icon icon-trash text-danger" role="presentation" aria-hidden="true"></span>
<span class="btn-title">{str tag=delete}</span>
......
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