aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2013-01-19 09:36:27 -0500
committerCash Costello <cash.costello@gmail.com>2013-01-19 09:36:27 -0500
commit3cfc0d3c2b5b4aaaa94179060370e1fe34668464 (patch)
tree4b69072d4e9fc7e388fa3b09371aac0127601b44 /views
parent1de6813123ae865e4420b341ade372feaaf7bd25 (diff)
downloadelgg-3cfc0d3c2b5b4aaaa94179060370e1fe34668464.tar.gz
elgg-3cfc0d3c2b5b4aaaa94179060370e1fe34668464.tar.bz2
Fixes #4982 adds confirm dialog to profile field reset
Diffstat (limited to 'views')
-rw-r--r--views/default/admin/appearance/profile_fields.php12
-rw-r--r--views/default/forms/profile/fields/reset.php12
2 files changed, 10 insertions, 14 deletions
diff --git a/views/default/admin/appearance/profile_fields.php b/views/default/admin/appearance/profile_fields.php
index 91d14b874..f1d78c19f 100644
--- a/views/default/admin/appearance/profile_fields.php
+++ b/views/default/admin/appearance/profile_fields.php
@@ -5,12 +5,20 @@
$add = elgg_view_form('profile/fields/add', array('class' => 'elgg-form-settings'), array());
$list = elgg_view('admin/appearance/profile_fields/list');
-$reset = elgg_view_form('profile/fields/reset', array(), array());
+
+$reset = elgg_view('output/confirmlink', array(
+ 'text' => elgg_echo('reset'),
+ 'href' => 'action/profile/fields/reset',
+ 'title' => elgg_echo('profile:resetdefault'),
+ 'confirm' => elgg_echo('profile:resetdefault:confirm'),
+ 'class' => 'elgg-button elgg-button-cancel',
+ 'is_trusted' => 'true',
+));
$body = <<<__HTML
$add
$list
-$reset
+<div class="mtl">$reset</div>
__HTML;
echo $body;
diff --git a/views/default/forms/profile/fields/reset.php b/views/default/forms/profile/fields/reset.php
deleted file mode 100644
index c0bb1b7f4..000000000
--- a/views/default/forms/profile/fields/reset.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-/**
- * Reset profile fields form
- */
-
-echo '<div class="elgg-foot">';
-$params = array(
- 'value' => elgg_echo('profile:resetdefault'),
- 'class' => 'elgg-button-cancel',
-);
-echo elgg_view('input/submit', $params);
-echo '</div>';