aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/views/default
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-18 23:18:43 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-18 23:18:43 +0000
commit0b5a24d7943c6f8bc275d1160f4060b337a3cf7a (patch)
tree105769cfd0c1d29c75fe368b989c5380536aa40a /mod/profile/views/default
parent09d08af9814a4edfb2050cdb47ad8ae20a944472 (diff)
downloadelgg-0b5a24d7943c6f8bc275d1160f4060b337a3cf7a.tar.gz
elgg-0b5a24d7943c6f8bc275d1160f4060b337a3cf7a.tar.bz2
continuing to slash and burn the profile plugin - moving the admin profile fields into core - last major change
git-svn-id: http://code.elgg.org/elgg/trunk@7673 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile/views/default')
-rw-r--r--mod/profile/views/default/admin/appearance/defaultprofile.php47
-rw-r--r--mod/profile/views/default/profile/edit.php80
-rw-r--r--mod/profile/views/default/profile/editdefaultprofile.php29
-rw-r--r--mod/profile/views/default/profile/editdefaultprofileitems.php65
4 files changed, 0 insertions, 221 deletions
diff --git a/mod/profile/views/default/admin/appearance/defaultprofile.php b/mod/profile/views/default/admin/appearance/defaultprofile.php
deleted file mode 100644
index b63525bf1..000000000
--- a/mod/profile/views/default/admin/appearance/defaultprofile.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-/**
- * Elgg profile - Admin area: edit default profile fields
- *
- * @package ElggProfile
- */
-
-$title = elgg_view_title(elgg_echo('profile:edit:default'));
-$form = elgg_view('profile/editdefaultprofile');
-
-// List form elements
-$n = 0;
-$loaded_defaults = array();
-$items = array();
-if ($fieldlist = get_plugin_setting('user_defined_fields', 'profile')) {
- $fieldlistarray = explode(',', $fieldlist);
- foreach($fieldlistarray as $listitem) {
- if ($translation = get_plugin_setting("admin_defined_profile_{$listitem}", 'profile')) {
- $item = new stdClass;
- $item->translation = $translation;
- $item->shortname = $listitem;
- $item->name = "admin_defined_profile_{$listitem}";
- $item->type = get_plugin_setting("admin_defined_profile_type_{$listitem}", 'profile');
- $items[] = $item;
- }
- }
-}
-
-$listing = elgg_view('profile/editdefaultprofileitems',array('items' => $items, 'fieldlist' => $fieldlist));
-
-$resetlisting = elgg_view('input/form',
- array (
- 'body' => elgg_view('input/submit', array('value' => elgg_echo('profile:resetdefault'), 'class' => 'action-button disabled')),
- 'action' => 'action/profile/editdefault/reset'
- )
- );
-
-$body = <<<__HTML
-$title
-$form
-$listing
-<div class="default_profile_reset">
- $resetlisting
-</div>
-__HTML;
-
-echo $body;
diff --git a/mod/profile/views/default/profile/edit.php b/mod/profile/views/default/profile/edit.php
deleted file mode 100644
index 2e3ec24a4..000000000
--- a/mod/profile/views/default/profile/edit.php
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-/**
- * Elgg profile edit form
- *
- * @package ElggProfile
- *
- * @uses $vars['entity'] The user entity
- * @uses $vars['profile'] Profile items from $CONFIG->profile, defined in profile/start.php for now
- */
-?>
-<form action="<?php echo elgg_get_site_url(); ?>action/profile/edit" method="post" id="edit_profile" class="margin-top">
-<?php echo elgg_view('input/securitytoken') ?>
-
- <p><label>
- <?php echo elgg_echo('user:name:label'); ?></label>
- <?php
- echo elgg_view('input/text',array('internalname' => 'name', 'value' => elgg_get_page_owner()->name));
- ?>
- </p>
-
-<?php
- if (is_array($vars['config']->profile) && sizeof($vars['config']->profile) > 0)
- foreach($vars['config']->profile as $shortname => $valtype) {
- if ($metadata = get_metadata_byname($vars['entity']->guid, $shortname)) {
- if (is_array($metadata)) {
- $value = '';
- foreach($metadata as $md) {
- if (!empty($value)) $value .= ', ';
- $value .= $md->value;
- $access_id = $md->access_id;
- }
- } else {
- $value = $metadata->value;
- $access_id = $metadata->access_id;
- }
- } else {
- $value = '';
- $access_id = ACCESS_DEFAULT;
- }
-
- if ($shortname == 'description') { // change label positioning to allow for additional longtext field controls
-?>
- <p>
- <label>
- <?php echo elgg_echo("profile:{$shortname}") ?></label>
- <?php echo elgg_view("input/{$valtype}",array(
- 'internalname' => $shortname,
- 'value' => $value,
- )); ?>
-
- <?php echo elgg_view('input/access',array('internalname' => 'accesslevel['.$shortname.']', 'value' => $access_id)); ?>
- </p>
-<?php
- } else {
-?>
-
- <p>
- <label>
- <?php echo elgg_echo("profile:{$shortname}") ?><br />
- <?php echo elgg_view("input/{$valtype}",array(
- 'internalname' => $shortname,
- 'value' => $value,
- )); ?>
- </label>
- <?php echo elgg_view('input/access',array('internalname' => 'accesslevel['.$shortname.']', 'value' => $access_id)); ?>
- </p>
-
-<?php
- }
-
- }
-
-?>
-
- <p>
- <input type="hidden" name="username" value="<?php echo elgg_get_page_owner()->username; ?>" />
- <input type="submit" class="submit-button" value="<?php echo elgg_echo("save"); ?>" />
- </p>
-
-</form> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/editdefaultprofile.php b/mod/profile/views/default/profile/editdefaultprofile.php
deleted file mode 100644
index 7d701af11..000000000
--- a/mod/profile/views/default/profile/editdefaultprofile.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-/**
- * Elgg profile index
- *
- * @package ElggProfile
- */
-
-$label_text = elgg_echo('profile:label');
-$type_text = elgg_echo('profile:type');
-
-$label_control = elgg_view('input/text', array('internalname' => 'label'));
-$type_control = elgg_view('input/pulldown', array('internalname' => 'type', 'options_values' => array(
- 'text' => elgg_echo('text'),
- 'longtext' => elgg_echo('longtext'),
- 'tags' => elgg_echo('tags'),
- 'url' => elgg_echo('url'),
- 'email' => elgg_echo('email')
-)));
-
-$submit_control = elgg_view('input/submit', array('internalname' => elgg_echo('add'), 'value' => elgg_echo('add')));
-
-$formbody = <<< END
- <p>$label_text: $label_control
- $type_text: $type_control
- $submit_control</p>
-END;
-
-echo "<p class='margin-top'>" . elgg_echo('profile:explainchangefields') . "</p>";
-echo elgg_view('input/form', array('body' => $formbody, 'action' => 'action/profile/editdefault'));
diff --git a/mod/profile/views/default/profile/editdefaultprofileitems.php b/mod/profile/views/default/profile/editdefaultprofileitems.php
deleted file mode 100644
index 29ce7f138..000000000
--- a/mod/profile/views/default/profile/editdefaultprofileitems.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<script language="javascript" type="text/javascript" src="<?php echo elgg_get_site_url()?>mod/profile/vendor/jquery.jeditable.mini.js"></script>
-<script language="javascript" type="text/javascript">
-var reorderURL = '<?php echo elgg_add_action_tokens_to_url(elgg_get_site_url() . 'action/profile/editdefault/reorder', FALSE); ?>';
-function sortCallback(event, ui) {
- var orderArr = $('#sortable_profile_fields').sortable('toArray');
- var orderStr = orderArr.join(',');
- jQuery.post(reorderURL, {'fieldorder': orderStr});
-}
-
-$(document).ready(function() {
- $('#sortable_profile_fields').sortable({
- items: 'li',
- handle: '.handle',
- stop: sortCallback
- });
-});
-
-</script>
-
-<div id="list">
- <ul id="sortable_profile_fields">
-<?php
-
- $save = elgg_echo('save');
- $cancel = elgg_echo('cancel');
- $edit_url = elgg_add_action_tokens_to_url(elgg_get_site_url()."action/profile/editdefault/editfield", FALSE);
-
- foreach($vars['items'] as $item) {
- echo <<< END
-
-<script language="javascript" type="text/javascript">
-
- $(function() {
- $(".{$item->shortname}_editable").editable("$edit_url ", {
- type : 'text',
- submitdata: { _method: "post", 'field': '{$item->shortname}' },
- onblur: 'submit',
- width:'300px',
- height:'none',
- style:'display:inline;',
- tooltip:'Click to edit label'
- });
- });
-
-</script>
-
-END;
-
- echo elgg_view("profile/", array('value' => $item->translation));
-
- //$even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
- $url = elgg_add_action_tokens_to_url(elgg_get_site_url()."action/profile/editdefault/delete?id={$item->shortname}");
- echo "<li id=\"{$item->shortname}\"><div class='delete-button'><a href=\"$url\">" . elgg_echo('delete') . "</a></div>";
- echo "<img width='16' height='16' class='handle' alt='move' title='Drag here to reorder this item' src='".elgg_get_site_url()."mod/profile/graphics/drag-handle.png'/>";
- echo "<b class=\"profile_field_editable\"><span class=\"{$item->shortname}_editable\">$item->translation</span></b>: [".elgg_echo($item->type)."]";
- echo "</li>";
-
- }
-
-?>
- </ul>
-</div>
-<div id="tempList"></div>
-
-<input name="sortableListOrder" type="hidden" id="sortableListOrder" value="<?php echo $vars['fieldlist']; ?>" />