diff --git a/htdocs/admin/users/changeuser.php b/htdocs/admin/users/changeuser.php index d51b0f9dd67214c367d3888fb6cb46f804b48d02..38226fb8d09412db1ce5eeb8de82943a7e85f802 100644 --- a/htdocs/admin/users/changeuser.php +++ b/htdocs/admin/users/changeuser.php @@ -69,7 +69,6 @@ require_once('pieforms/pieform.php'); $form = array( 'name' => 'masqueradereason', - 'renderer' => 'table', 'plugintype' => 'core', 'pluginname' => 'core', 'elements' => array( @@ -91,7 +90,8 @@ $form = array( ), 'submit' => array( 'type' => 'submit', - 'value' => get_string('masquerade', 'admin') + 'value' => get_string('masquerade', 'admin'), + 'class' => 'btn-success' ), ), ); diff --git a/htdocs/admin/users/edit.php b/htdocs/admin/users/edit.php index 3b415710aefc7b63bfcd3306b39b6990a65decb8..2336ca7d626c4f4f4b9ade14672367bc811ffb26 100644 --- a/htdocs/admin/users/edit.php +++ b/htdocs/admin/users/edit.php @@ -106,6 +106,7 @@ $elements['maildisabled'] = array( ); $elements['expiry'] = array( 'type' => 'date', + 'class' => 'form-condensed', 'title' => get_string('accountexpiry', 'admin'), 'description' => get_string('accountexpirydescription', 'admin'), 'minyear' => $currentdate['year'] - 2, @@ -120,6 +121,7 @@ if ($USER->get('admin') || get_config_plugin('artefact', 'file', 'institutionalo 'description' => get_string('filequotadescription','admin') . '
' . $quotaused, 'rules' => array('integer' => true, 'minvalue' => 1), + 'class' => 'form-inline mls', 'defaultvalue' => $user->quota, ); } @@ -129,6 +131,7 @@ else { 'disabled' => true, 'title' => get_string('filequota1', 'admin'), 'description' => get_string('filequotadescription', 'admin') . '
' . $quotaused, + 'class' => 'form-inline mls', 'value' => display_size($user->quota), ); } @@ -231,6 +234,7 @@ if (count($authinstances) > 1) { $elements['externalauthjs'] = array( 'type' => 'html', + 'class' => 'hidden', 'value' => $js, ); } @@ -247,6 +251,7 @@ $elements['tags'] = array( $elements['submit'] = array( 'type' => 'submit', + 'class' => 'btn-success mbm', 'value' => get_string('savechanges','admin'), ); @@ -603,6 +608,7 @@ if (empty($suspended)) { ), 'submit' => array( 'type' => 'submit', + 'class' => 'btn-default', 'value' => get_string('suspenduser','admin'), ), ) @@ -669,6 +675,7 @@ $deleteform = pieform(array( ), 'submit' => array( 'type' => 'submit', + 'class' => 'btn-default', 'value' => get_string('deleteuser', 'admin'), 'confirm' => get_string('confirmdeleteuser', 'admin'), ), @@ -719,15 +726,20 @@ if ( !$USER->get('admin') ) { // for institution admins } $allinstitutions = get_records_assoc('institution', '', '', 'displayname', 'name, displayname'); +$institutionloop = 0; +$institutionlength = count($institutions); foreach ($institutions as $i) { $elements[$i->institution.'_settings'] = array( 'type' => 'fieldset', - 'legend' => $i->displayname, + 'legend' => get_string('institutionsettings', 'admin').' - '.$i->displayname, + 'collapsible' => true, + 'collapsed' => true, 'elements' => array( $i->institution.'_expiry' => array( 'type' => 'date', 'title' => get_string('membershipexpiry', 'admin'), 'description' => get_string('membershipexpirydescription', 'admin'), + 'class' => 'form-condensed', 'minyear' => $currentdate['year'], 'maxyear' => $currentdate['year'] + 20, 'defaultvalue' => $i->membership_expiry @@ -752,14 +764,20 @@ foreach ($institutions as $i) { $i->institution.'_submit' => array( 'type' => 'submit', 'value' => get_string('update'), + 'class' => 'btn-success' ), $i->institution.'_remove' => array( 'type' => 'submit', + 'class' => 'btn-default', 'value' => get_string('removeuserfrominstitution', 'admin'), 'confirm' => get_string('confirmremoveuserfrominstitution', 'admin'), - ), - ), + ) + ) ); + if ($institutionloop == $institutionlength - 1) { + $elements[$i->institution.'_settings']['class'] = 'last mbl'; + } + $institutionloop++; } // Only site admins can add institutions; institutional admins must invite @@ -774,7 +792,7 @@ if ($USER->get('admin') if (!empty($options)) { $elements['addinstitutionheader'] = array( 'type' => 'markup', - 'value' => '

' . get_string('addusertoinstitution', 'admin') . '

', + 'value' => '

' . get_string('addusertoinstitution', 'admin') . '

', ); $elements['addinstitution'] = array( 'type' => 'select', @@ -783,6 +801,7 @@ if ($USER->get('admin') ); $elements['add'] = array( 'type' => 'submit', + 'class' => 'btn-success mbs', 'value' => get_string('addusertoinstitution', 'admin'), ); } diff --git a/htdocs/lang/en.utf8/admin.php b/htdocs/lang/en.utf8/admin.php index 069039b4e456f3ffdbbbe6e9980d2061d4e9767d..7b8c30040713c06f9d95f33fafeda140c9bd3cd8 100644 --- a/htdocs/lang/en.utf8/admin.php +++ b/htdocs/lang/en.utf8/admin.php @@ -800,7 +800,7 @@ $string['probationreportcolumn'] = 'Probation'; $string['addusertoinstitution'] = 'Add user to institution'; $string['removeuserfrominstitution'] = 'Remove user from this institution'; $string['confirmremoveuserfrominstitution'] = 'Are you sure you want to remove the user from this institution?'; -$string['usereditdescription'] = 'Here you can view and set details for this user account. Below, you can also suspend or delete this account or change settings for this user in the institutions they are in.'; +$string['usereditdescription'] = 'Here you can view and set details for this user account. Below, you can also suspend or delete this account or change settings for this user in the institutions they are in.'; $string['usereditwarning'] = 'NOTE: Saving the account changes will cause the user to be logged out (if currently logged in).'; $string['suspenduserdescription'] = 'A suspended user is unable to log in until the account is unsuspended.'; $string['deleteusernote'] = 'Please note that this operation cannot be undone.'; @@ -944,6 +944,7 @@ $string['settingsfor'] = 'Settings for:'; $string['institutionmembers'] = 'Institution members'; $string['notadminforinstitution'] = 'You are not an administrator for that institution.'; $string['institutionmemberspagedescription'] = 'On this page, you can see users who have requested membership of your institution and add them as members. You can also remove users from your institution and invite users to join.'; +$string['suspendordeletethisuser'] = 'Suspend or delete this user'; $string['institutionusersinstructionsrequesters1'] = 'The list of users in the "%1$s" field shows all users who have asked to join your institution. You can use the search box to reduce the number of users displayed. If you would like to add users to the institution or decline their membership requests, first move some users to the "%2$s" field by selecting one or more users and then clicking on the right arrow. The "Add members" button will add all the users in the "%2$s" field to the institution. The "Decline requests" button will remove the membership requests of the users in the "%2$s" field.'; $string['institutionusersinstructionsnonmembers1'] = 'The list of users in the "%1$s" field shows all users who are not yet members of your institution. You can use the search box to reduce the number of users displayed. To invite users to join the institution, first move some users to the "%2$s" field by selecting one or more users and then clicking on the right arrow button to move those users to the "%2$s" field. The "Invite users" button will send invitations to all the users in the "%2$s" field. These users will not be associated with the institution until they accept the invitation.'; diff --git a/htdocs/theme/raw/templates/admin/users/edit.tpl b/htdocs/theme/raw/templates/admin/users/edit.tpl index 30146fb5827e8bc0d1f2e08f3e9e7061c9a0be26..42f563ef8cae027b28a54bd2d5b957c8f4080221 100644 --- a/htdocs/theme/raw/templates/admin/users/edit.tpl +++ b/htdocs/theme/raw/templates/admin/users/edit.tpl @@ -1,58 +1,94 @@ {include file="header.tpl"} +

{str tag="usereditdescription" section="admin"}

-
- {if $suspended} -
-

{$suspendedby}

- {if $user->get('suspendedreason')} -
- {str tag="suspendedreason" section="admin"}: {$user->suspendedreason} -
- {/if} - {$suspendform2|safe} -
- {/if} +{if $suspended} +
+

{$suspendedby}

+ {if $user->get('suspendedreason')} +
+ {str tag="suspendedreason" section="admin"}: + {$user->suspendedreason} +
+ {/if} + {$suspendform2|safe} +
+{/if} +
+
+
+

{str tag="siteaccountsettings" section="admin"}

+

{str tag="usereditwarning" section="admin"}

+ {$siteform|safe} + {if ($institutions)} + {$institutionform|safe} + {/if} +
+
-
-
- {if $suspendable} -
-
-

{str tag="suspenduser" section=admin}

-

{str tag="suspenduserdescription" section=admin}

- {$suspendform|safe} -
- {if $deletable} -
-

{str tag=deleteuser section=admin}

-

{str tag=deleteusernote section=admin}

- {$deleteform|safe} +
+
+
+

+ + {$user|display_name} + + + {str tag=profileimagetext arg1=$user|display_default_name} + +

+ {if $loginas} + + {/if} +
+ {if $suspendable && $deletable} + + + + {/if} +
- {/if}
- {/if}
-
- + + +