Changeset 13506
- Timestamp:
- 11/19/07 16:27:50 (1 year ago)
- Files:
-
- trunk/midcom/midcom.admin.user/handler/user/edit.php (modified) (2 diffs)
- trunk/midcom/midcom.admin.user/locale/default.en.txt (modified) (7 diffs)
- trunk/midcom/midcom.admin.user/locale/default.fi.txt (modified) (7 diffs)
- trunk/midcom/midcom.admin.user/plugin.php (modified) (1 diff)
- trunk/midcom/midcom.admin.user/static/usermgmt.css (modified) (1 diff)
- trunk/midcom/midcom.admin.user/style/midcom-admin-user-generate-passwords.php (added)
- trunk/midcom/midcom.admin.user/style/midcom-admin-user-person-edit.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/midcom.admin.user/handler/user/edit.php
r13089 r13506 176 176 $this->_update_breadcrumb($handler_id); 177 177 178 // Add jQuery Form handling for generating passwords with AJAX 179 $_MIDCOM->add_jsfile(MIDCOM_STATIC_URL . '/jQuery/jquery.form-1.0.3.pack.js'); 180 178 181 return true; 179 182 } … … 190 193 midgard_admin_asgard_plugin::asgard_header(); 191 194 195 $data['l10n'] =& $this->_l10n; 192 196 $data['person'] =& $this->_person; 193 197 $data['controller'] =& $this->_controller; 194 198 midcom_show_style('midcom-admin-user-person-edit'); 195 199 200 if (isset($_GET['f_submit'])) 201 { 202 midcom_show_style('midcom-admin-user-generate-passwords'); 203 } 204 196 205 midgard_admin_asgard_plugin::asgard_footer(); 206 } 207 208 /** 209 * Auto-generate passwords on the fly 210 * 211 * @access public 212 */ 213 function _handler_passwords($handler_id, $args, &$data) 214 { 215 $_MIDCOM->skip_page_style = true; 216 return true; 217 } 218 219 /** 220 * Auto-generate passwords on the fly 221 * 222 * @access public 223 */ 224 function _show_passwords($handler_id, &$data) 225 { 226 // Show passwords 227 $data['l10n'] =& $this->_l10n; 228 midcom_show_style('midcom-admin-user-generate-passwords'); 197 229 } 198 230 } trunk/midcom/midcom.admin.user/locale/default.en.txt
r13501 r13506 6 6 ---STRING add to group 7 7 Add to group 8 ---STRINGEND 9 10 ---STRING amount 11 Amount 8 12 ---STRINGEND 9 13 … … 68 72 ---STRINGEND 69 73 74 ---STRING generate 75 Generate 76 ---STRINGEND 77 78 ---STRING generate passwords 79 Generate passwords 80 ---STRINGEND 81 70 82 ---STRING go 71 83 Go … … 84 96 ---STRINGEND 85 97 98 ---STRING maximum %s 99 Maximum %s 100 ---STRINGEND 101 86 102 ---STRING members 87 103 Members … … 90 106 ---STRING midcom.admin.user 91 107 User management 108 ---STRINGEND 109 110 ---STRING move %s 111 Move %s 92 112 ---STRINGEND 93 113 … … 104 124 ---STRINGEND 105 125 126 ---STRING password length 127 Password length 128 ---STRINGEND 129 130 ---STRING passwords 131 Passwords 132 ---STRINGEND 133 106 134 ---STRING person %s saved 107 135 User %s saved … … 110 138 ---STRING postcode 111 139 Postcode 140 ---STRINGEND 141 142 ---STRING prevent repeating character 143 Prevent repeating character 144 ---STRINGEND 145 146 ---STRING prevent similar characters 147 Prevent similar characters 112 148 ---STRINGEND 113 149 … … 140 176 ---STRINGEND 141 177 142 ---STRING move %s143 Move %s178 ---STRING prevent repeating characters 179 Prevent repeating characters 144 180 ---STRINGEND 145 181 trunk/midcom/midcom.admin.user/locale/default.fi.txt
r13501 r13506 6 6 ---STRING add to group 7 7 LisÀÀ ryhmÀÀn 8 ---STRINGEND 9 10 ---STRING amount 11 MÀÀrÀ 8 12 ---STRINGEND 9 13 … … 68 72 ---STRINGEND 69 73 74 ---STRING generate 75 Tee 76 ---STRINGEND 77 70 78 ---STRING go 71 79 Hae … … 84 92 ---STRINGEND 85 93 94 ---STRING maximum %s 95 Korkeintaan %s 96 ---STRINGEND 97 86 98 ---STRING members 87 99 JÀsenet … … 90 102 ---STRING midcom.admin.user 91 103 KÀyttÀjien hallinta 104 ---STRINGEND 105 106 ---STRING move %s 107 SiirrÀ %s 92 108 ---STRINGEND 93 109 … … 104 120 ---STRINGEND 105 121 122 ---STRING password length 123 Salasanan pituus 124 ---STRINGEND 125 126 ---STRING passwords 127 Salasanat 128 ---STRINGEND 129 106 130 ---STRING person %s saved 107 131 KÀyttÀjÀ %s tallennettu … … 110 134 ---STRING postcode 111 135 Postinumero 136 ---STRINGEND 137 138 ---STRING prevent repeating character 139 EstÀ samojen merkkien toistuminen 140 ---STRINGEND 141 142 ---STRING prevent similar characters 143 EstÀ samanlaiset merkit 112 144 ---STRINGEND 113 145 … … 140 172 ---STRINGEND 141 173 142 ---STRING move %s143 SiirrÀ %s 174 ---STRING prevent repeating characters 175 EstÀ samojen merkkien toistuminen 144 176 ---STRINGEND 145 177 trunk/midcom/midcom.admin.user/plugin.php
r13501 r13506 64 64 'fixed_args' => array ('edit'), 65 65 'variable_args' => 1, 66 ), 67 /** 68 * Generate random passwords 69 * 70 * Match //user-editor/password/ 71 */ 72 'user_passwords' => array 73 ( 74 'handler' => array ('midcom_admin_user_handler_user_edit', 'passwords'), 75 'fixed_args' => array ('password'), 66 76 ), 67 77 /** trunk/midcom/midcom.admin.user/static/usermgmt.css
r12849 r13506 41 41 display: inline !important; 42 42 } 43 44 #midcom_admin_user_passwords 45 { 46 float: right; 47 width: 25em; 48 } 49 50 #midcom_admin_user_passwords pre 51 { 52 background-color: #eeeeef; 53 padding: 6px; 54 } 55 56 #midcom_admin_user_passwords label 57 { 58 display: block; 59 } trunk/midcom/midcom.admin.user/style/midcom-admin-user-person-edit.php
r12696 r13506 1 <?php 2 $prefix = $_MIDCOM->get_context_data(MIDCOM_CONTEXT_ANCHORPREFIX); 3 ?> 1 4 <h1><?php echo $data['view_title']; ?></h1> 2 5 <div id="midcom_admin_user_passwords"> 6 <a href="&(prefix);__mfa/asgard_midcom.admin.user/password/" target="_blank"><?php echo $data['l10n']->get('generate passwords'); ?></a> 7 </div> 3 8 <?php $data['controller']->display_form(); ?> 9 <script type="text/javascript"> 10 // <![CDATA[ 11 $j('#midcom_admin_user_passwords a') 12 .attr('href', '#') 13 .attr('target', '_self') 14 .click(function() 15 { 16 $j(this.parentNode).load('&(prefix);__mfa/asgard_midcom.admin.user/password/?ajax×tamp=<?php echo time(); ?>'); 17 }); 18 // ]]> 19 </script>
