<?php
/**
- * Elgg profile index
+ * Elgg profile - Admin area: edit default profile fields
*
* @package ElggProfile
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
$listing = elgg_view('profile/editdefaultprofileitems',array('items' => $items, 'fieldlist' => $fieldlist));
-$listing .= elgg_view('input/form',
+$resetlisting = elgg_view('input/form',
array (
- 'body' => elgg_view('input/submit', array('value' => elgg_echo('profile:resetdefault'))),
+ 'body' => elgg_view('input/submit', array('value' => elgg_echo('profile:resetdefault'), 'class' => 'action_button disabled')),
'action' => $CONFIG->wwwroot . 'action/profile/editdefault/reset'
)
);
+
+$resetlisting = "<div class='default_profile_reset'>{$resetlisting}</div>";
set_context('admin');
-$body = elgg_view_layout("one_column_with_sidebar", $title . $form . $listing);
+$body = elgg_view_layout("one_column_with_sidebar", $title . $form . $listing . $resetlisting);
page_draw(elgg_echo('profile:edit:default'), $body);
\ No newline at end of file
'profile:defaultprofile:reset' => 'Default system profile reset',
'profile:resetdefault' => 'Reset default profile',
- 'profile:explainchangefields' => 'You can replace the existing profile fields with your own using the form below. First you give the new profile field a label, for example, \'Favorite team\'. Next you need to select the field type, for example, tags, url, text and so on. At any time you can revert back to the default profile set up.',
+ 'profile:explainchangefields' => 'You can replace the existing profile fields with your own using the form below. <br /><br />Give the new profile field a label, for example, \'Favorite team\', then select the field type (eg. text, url, tags), and click the \'Add\' button. To re-order the fields drag on the handle next to the field label. To edit a field label - click on the label\'s text to make it editable. <br />At any time you can revert back to the default profile set up, but you will loose any information already entered into custom fields on profile pages.',
/**
.default_profile_reset .action_button {
float:right;
}
+/* field re-order */
+#sortable_profile_fields {
+ padding:0;
+ border-top:1px solid #cccccc;
+}
+#sortable_profile_fields li {
+ padding:5px 0 5px 0;
+ border-bottom:1px solid #cccccc;
+}
+#sortable_profile_fields li img.handle {
+ margin-right: 7px;
+ cursor: move;
+}
+#sortable_profile_fields .ui-sortable-helper {
+ background: #eeeeee;
+ color:#333333;
+ padding: 5px 0 5px 0;
+ margin: 0;
+ width:100%;
+}
/* ***************************************
<script language="javascript" type="text/javascript">
var reorderURL = '<?php echo elgg_add_action_tokens_to_url($vars['url'] . 'action/profile/editdefault/reorder', FALSE); ?>';
function sortCallback(event, ui) {
- var orderArr = $('#sortableList').sortable('toArray');
+ var orderArr = $('#sortable_profile_fields').sortable('toArray');
var orderStr = orderArr.join(',');
console.log(orderArr);
console.log(orderStr);
}
$(document).ready(function() {
- $('#sortableList').sortable({
+ $('#sortable_profile_fields').sortable({
items: 'li',
handle: '.handle',
stop: sortCallback
});
</script>
-<script language="javascript" type="text/javascript" src="<?php echo $vars['url']; ?>mod/multiadmin/vendors/js/jquery.jeditable.js" ></script>
<div id="list">
- <ul id="sortableList">
+ <ul id="sortable_profile_fields">
<?php
$save = elgg_echo('save');