diff --git a/lam/graphics/cancel.png b/lam/graphics/cancel.png
new file mode 100644
index 00000000..a198c69f
Binary files /dev/null and b/lam/graphics/cancel.png differ
diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc
index a1f38af2..f071ee08 100644
--- a/lam/lib/baseModule.inc
+++ b/lam/lib/baseModule.inc
@@ -1203,7 +1203,7 @@ abstract class baseModule {
* @see htmlElement
*/
public function display_html_delete() {
- return 0;
+ return null;
}
/**
diff --git a/lam/lib/html.inc b/lam/lib/html.inc
index 62b714de..027ce735 100644
--- a/lam/lib/html.inc
+++ b/lam/lib/html.inc
@@ -3000,13 +3000,40 @@ class htmlStatusMessage extends htmlElement {
* @param String $text message (optional)
* @param array $params additional message parameters
*/
- function __construct($type, $title, $text = null, $params = null) {
+ public function __construct($type, $title, $text = null, $params = null) {
$this->type = $type;
$this->title = $title;
$this->text = $text;
$this->params = $params;
}
+ /**
+ * Constructor with parameter array.
+ *
+ * @param array $params parameters in same order as normal constructor
+ * @return htmlStatusMessage
+ */
+ public static function fromParamArray($params) {
+ if (sizeof($params) < 2) {
+ throw new BadMethodCallException("Invalid parameter count");
+ }
+
+ $count = count($params);
+ switch ($count) {
+ case 2:
+ return new htmlStatusMessage($params[0], $params[1]);
+ break;
+ case 3:
+ return new htmlStatusMessage($params[0], $params[1], $params[2]);
+ break;
+ case 4:
+ return new htmlStatusMessage($params[0], $params[1], $params[2], $params[3]);
+ break;
+ default:
+ throw new BadMethodCallException("Invalid parameter count");
+ }
+ }
+
/**
* Prints the HTML code for this element.
*
@@ -3018,7 +3045,7 @@ class htmlStatusMessage extends htmlElement {
* @param string $scope Account type
* @return array List of input field names and their type (name => type)
*/
- function generateHTML($module, $input, $values, $restricted, &$tabindex, $scope) {
+ public function generateHTML($module, $input, $values, $restricted, &$tabindex, $scope) {
StatusMessage($this->type, $this->title, $this->text, $this->params);
return array();
}
diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc
index 5ed738eb..7dfc63fd 100644
--- a/lam/lib/modules/posixAccount.inc
+++ b/lam/lib/modules/posixAccount.inc
@@ -1752,18 +1752,14 @@ class posixAccount extends baseModule implements passwordService {
* @return htmlElement meta HTML code
*/
function display_html_delete() {
- $return = null;
+ $return = new htmlResponsiveRow();
if ($this->get_scope() == 'user' && ($_SESSION['config']->get_scriptPath() != null)) {
- $return = new htmlTable();
- $return->addElement(new htmlTableExtendedInputCheckbox('deletehomedir', true, _('Delete home directory'), 'deletehomedir'), true);
+ $return->add(new htmlResponsiveInputCheckbox('deletehomedir', true, _('Delete home directory'), 'deletehomedir'), 12);
}
$typeManager = new TypeManager();
$sudoTypes = $typeManager->getConfiguredTypesForScope('sudo');
if (($this->get_scope() == 'user') && !empty($sudoTypes)) {
- if ($return == null) {
- $return = new htmlTable();
- }
- $return->addElement(new htmlTableExtendedInputCheckbox('deleteSudoers', true, _('Delete sudo rights'), 'deleteSudoers'), true);
+ $return->add(new htmlResponsiveInputCheckbox('deleteSudoers', true, _('Delete sudo rights'), 'deleteSudoers'), 12);
}
return $return;
}
diff --git a/lam/style/500_layout.css b/lam/style/500_layout.css
index 790a67df..c598bc14 100644
--- a/lam/style/500_layout.css
+++ b/lam/style/500_layout.css
@@ -272,7 +272,7 @@ table.collapse {
}
.cancelButton {
- background-image: url(../graphics/del.png) !important;
+ background-image: url(../graphics/cancel.png) !important;
background-position: 0px 0px !important;
}
diff --git a/lam/templates/delete.php b/lam/templates/delete.php
index d336b038..1d871e0c 100644
--- a/lam/templates/delete.php
+++ b/lam/templates/delete.php
@@ -1,11 +1,17 @@
getScope() . "-bright smallPaddingContent\">";
echo "
\n";
echo "