]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1598] use bootstrap css 2.x fix user edition form
authorOlivier Lamy <olamy@apache.org>
Thu, 2 Feb 2012 20:42:35 +0000 (20:42 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 2 Feb 2012 20:42:35 +0000 (20:42 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1239827 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/templates/user-edit.html
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/users.js

index 6620ac438aa9f569735e07ab79e97adcfa40e9ff..5bd61c45e43ff46a19d890e6c1beea4cd67e05ca 100644 (file)
     <div id="user-create-div" class="active">
       <div class="row">
         <div class="span8 columns">
-          <form id="user-create">
+          <form id="user-create" class="form-horizontal">
             <fieldset id="user-create-fieldset">
-              <div class="clearfix">
-                <label for="username">${$.i18n.prop('username')}</label>
-                <div class="input" id="username-div">
+              <div class="control-group">
+                <label class="control-label" for="username">${$.i18n.prop('username')}</label>
+                <div class="controls" id="username-div">
                   {{if $data.username.length>0}}
                     <span class="uneditable-input">${$data.username}</span>
                   {{else}}
                   {{/if}}
                 </div>
               </div>
-              <div class="clearfix">
-                <label for="fullname">${$.i18n.prop('full.name')}</label>
-                <div class="input">
+              <div class="control-group">
+                <label class="control-label" for="fullname">${$.i18n.prop('full.name')}</label>
+                <div class="controls">
                   <input type="text" id="fullname" name="fullname" size="30" class="required" data-bind="value: fullName"/>
                 </div>
               </div>
-              <div class="clearfix">
-                <label for="password">${$.i18n.prop('password')}</label>
-                <div class="input">
+              <div class="control-group">
+                <label class="control-label" for="password">${$.i18n.prop('password')}</label>
+                <div class="controls">
                   <input type="password" id="password" name="password" class="required" data-bind="value: password"/>
                 </div>
               </div>
-              <div class="clearfix">
-                <label for="confirmPassword">${$.i18n.prop('confirm.password')}</label>
-                <div class="input">
+              <div class="control-group">
+                <label class="control-label" for="confirmPassword">${$.i18n.prop('confirm.password')}</label>
+                <div class="controls">
                   <input type="password" id="confirmPassword" name="confirmPassword" data-bind="value: confirmPassword"/>
                 </div>
               </div>
-              <div class="clearfix">
-                <label for="email">${$.i18n.prop('email.address')}</label>
-                <div class="input">
+              <div class="control-group">
+                <label class="control-label" for="email">${$.i18n.prop('email.address')}</label>
+                <div class="controls">
                   <input type="text" id="email" name="email" class="required email" data-bind="value: email"/>
                 </div>
               </div>
-              <div class="clearfix">
-                <label for="validated">${$.i18n.prop('validated')}</label>
-                <div class="input">
+              <div class="control-group">
+                <label class="control-label" for="validated">${$.i18n.prop('validated')}</label>
+                <div class="controls">
                   <input type="checkbox" id="validated" name="validated" data-bind="checked: validated"/>
                 </div>
               </div>
-              <div class="clearfix">
-                <label for="locked">${$.i18n.prop('locked')}</label>
-                <div class="input">
+              <div class="control-group">
+                <label class="control-label" for="locked">${$.i18n.prop('locked')}</label>
+                <div class="controls">
                   <input type="checkbox" id="locked" name="locked" data-bind="checked: locked"/>
                 </div>
               </div>
-              <div class="clearfix">
-                <label for="passwordChangeRequired">${$.i18n.prop('user.change.password.required')}</label>
-                <div class="input">
+              <div class="control-group">
+                <label class="control-label" for="passwordChangeRequired">${$.i18n.prop('user.change.password.required')}</label>
+                <div class="controls">
                   <input type="checkbox" id="passwordChangeRequired" name="passwordChangeRequired" data-bind="checked: passwordChangeRequired"/>
                 </div>
               </div>
index e3ce82effad92db2c3d28f7d4e3eaa9d11b4db79..29cedc470f1911323126939b513d13ae4357c802 100644 (file)
@@ -300,7 +300,7 @@ $(function() {
         }
       },
       showErrors: function(validator, errorMap, errorList) {
-        customShowError(validator,errorMap,errorMap);
+        customShowError("user-create",validator,errorMap,errorMap);
       }
 
     });
index bbbdb921205223913ed301eb13e2ddc243431e99..fa3b6c45e09a4593f4d28ebeb6293e54593a62e1 100644 (file)
@@ -74,7 +74,7 @@ $(function() {
           }
         },
         showErrors: function(validator, errorMap, errorList) {
-          customShowError(validator,errorMap,errorMap);
+          customShowError("user-create",validator,errorMap,errorMap);
         }
       });
       $("#main-content #createUserForm #user-create").delegate("#user-create-form-register-button", "click keydown", function(e) {
@@ -133,7 +133,7 @@ $(function() {
           }
         },
         showErrors: function(validator, errorMap, errorList) {
-          customShowError(validator,errorMap,errorMap);
+          customShowError("user-create",validator,errorMap,errorMap);
         }
       });
       $("#main-content #user-create").delegate("#user-create-form-save-button", "click keydown", function(e) {
@@ -159,7 +159,7 @@ $(function() {
 
             $("#main-content #user-edit-roles-view").attr("data-bind",'template: {name:"user_view_roles_list_tmpl"}');
             ko.applyBindings(viewModel,$("#user-edit-roles-view").get(0));
-            $("#main-content #edit_user_details_pills_headers").pills();
+            $("#main-content #edit_user_details_pills_headers").tabs();
 
             $("#main-content #edit_user_details_pills_headers").bind('change', function (e) {
               //$.log( $(e.target).attr("href") ); // activated tab