diff options
Diffstat (limited to 'views')
36 files changed, 221 insertions, 201 deletions
diff --git a/views/default/admin/appearance/profile_fields/list.php b/views/default/admin/appearance/profile_fields/list.php index f4ff1e986..b9440a95d 100644 --- a/views/default/admin/appearance/profile_fields/list.php +++ b/views/default/admin/appearance/profile_fields/list.php @@ -26,8 +26,7 @@ if ($fieldlist) { } } ?> -<div id="list"> - <ul id="sortable_profile_fields"> +<ul id="elgg-profile-fields" class="mvm"> <?php $save = elgg_echo('save'); @@ -53,8 +52,4 @@ HTML; } ?> - </ul> -</div> -<div id="tempList"></div> - -<input name="sortableListOrder" type="hidden" id="sortableListOrder" value="<?php echo $fieldlist; ?>" />
\ No newline at end of file +</ul>
\ No newline at end of file diff --git a/views/default/admin/plugins.php b/views/default/admin/plugins.php index 451936335..5bd0dd55d 100644 --- a/views/default/admin/plugins.php +++ b/views/default/admin/plugins.php @@ -93,7 +93,7 @@ switch ($sort) { case 'alpha': $plugin_list = array(); foreach ($installed_plugins as $plugin) { - $plugin_list[$plugin->getManifest()->getName()] = $plugin; + $plugin_list[$plugin->getFriendlyName()] = $plugin; } ksort($plugin_list); break; diff --git a/views/default/css/admin.php b/views/default/css/admin.php index 72c3692e9..73996a199 100644 --- a/views/default/css/admin.php +++ b/views/default/css/admin.php @@ -506,6 +506,15 @@ a.elgg-button { text-decoration: none; } +.elgg-form-useradd input[type=text], +.elgg-form-useradd input[type=password] { + width: 300px; +} + +.elgg-form-settings { + max-width: 600px; +} + /* ************************************** DATE PICKER *************************************** */ diff --git a/views/default/css/elements/forms.php b/views/default/css/elements/forms.php index 83ec2f602..d14c341a7 100644 --- a/views/default/css/elements/forms.php +++ b/views/default/css/elements/forms.php @@ -77,9 +77,8 @@ input[type="radio"] { padding-right: 10px; } -.elgg-form-account input[type="text"], -.elgg-form-account input[type="password"] { - width: 300px; +.elgg-form-login, .elgg-form-account { + max-width: 450px; } /* *************************************** @@ -235,19 +234,51 @@ input[type="radio"] { } /* *************************************** - USER PICKER + AUTOCOMPLETE *************************************** */ +<?php //autocomplete will expand to fullscreen without max-width ?> +.ui-autocomplete { + position: absolute; + cursor: default; +} +.elgg-autocomplete-item .elgg-body { + max-width: 600px; +} +.ui-autocomplete { + background-color: white; + border: 1px solid #ccc; + overflow: hidden; + + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.ui-autocomplete .ui-menu-item { + padding: 0px 4px; + + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.ui-autocomplete .ui-menu-item:hover { + background-color: #eee; +} +.ui-autocomplete a:hover { + text-decoration: none; + color: #4690D6; +} -.user-picker .user-picker-entry { - clear:both; - height:25px; - padding:5px; - margin-top:5px; - border-bottom:1px solid #cccccc; +/* *************************************** + USER PICKER +*************************************** */ +.elgg-user-picker-list li:first-child { + border-top: 1px dotted #ccc; + margin-top: 5px; } -.user-picker-entry .elgg-button-delete { - margin-right:10px; +.elgg-user-picker-list > li { + border-bottom: 1px dotted #ccc; } + /* *************************************** DATE PICKER **************************************** */ diff --git a/views/default/css/elements/misc.php b/views/default/css/elements/misc.php index ebac2b91f..d9622d34a 100644 --- a/views/default/css/elements/misc.php +++ b/views/default/css/elements/misc.php @@ -18,7 +18,7 @@ #avatar-croppingtool { border-top: 1px solid #ccc; } -#user-avatar { +#user-avatar-cropper { float: left; } #user-avatar-preview { diff --git a/views/default/css/walled_garden.php b/views/default/css/walled_garden.php index 75bf0f29e..47850425b 100644 --- a/views/default/css/walled_garden.php +++ b/views/default/css/walled_garden.php @@ -28,6 +28,10 @@ $url = elgg_get_site_url(); margin: 35px 15px 15px 35px; } +#elgg-walledgarden-intro ul { + float: left; +} + #elgg-walledgarden-login { width: 230px; float: left; diff --git a/views/default/forms/avatar/crop.php b/views/default/forms/avatar/crop.php index 1f39ff73c..f622fd60f 100644 --- a/views/default/forms/avatar/crop.php +++ b/views/default/forms/avatar/crop.php @@ -6,13 +6,17 @@ */ elgg_load_js('jquery.imgareaselect'); +elgg_load_js('elgg.avatar_cropper'); elgg_load_css('jquery.imgareaselect'); $master_image = $vars['entity']->getIconUrl('master'); ?> <div class="clearfix"> - <img id="user-avatar" class="mrl" src="<?php echo $master_image; ?>" alt="<?php echo elgg_echo('avatar'); ?>" /> + <img id="user-avatar-cropper" class="mrl" src="<?php echo $master_image; ?>" alt="<?php echo elgg_echo('avatar'); ?>" /> + <div id="user-avatar-preview-title"><label><?php echo elgg_echo('avatar:preview'); ?></label></div> + <div id="user-avatar-preview"><img src="<?php echo $master_image; ?>" /></div> + </div> <div class="elgg-foot"> <?php @@ -27,47 +31,3 @@ echo elgg_view('input/submit', array('value' => elgg_echo('avatar:create'))); ?> </div> -<!-- grab the required js for icon cropping --> -<?php //@todo JS 1.8: no ?> -<script type="text/javascript"> - - // display a preview of the users cropped section - function preview(img, selection) { - // catch for the first click on the image - if (selection.width == 0 || selection.height == 0) { - return; - } - - var origWidth = $("#user-avatar").width(); //get the width of the users master photo - var origHeight = $("#user-avatar").height(); //get the height of the users master photo - var scaleX = 100 / selection.width; - var scaleY = 100 / selection.height; - $('#user-avatar-preview > img').css({ - width: Math.round(scaleX * origWidth) + 'px', - height: Math.round(scaleY * origHeight) + 'px', - marginLeft: '-' + Math.round(scaleX * selection.x1) + 'px', - marginTop: '-' + Math.round(scaleY * selection.y1) + 'px' - }); - } - - function selectChange(img, selection) { - // populate the form with the correct coordinates once a user has cropped their image - $('input[name=x1]').val(selection.x1); - $('input[name=x2]').val(selection.x2); - $('input[name=y1]').val(selection.y1); - $('input[name=y2]').val(selection.y2); - } - - $(document).ready(function() { - $('<div id="user-avatar-preview"><img src="<?php echo $master_image; ?>" /></div>').insertAfter($('#user-avatar')); - $('<div id="user-avatar-preview-title"><label><?php echo elgg_echo('avatar:preview'); ?></label></div>').insertBefore($('#user-avatar-preview')); - - // init the cropping - $('#user-avatar').imgAreaSelect({ - selectionOpacity: 0, - aspectRatio: '1:1', - onSelectEnd: selectChange, - onSelectChange: preview - }); - }); -</script> diff --git a/views/default/forms/profile/fields/add.php b/views/default/forms/profile/fields/add.php index bd58ae381..1ea9c57a9 100644 --- a/views/default/forms/profile/fields/add.php +++ b/views/default/forms/profile/fields/add.php @@ -20,8 +20,8 @@ $type_control = elgg_view('input/dropdown', array('name' => 'type', 'options_val $submit_control = elgg_view('input/submit', array('name' => elgg_echo('add'), 'value' => elgg_echo('add'))); $formbody = <<< END - <div class="elgg-foot">$label_text: $label_control - $type_text: $type_control + <div>$label_text: $label_control</div> + <div class="elgg-foot">$type_text: $type_control $submit_control</div> END; diff --git a/views/default/forms/widgets/save.php b/views/default/forms/widgets/save.php index 4ba911cb5..6959b2a82 100644 --- a/views/default/forms/widgets/save.php +++ b/views/default/forms/widgets/save.php @@ -14,7 +14,7 @@ $custom_form_section = elgg_view($edit_view, array('entity' => $widget)); $access = ''; if ($show_access) { - $access = elgg_view('input/access', array( + $access = elgg_echo('access') . ': ' . elgg_view('input/access', array( 'name' => 'params[access_id]', 'value' => $widget->access_id, )); @@ -38,4 +38,4 @@ $body = <<<___END </div> ___END; -echo $body;
\ No newline at end of file +echo $body; diff --git a/views/default/input/autocomplete.php b/views/default/input/autocomplete.php index 421541e24..e58eb1ae8 100644 --- a/views/default/input/autocomplete.php +++ b/views/default/input/autocomplete.php @@ -8,7 +8,7 @@ * @todo This currently only works for ONE AUTOCOMPLETE TEXT FIELD on a page. * * @uses $vars['value'] Current value for the text input - * @uses $vars['match_on'] Array | str What to match on. all|array(groups|users|friends|subtype) + * @uses $vars['match_on'] Array | str What to match on. all|array(groups|users|friends) * @uses $vars['match_owner'] Bool. Match only entities that are owned by logged in user. * @uses $vars['class'] Additional CSS class */ @@ -26,15 +26,19 @@ $defaults = array( $vars = array_merge($defaults, $vars); -$ac_url_params = http_build_query(array( - 'match_on' => $vars['match_on'], - 'match_owner' => $vars['match_owner'], -)); - -unset($vars['match_on']); -unset($vars['match_owner']); +$params = array(); +if (isset($vars['match_on'])) { + $params['match_on'] = $vars['match_on']; + unset($vars['match_on']); +} +if (isset($vars['match_owner'])) { + $params['match_owner'] = $vars['match_owner']; + unset($vars['match_owner']); +} +$ac_url_params = http_build_query($params); elgg_load_js('elgg.autocomplete'); +elgg_load_js('jquery.ui.autocomplete.html'); ?> diff --git a/views/default/input/reset.php b/views/default/input/reset.php index 12866421e..082da8669 100644 --- a/views/default/input/reset.php +++ b/views/default/input/reset.php @@ -4,8 +4,11 @@ * * @package Elgg * @subpackage Core + * + * @uses $vars['class'] CSS class that replaces elgg-button-cancel */ $vars['type'] = 'reset'; +$vars['class'] = elgg_extract('class', $vars, 'elgg-button-cancel'); echo elgg_view('input/button', $vars);
\ No newline at end of file diff --git a/views/default/input/submit.php b/views/default/input/submit.php index 64b135afa..df369b3b4 100644 --- a/views/default/input/submit.php +++ b/views/default/input/submit.php @@ -4,6 +4,8 @@ * * @package Elgg * @subpackage Core + * + * @uses $vars['class'] CSS class that replaces elgg-button-submit */ $vars['type'] = 'submit'; diff --git a/views/default/input/userpicker.php b/views/default/input/userpicker.php index b852d24fc..5c4b297b1 100644 --- a/views/default/input/userpicker.php +++ b/views/default/input/userpicker.php @@ -9,14 +9,14 @@ * * The name of the hidden fields is members[] * - * Defaults to lazy load user lists in paginated alphabetical order. User needs + * @warning Only a single input/userpicker is supported per web page. + * + * Defaults to lazy load user lists in alphabetical order. User needs * to type two characters before seeing the user popup list. * - * As users are checked they move down to a "users" box. + * As users are selected they move down to a "users" box. * When this happens, a hidden input is created with the * name of members[] and a value of the GUID. - * - * @warning: this is not stable */ elgg_load_js('elgg.userpicker'); @@ -24,18 +24,18 @@ elgg_load_js('elgg.userpicker'); function user_picker_add_user($user_id) { $user = get_entity($user_id); if (!$user || !($user instanceof ElggUser)) { - return FALSE; + return false; } - $icon = $user->getIconURL('tiny'); - - $code = '<li class="elgg-image-block">'; - $code .= "<div class='elgg-image'><img class=\"livesearch_icon\" src=\"$icon\" /></div>"; - $code .= "<div class='elgg-image-alt'><a onclick='elgg.userpicker.removeUser(this, $user_id)'><strong>X</strong></a></div>"; - $code .= "<div class='elgg-body'>"; - $code .= "$user->name - $user->username"; - $code .= "<input type=\"hidden\" name=\"members[]\" value=\"$user_id\">"; + $icon = elgg_view_entity_icon($user, 'tiny', array('hover' => false)); + + // this html must be synced with the userpicker.js library + $code = '<li><div class="elgg-image-block">'; + $code .= "<div class='elgg-image'>$icon</div>"; + $code .= "<div class='elgg-image-alt'><a href='#' class='elgg-userpicker-remove'>X</a></div>"; + $code .= "<div class='elgg-body'>" . $user->name . "</div>"; $code .= "</div>"; + $code .= "<input type=\"hidden\" name=\"members[]\" value=\"$user_id\">"; $code .= '</li>'; return $code; @@ -62,9 +62,11 @@ foreach ($vars['value'] as $user_id) { ?> <div class="elgg-user-picker"> <input type="text" class="elgg-input-user-picker" size="30"/> - <label><input type="checkbox" name="match_on" value="true" /><?php echo elgg_echo('userpicker:only_friends'); ?></label> - <ul class="elgg-user-picker-entries"><?php echo $user_list; ?></ul> + <input type="checkbox" name="match_on" value="true" /> + <label><?php echo elgg_echo('userpicker:only_friends'); ?></label> + <ul class="elgg-user-picker-list"><?php echo $user_list; ?></ul> </div> <script type="text/javascript"> + // @todo grab the values in the init function rather than using inline JS elgg.userpicker.userList = <?php echo $json_values ?>; </script>
\ No newline at end of file diff --git a/views/default/js/admin.php b/views/default/js/admin.php index 253a73887..d4dd06822 100644 --- a/views/default/js/admin.php +++ b/views/default/js/admin.php @@ -42,7 +42,7 @@ elgg.admin.init = function () { }); // draggable profile field reordering. - $('#sortable_profile_fields').sortable({ + $('#elgg-profile-fields').sortable({ items: 'li', handle: 'span.elgg-state-draggable', stop: elgg.admin.moveProfileField @@ -143,7 +143,7 @@ elgg.admin.editProfileField = function(value, settings) { * @return void */ elgg.admin.moveProfileField = function(e, ui) { - var orderArr = $('#sortable_profile_fields').sortable('toArray'); + var orderArr = $('#elgg-profile-fields').sortable('toArray'); var orderStr = orderArr.join(','); elgg.action('profile/fields/reorder', { diff --git a/views/default/object/default.php b/views/default/object/default.php index a9c3e15ca..110648304 100644 --- a/views/default/object/default.php +++ b/views/default/object/default.php @@ -46,4 +46,4 @@ $params = array( $params = $params + $vars; $body = elgg_view('object/elements/summary', $params); -echo elgg_view_image_block($icon, $body); +echo elgg_view_image_block($icon, $body, $vars); diff --git a/views/default/object/elements/full.php b/views/default/object/elements/full.php new file mode 100644 index 000000000..4a2991442 --- /dev/null +++ b/views/default/object/elements/full.php @@ -0,0 +1,45 @@ +<?php +/** + * Object full rendering + * + * Sample output + * <h2>Title</h3> + * <div class="elgg-content"> + * <div class="elgg-image-block"> + * </div> + * <div class="elgg-output"> + * </div> + * </div> + * + * @uses $vars['entity'] ElggEntity + * @uses $vars['title'] Title (false for no title) + * @uses $vars['icon'] HTML for the content icon + * @uses $vars['summary'] HTML for the content summary + * @uses $vars['body'] HTML for the content body + * @uses $vars['class'] Optional additional class for the content wrapper + */ + +$title = elgg_extract('title', $vars); +$icon = elgg_extract('icon', $vars); +$summary = elgg_extract('summary', $vars); +$body = elgg_extract('body', $vars); +$class = elgg_extract('class', $vars); +if ($class) { + $class = "elgg-content $class"; +} else { + $class = "elgg-content"; +} + +if ($title) { + $title = elgg_view_title($title); +} + +$header = elgg_view_image_block($icon, $summary); + +echo <<<HTML +$title +<div class="$class"> +$header +$body +</div> +HTML; diff --git a/views/default/object/elements/summary.php b/views/default/object/elements/summary.php index 3ca4de2be..8d82bc52a 100644 --- a/views/default/object/elements/summary.php +++ b/views/default/object/elements/summary.php @@ -49,6 +49,9 @@ if ($metadata) { echo "<h3>$title_link</h3>"; echo "<div class=\"elgg-subtext\">$subtitle</div>"; echo $tags; + +echo elgg_view('object/summary/extend', $vars); + if ($content) { echo "<div class=\"elgg-content\">$content</div>"; } diff --git a/views/default/page/components/module.php b/views/default/page/components/module.php index f7b9da59c..b1198ee9a 100644 --- a/views/default/page/components/module.php +++ b/views/default/page/components/module.php @@ -42,6 +42,8 @@ if (isset($vars['footer'])) { if ($vars['footer']) { $footer = "<div class=\"elgg-foot\">$footer</div>"; } +} else { + $footer = "<div class=\"elgg-foot\"></div>"; } $contents = $header . $body . $footer; diff --git a/views/default/page/walled_garden.php b/views/default/page/walled_garden.php index 95d17fcff..62d8bb077 100644 --- a/views/default/page/walled_garden.php +++ b/views/default/page/walled_garden.php @@ -31,6 +31,7 @@ $title = $site->name; echo $title; ?> </h1> + <?php echo elgg_view_menu('footer', array('sort_by' => 'priority', 'class' => 'elgg-menu-hz')); ?> </div> <div id="elgg-walledgarden-login"> <?php echo $vars['body']; ?> diff --git a/views/default/user/default.php b/views/default/user/default.php index c0c18f85f..6c84e84ad 100644 --- a/views/default/user/default.php +++ b/views/default/user/default.php @@ -9,7 +9,7 @@ $entity = $vars['entity']; $size = elgg_extract('size', $vars, 'tiny'); -$icon = elgg_view_entity_icon($entity, $size); +$icon = elgg_view_entity_icon($entity, $size, $vars); // Simple XFN $rel = ''; @@ -53,5 +53,5 @@ if (elgg_get_context() == 'gallery') { $list_body = elgg_view('user/elements/summary', $params); - echo elgg_view_image_block($icon, $list_body); + echo elgg_view_image_block($icon, $list_body, $vars); } diff --git a/views/failsafe/messages/exceptions/exception.php b/views/failsafe/messages/exceptions/exception.php index 9fa7dc2a4..c35d80c87 100644 --- a/views/failsafe/messages/exceptions/exception.php +++ b/views/failsafe/messages/exceptions/exception.php @@ -11,7 +11,7 @@ ?> -<p class="messages_exception"> +<p class="elgg-messages-exception"> <span title="<?php echo get_class($vars['object']); ?>"> <?php @@ -26,7 +26,7 @@ if (elgg_get_config('debug')) { ?> -<p class="messages_exception"> +<p class="elgg-messages-exception"> <?php echo nl2br(htmlentities(print_r($vars['object'], true), ENT_QUOTES, 'UTF-8')); diff --git a/views/failsafe/page/default.php b/views/failsafe/page/default.php index 0ce63cc1d..6d628ebbb 100644 --- a/views/failsafe/page/default.php +++ b/views/failsafe/page/default.php @@ -33,7 +33,7 @@ header('Content-type: text/html; charset=utf-8'); p { margin: 0px 0px 15px 0; } - #wrapper { + #elgg-wrapper { background:white; width:570px; margin:auto; @@ -43,7 +43,7 @@ header('Content-type: text/html; charset=utf-8'); border-right: 1px solid #666666; border-bottom: 1px solid #666666; } - .messages_exception { + .elgg-messages-exception { background:#FDFFC3; display:block; padding:10px; @@ -52,7 +52,7 @@ header('Content-type: text/html; charset=utf-8'); </head> <body> - <div id="wrapper"> + <div id="elgg-wrapper"> <h1><?php echo $vars['title']; ?></h1> <?php echo $vars['body']; ?> </div> diff --git a/views/foaf/page/default.php b/views/foaf/page/default.php index 7dac2a0aa..fad46ed35 100644 --- a/views/foaf/page/default.php +++ b/views/foaf/page/default.php @@ -42,8 +42,6 @@ if (!$owner = elgg_get_page_owner_entity()) { <foaf:name><?php echo $owner->name; ?></foaf:name> <foaf:homepage rdf:resource="<?php echo $owner->getURL(); ?>" /> <foaf:depiction rdf:resource="<?php echo elgg_format_url($owner->getIconURL('large')); ?>" /> - <?php - echo $vars['body']; - ?> +<?php echo $vars['body']; ?> </foaf:Person> </rdf:RDF> diff --git a/views/foaf/search/entity_list.php b/views/foaf/search/entity_list.php deleted file mode 100644 index b786865d7..000000000 --- a/views/foaf/search/entity_list.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -/** - * Elgg default layout - * - * @package Elgg - * @subpackage Core - */ -$entities = $vars['entities']; -if (is_array($entities) && sizeof($entities) > 0) { - foreach($entities as $entity) { - echo elgg_view_entity($entity); - } -}
\ No newline at end of file diff --git a/views/foaf/user/default.php b/views/foaf/user/default.php index 8d059bc6b..dcba55562 100644 --- a/views/foaf/user/default.php +++ b/views/foaf/user/default.php @@ -6,7 +6,8 @@ * @subpackage Core */ -$friends=get_user_friends(elgg_get_page_owner_guid(), $subtype = "", $limit = 10000, $offset = 0); +// @todo update when get_user_friends is deprecated in 1.9 +$friends = get_user_friends(elgg_get_page_owner_guid(), $subtype = "", $limit = 10000, $offset = 0); foreach ($friends as $friend) { ?> diff --git a/views/ical/export/entity.php b/views/ical/export/entity.php index caa60c7a5..eaa3b56d8 100644 --- a/views/ical/export/entity.php +++ b/views/ical/export/entity.php @@ -9,23 +9,25 @@ $entity = $vars['entity']; -if ( - ($entity instanceof Notable) && - ($entity->getCalendarStartTime()) && - ($entity->getCalendarEndTime()) -) -{ -?> +if ($entity instanceof Notable && + $entity->getCalendarStartTime() && + $entity->getCalendarEndTime()) { + + $timestamp = date("Ymd\THis\Z", $entity->getTimeCreated()); + $start = date("Ymd\THis\Z", $entity->getCalendarStartTime()); + $end = date("Ymd\THis\Z", $entity->getCalendarEndTime()); + $summary = $entity->title; + $modified = date("Ymd\THis\Z", $entity->getTimeUpdated()); + + echo <<< ICAL BEGIN:VEVENT -DTSTAMP:<?php echo date("Ymd\THis\Z", $entity->getTimeCreated()); ?> -DTSTART:<?php echo date("Ymd\THis\Z", $entity->getCalendarStartTime()); ?> -DTEND:<?php echo date("Ymd\THis\Z", $entity->getCalendarEndTime()); ?> -SUMMARY:<?php echo $event->title; ?> -LAST-MODIFIED:<?php echo date("Ymd\THis\Z", $entity->getTimeUpdated()); ?> +DTSTAMP:$timestamp +DTSTART:$start +DTEND:$end +SUMMARY:$summary +LAST-MODIFIED:$modified END:VEVENT -<?php -} -?> - if ( - )
\ No newline at end of file +ICAL; + +} diff --git a/views/ical/object/default.php b/views/ical/object/default.php index 678676133..77183bb8a 100644 --- a/views/ical/object/default.php +++ b/views/ical/object/default.php @@ -7,4 +7,4 @@ * */ -elgg_view('export/entity', $vars);
\ No newline at end of file +echo elgg_view('export/entity', $vars);
\ No newline at end of file diff --git a/views/ical/page/default.php b/views/ical/page/default.php index 9a529b24f..01bd9e86e 100644 --- a/views/ical/page/default.php +++ b/views/ical/page/default.php @@ -7,12 +7,13 @@ * */ +$site = elgg_get_site_entity(); + header("Content-Type: text/calendar"); -echo $vars['body']; ?> BEGIN:VCALENDAR VERSION:2.0 -PRODID:-//Curverider Ltd//NONSGML Elgg <?php echo get_version(true); ?>//EN +PRODID:-//Elgg//NONSGML <?php echo $site->name; ?>//EN <?php echo $vars['body']; ?> END:VCALENDAR diff --git a/views/ical/search/entity_list.php b/views/ical/search/entity_list.php deleted file mode 100644 index 38c19fbb7..000000000 --- a/views/ical/search/entity_list.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -/** - * Elgg default layout - * - * @package Elgg - * @subpackage Core - */ - -$entities = $vars['entities']; -if (is_array($entities) && sizeof($entities) > 0) { - foreach($entities as $entity) - echo elgg_view_entity($entity); -}
\ No newline at end of file diff --git a/views/installation/input/access.php b/views/installation/input/access.php index 7665d8bca..c3d4713bc 100644 --- a/views/installation/input/access.php +++ b/views/installation/input/access.php @@ -8,12 +8,7 @@ * */ -if (isset($vars['class'])) { - $class = $vars['class']; -} -if (!$class) { - $class = "elgg-input-access"; -} +$class = "elgg-input-access"; if ((!isset($vars['options'])) || (!is_array($vars['options']))) { $vars['options'] = array(); @@ -24,7 +19,7 @@ if (is_array($vars['options']) && sizeof($vars['options']) > 0) { ?> - <select name="<?php echo $vars['name']; ?>" <?php if ((isset($vars['disabled'])) && ($vars['disabled'])) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>"> + <select name="<?php echo $vars['name']; ?>" class="<?php echo $class; ?>"> <?php foreach($vars['options'] as $key => $option) { @@ -40,4 +35,4 @@ if (is_array($vars['options']) && sizeof($vars['options']) > 0) { <?php -}
\ No newline at end of file +} diff --git a/views/installation/input/button.php b/views/installation/input/button.php index 29a37dd55..ec90fed9d 100644 --- a/views/installation/input/button.php +++ b/views/installation/input/button.php @@ -7,11 +7,18 @@ * @uses $vars['type'] submit or button. */ -$class = $vars['class']; -if (!$class) { +if (isset($vars['class'])) { + $class = $vars['class']; +} else { $class = "elgg-button-submit"; } +if (isset($vars['name'])) { + $name = $vars['name']; +} else { + $name = ''; +} + if (isset($vars['type'])) { $type = strtolower($vars['type']); } else { @@ -28,6 +35,6 @@ switch ($type) { } $value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); -$name = $vars['name']; + ?> -<input type="<?php echo $type; ?>" <?php if (isset($vars['id'])) echo "id=\"{$vars['id']}\"";?> value="<?php echo $value; ?>" class="<?php echo $class; ?>" />
\ No newline at end of file +<input type="<?php echo $type; ?>" value="<?php echo $value; ?>" class="<?php echo $class; ?>" />
\ No newline at end of file diff --git a/views/installation/input/checkbox.php b/views/installation/input/checkbox.php index 378eae6fd..6fbe25169 100644 --- a/views/installation/input/checkbox.php +++ b/views/installation/input/checkbox.php @@ -5,15 +5,9 @@ * * @uses $var['name'] * @uses $vars['value'] - * @uses $vars['id'] * @uses $vars['class'] */ -if (isset($vars['id'])) { - $id = "id=\"{$vars['id']}\""; -} else { - $id = ''; -} if (isset($vars['class'])) { $id = "class=\"{$vars['class']}\""; @@ -27,4 +21,4 @@ if (!isset($vars['value'])) { ?> -<input type="checkbox" <?php echo $id; ?> <?php echo $class; ?> name="<?php echo $vars['name']; ?>" value="<?php echo $vars['value']; ?>" />
\ No newline at end of file +<input type="checkbox" <?php echo $class; ?> name="<?php echo $vars['name']; ?>" value="<?php echo $vars['value']; ?>" />
\ No newline at end of file diff --git a/views/installation/input/dropdown.php b/views/installation/input/dropdown.php index 46e15c657..cf875492e 100644 --- a/views/installation/input/dropdown.php +++ b/views/installation/input/dropdown.php @@ -10,16 +10,13 @@ * the value displayed on the button. Replaces $vars['options'] when defined. */ +$class = "elgg-input-dropdown"; -$class = $vars['class']; -if (!$class) { - $class = "elgg-input-dropdown"; -} ?> -<select name="<?php echo $vars['name']; ?>" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>"> +<select name="<?php echo $vars['name']; ?>" class="<?php echo $class; ?>"> <?php -if ($vars['options_values']) { - foreach($vars['options_values'] as $value => $option) { +if (isset($vars['options_values'])) { + foreach ($vars['options_values'] as $value => $option) { if ($value != $vars['value']) { echo "<option value=\"$value\">{$option}</option>"; } else { @@ -27,7 +24,7 @@ if ($vars['options_values']) { } } } else { - foreach($vars['options'] as $option) { + foreach ($vars['options'] as $option) { if ($option != $vars['value']) { echo "<option>{$option}</option>"; } else { @@ -36,4 +33,4 @@ if ($vars['options_values']) { } } ?> -</select>
\ No newline at end of file +</select> diff --git a/views/installation/input/form.php b/views/installation/input/form.php index f8730b4f5..3556413a8 100644 --- a/views/installation/input/form.php +++ b/views/installation/input/form.php @@ -5,20 +5,15 @@ * @uses $vars['body'] The body of the form (made up of other input/xxx views and html * @uses $vars['action'] URL of the action being called * @uses $vars['method'] Method (default POST) - * @uses $vars['id'] Form id * @uses $vars['name'] Form name */ -if (isset($vars['id'])) { - $id = "id=\"{$vars['id']}\""; -} else { - $id = ''; -} if (isset($vars['name'])) { $name = "name=\"{$vars['name']}\""; } else { $name = ''; } + $body = $vars['body']; $action = $vars['action']; if (isset($vars['method'])) { @@ -30,6 +25,6 @@ if (isset($vars['method'])) { $method = strtolower($method); ?> -<form <?php echo "$id $name"; ?> action="<?php echo $action; ?>" method="<?php echo $method; ?>"> +<form <?php echo $name; ?> action="<?php echo $action; ?>" method="<?php echo $method; ?>"> <?php echo $body; ?> </form>
\ No newline at end of file diff --git a/views/installation/input/password.php b/views/installation/input/password.php index 18811109b..2265ab117 100644 --- a/views/installation/input/password.php +++ b/views/installation/input/password.php @@ -8,10 +8,10 @@ * */ -$class = $vars['class']; -if (!$class) { - $class = "input-password"; -} +$class = "input-password"; + +$value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); + ?> -<input type="password" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> name="<?php echo $vars['name']; ?>" <?php if (isset($vars['id'])) echo "id=\"{$vars['id']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>" /> +<input type="password" name="<?php echo $vars['name']; ?>" value="<?php echo $value; ?>" class="<?php echo $class; ?>" /> diff --git a/views/installation/input/text.php b/views/installation/input/text.php index ec8233461..375b91c44 100644 --- a/views/installation/input/text.php +++ b/views/installation/input/text.php @@ -6,20 +6,15 @@ * @uses $vars['value'] The current value, if any * @uses $vars['name'] The name of the input field * @uses $vars['class'] CSS class - * @uses $vars['id'] CSS id */ if (isset($vars['class'])) { $class = "class=\"{$vars['class']}\""; } else { - $class = ""; + $class = "elgg-input-text"; } -if (isset($vars['id'])) { - $id = "id=\"{$vars['id']}\""; -} else { - $id = ''; -} +$value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?> -<input type="text" name="<?php echo $vars['name']; ?>" value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" <?php echo $class; ?> <?php echo $id; ?>/>
\ No newline at end of file +<input type="text" name="<?php echo $vars['name']; ?>" value="<?php echo $value; ?>" <?php echo $class; ?> />
\ No newline at end of file |