From 5041c6c48153453ed597206d08eeff37cf20e676 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 15 Mar 2014 14:46:48 -0300 Subject: Squashed 'mod/cool_theme/' content from commit a26f7df git-subtree-dir: mod/cool_theme git-subtree-split: a26f7df43a266f7d1ff04847da330d15f6041e9b --- views/default/forms/comments/add.php | 39 ++++++++++++++++ views/default/forms/discussion/reply/save.php | 28 +++++++++++ views/default/forms/profile/edit.php | 67 +++++++++++++++++++++++++++ views/default/forms/profile/fields/add.php | 29 ++++++++++++ views/default/forms/profile/fields/reset.php | 12 +++++ 5 files changed, 175 insertions(+) create mode 100644 views/default/forms/comments/add.php create mode 100644 views/default/forms/discussion/reply/save.php create mode 100644 views/default/forms/profile/edit.php create mode 100644 views/default/forms/profile/fields/add.php create mode 100644 views/default/forms/profile/fields/reset.php (limited to 'views/default/forms') diff --git a/views/default/forms/comments/add.php b/views/default/forms/comments/add.php new file mode 100644 index 000000000..55341ea46 --- /dev/null +++ b/views/default/forms/comments/add.php @@ -0,0 +1,39 @@ + 'generic_comment', + 'placeholder' => elgg_echo('annotation:generic_comment:value:placeholder'), + )); + echo elgg_view('input/submit', array( + 'value' => elgg_echo('comment'), + 'class' => 'hidden', + )); + } else { +?> +
+ + 'generic_comment')); ?> +
+ elgg_echo("generic_comments:post"))); + } + + echo elgg_view('input/hidden', array( + 'name' => 'entity_guid', + 'value' => $vars['entity']->getGUID() + )); +} \ No newline at end of file diff --git a/views/default/forms/discussion/reply/save.php b/views/default/forms/discussion/reply/save.php new file mode 100644 index 000000000..5fb94d488 --- /dev/null +++ b/views/default/forms/discussion/reply/save.php @@ -0,0 +1,28 @@ + 'group_topic_post', 'placeholder' => elgg_echo('annotation:group_topic_post:value:placeholder'))); + echo elgg_view('input/submit', array('value' => elgg_echo('reply'), 'class' => 'hidden')); + } else { +?> +
+ + 'group_topic_post')); ?> +
+ elgg_echo('reply'))); + } + echo elgg_view('input/hidden', array( + 'name' => 'entity_guid', + 'value' => $vars['entity']->getGUID(), + )); +} diff --git a/views/default/forms/profile/edit.php b/views/default/forms/profile/edit.php new file mode 100644 index 000000000..46b77a95b --- /dev/null +++ b/views/default/forms/profile/edit.php @@ -0,0 +1,67 @@ + + +
+

+ 'name', 'value' => $vars['entity']->name)); ?> +
+ 0) { + foreach ($profile_fields as $shortname => $valtype) { + $metadata = elgg_get_metadata(array( + 'guid' => $vars['entity']->guid, + 'metadata_name' => $shortname + )); + if ($metadata) { + 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; + } + +?> +
+

+ $shortname, + 'value' => $value, + ); + echo elgg_view("input/{$valtype}", $params); + $params = array( + 'name' => "accesslevel[$shortname]", + 'value' => $access_id, + ); + echo elgg_view('input/access', $params); + ?> +
+ +
+ 'guid', 'value' => $vars['entity']->guid)); + echo elgg_view('input/submit', array('value' => elgg_echo('save'))); +?> +
diff --git a/views/default/forms/profile/fields/add.php b/views/default/forms/profile/fields/add.php new file mode 100644 index 000000000..1ea9c57a9 --- /dev/null +++ b/views/default/forms/profile/fields/add.php @@ -0,0 +1,29 @@ + 'label')); +$type_control = elgg_view('input/dropdown', array('name' => 'type', 'options_values' => array( + 'text' => elgg_echo('profile:field:text'), + 'longtext' => elgg_echo('profile:field:longtext'), + 'tags' => elgg_echo('profile:field:tags'), + 'url' => elgg_echo('profile:field:url'), + 'email' => elgg_echo('profile:field:email'), + 'location' => elgg_echo('profile:field:location'), + 'date' => elgg_echo('profile:field:date'), +))); + +$submit_control = elgg_view('input/submit', array('name' => elgg_echo('add'), 'value' => elgg_echo('add'))); + +$formbody = <<< END +
$label_text: $label_control
+
$type_text: $type_control + $submit_control
+END; + +echo autop(elgg_echo('profile:explainchangefields')); +echo $formbody; diff --git a/views/default/forms/profile/fields/reset.php b/views/default/forms/profile/fields/reset.php new file mode 100644 index 000000000..c0bb1b7f4 --- /dev/null +++ b/views/default/forms/profile/fields/reset.php @@ -0,0 +1,12 @@ +'; +$params = array( + 'value' => elgg_echo('profile:resetdefault'), + 'class' => 'elgg-button-cancel', +); +echo elgg_view('input/submit', $params); +echo '
'; -- cgit v1.2.3