Code

Layout and translation fixes
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 7 May 2007 14:46:43 +0000 (14:46 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 7 May 2007 14:46:43 +0000 (14:46 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6283 594d385d-05f5-0310-b6e9-bd551577e9d8

setup/class_setupStep_Migrate.inc
setup/setup_migrate.tpl

index b8e8608688d1f91762c40f8092237f812aadecff..0c936fa7902a6f9ea17eb3e1d44af207788adb4a 100644 (file)
@@ -211,7 +211,7 @@ class Step_Migrate extends setup_step
       $this->checks['uidNumber_usage']['STATUS']    = FALSE;
       $this->checks['uidNumber_usage']['STATUS_MSG']= "<font style='color:#F0A500'>"._("Warning")."</font>";
       $this->checks['uidNumber_usage']['ERROR_MSG'] =
-        sprintf(_("Found %s duplicated uidNumber values."),count($this->check_uidNumbers));
+        sprintf(_("Found %s duplicate values for attribute 'uidNumber'."),count($this->check_uidNumbers));
       return(false);
     }else{
       $this->checks['uidNumber_usage']['STATUS']    = TRUE;
@@ -260,7 +260,7 @@ class Step_Migrate extends setup_step
       $this->checks['gidNumber_usage']['STATUS']    = FALSE;
       $this->checks['gidNumber_usage']['STATUS_MSG']= "<font style='color:#F0A500'>"._("Warning")."</font>";
       $this->checks['gidNumber_usage']['ERROR_MSG'] =
-        sprintf(_("Found %s duplicate gidNumber."),count($this->check_gidNumbers));
+        sprintf(_("Found %s duplicate values for attribute 'gidNumber'."),count($this->check_gidNumbers));
       return(false);
     }else{
       $this->checks['gidNumber_usage']['STATUS']    = TRUE;
@@ -362,10 +362,10 @@ class Step_Migrate extends setup_step
 
     if(count($this->outside_groups)){
       $this->checks['outside_groups']['STATUS']    = FALSE;
-      $this->checks['outside_groups']['STATUS_MSG']= _("Failed");
+      $this->checks['outside_groups']['STATUS_MSG']= "<font style='color:#F0A500'>"._("Warning")."</font>";
       $this->checks['outside_groups']['ERROR_MSG'] = 
-        sprintf(_("Found %s groups outside the selected group ou '%s'."),count($this->outside_groups),$group_ou);
-      $this->checks['outside_groups']['ERROR_MSG'].= "<input type='submit' name='outside_groups_dialog' value='"._("Migrate")."...'>";
+        sprintf(_("Found %s groups outside the configured tree '%s'."),count($this->outside_groups),$group_ou);
+      $this->checks['outside_groups']['ERROR_MSG'].= "&nbsp;<input type='submit' name='outside_groups_dialog' value='"._("Move")."...'>";
       return(false);
     }else{
       $this->checks['outside_groups']['STATUS']    = TRUE;
@@ -410,7 +410,7 @@ class Step_Migrate extends setup_step
       $this->checks['outside_users']['STATUS']    = FALSE;
       $this->checks['outside_users']['STATUS_MSG']= "<font style='color:#F0A500'>"._("Warning")."</font>";
       $this->checks['outside_users']['ERROR_MSG'] = 
-        sprintf(_("Found %s user(s) outside the selected user ou '%s'."),count($this->outside_users),$people_ou);
+        sprintf(_("Found %s user(s) outside the configured tree '%s'."),count($this->outside_users),$people_ou);
       $this->checks['outside_users']['ERROR_MSG'].= "<input type='submit' name='outside_users_dialog' value='"._("Move")."...'>";
       return(false);
     }else{
@@ -993,8 +993,6 @@ class Step_Migrate extends setup_step
 
   function migrate_outside_users($perform = FALSE)
   {
-    $this->show_details= $perform;
-
     /* Establish ldap connection */
     $cv = $this->parent->captured_values;
     $ldap = new LDAP($cv['admin'],
@@ -1029,7 +1027,7 @@ class Step_Migrate extends setup_step
             $refs .= "<br />\t".$ref_dn;
           } 
           if(!empty($refs)){ 
-            $this->outside_users[$b_dn]['ldif'] .= "<br /><br /><i>"._("Updating following references too").":</i>".$refs;
+            $this->outside_users[$b_dn]['ldif'] .= "<br /><br /><i>"._("The following references will be updated").":</i>".$refs;
           }
 
         }else{
@@ -1088,9 +1086,14 @@ class Step_Migrate extends setup_step
     }
    
     if(isset($_POST['outside_groups_dialog_whats_done'])){
+      $this->show_details= TRUE;
       $this->migrate_outside_groups(FALSE);
     }
  
+    if(isset($_POST['outside_groups_dialog_refresh'])){
+      $this->show_details= FALSE;
+    }
+
     if(isset($_POST['outside_groups_dialog_perform'])){
       $this->migrate_outside_groups(TRUE);
       $this->search_outside_groups();
@@ -1106,6 +1109,7 @@ class Step_Migrate extends setup_step
       $smarty->assign("ous",$this->get_all_group_ous());
       $smarty->assign("method","outside_groups");
       $smarty->assign("outside_groups",$this->outside_groups);
+      $smarty->assign("group_details", $this->show_details);
       return($smarty->fetch(get_template_path("setup_migrate.tpl",TRUE,dirname(__FILE__))));
     }
  
@@ -1119,6 +1123,7 @@ class Step_Migrate extends setup_step
     }
    
     if(isset($_POST['outside_users_dialog_whats_done'])){
+      $this->show_details= TRUE;
       $this->migrate_outside_users(FALSE);
     }
  
@@ -1127,6 +1132,10 @@ class Step_Migrate extends setup_step
       $this->search_outside_users();
     }
 
+    if (isset($_POST['outside_users_dialog_refresh'])){
+      $this->show_details= FALSE;
+    }
+
     if(isset($_POST['outside_users_dialog'])){
       $this->outside_users_dialog = TRUE;
       $this->dialog = TRUE;
@@ -1138,7 +1147,6 @@ class Step_Migrate extends setup_step
       $smarty->assign("method","outside_users");
       $smarty->assign("outside_users",$this->outside_users);
       $smarty->assign("user_details", $this->show_details);
-var_dump($this->show_details);
       return($smarty->fetch(get_template_path("setup_migrate.tpl",TRUE,dirname(__FILE__))));
     }
  
index c34243609bd186526616c66b0a159f28358d906d..21bf665fe17f8e69163d0bbeb453e2ef3762716a 100644 (file)
 
                {elseif $method == "outside_groups"}
 
-                       <h2>{t}Move groups into valid group departments{/t}</h2>
-
-                       {t}This dialog allows you to move the displayed groups into a valid group department{/t}
-                       <br>
-                       {t}Be careful with this tool, there may be references pointing to this group that can't be migrated.{/t}
-                       <br>
-                       <br>    
+                       <h2>{t}Move groups into configured group tree{/t}</h2>
+
+                        <p>
+                        {t}This dialog allows moving a couple of groups to the configured group tree. Doing this may straighten your LDAP service.{/t}
+                        </p>
+                        <p style='color:red'>
+                        {t}Be careful with this option! There may be references pointing to these groups. The GOsa setup can't migrate references, so you may want to cancel the migration in this case in this case.{/t}
+                        </p>
+                       <p>
+                       {t}Move selected groups into this group tree{/t}: 
+                       <select name='move_group_to'>
+                               {html_options options=$ous}
+                       </select>
+                       </p>
 
                        {foreach from=$outside_groups item=val key=key}
                                {if $outside_groups.$key.selected}
                                {/if}
 
                                &nbsp;{$outside_groups.$key.dn}
-                               {if $outside_groups.$key.ldif != ""}
+                               {if $outside_groups.$key.ldif != "" && $group_details}
                       <div class="step2_entry_container_info" id="sol_8">
 <div style='padding-left:20px;'>
 <pre>
                        {/foreach}
 
                        <p>
-                       <b>{t}Move selected group into the following GOsa people department{/t} : </b>
-                       <select name='move_group_to'>
-                               {html_options options=$ous}
-                       </select>
-                       <br>
-                       <input type='submit' name='outside_groups_dialog_perform' value='{t}Move selected groups{/t}'>
-                       <input type='submit' name='outside_groups_dialog_whats_done' value='{t}What will be done here{/t}'>
+                        {if $group_details}
+                        <input type='submit' name='outside_groups_dialog_refresh' value='{t}Hide changes{/t}'>
+                        {else}
+                        <input type='submit' name='outside_groups_dialog_whats_done' value='{t}Show changes{/t}'>
+                        {/if}
                        </p>
-                               
 
                        <p class='seperator'>&nbsp;</p> 
-                       <div style='width:100%; text-align:right; padding:5px;'>
-                               <input type='submit' name='outside_groups_dialog_cancel' value='{t}Close{/t}'>
+                       <div style='width:99%; text-align:right; padding:5px;'>
+                               <input type='submit' name='outside_groups_dialog_perform' value='{t}Apply{/t}'>
+                               &nbsp;
+                               <input type='submit' name='outside_groups_dialog_cancel' value='{t}Cancel{/t}'>
                        </div>
                
                {elseif $method == "outside_users"}
                        {t}Be careful with this option! There may be references pointing to these users. The GOsa setup can't migrate references, so you may want to cancel the migration in this case in this case.{/t}
                        </p>    
                        <p>
-                       {t}Move selected user into the following GOsa people department{/t}: 
+                       {t}Move selected users into this people tree{/t}: 
                        <select name='move_user_to'>
                                {html_options options=$ous}
                        </select>
                                {/if}
 
                                &nbsp;{$outside_users.$key.dn}
-                               {if $outside_users.$key.ldif != ""}
+                               {if $outside_users.$key.ldif != "" && $user_details}
                       <div class="step2_entry_container_info" id="sol_8">
 <div style='padding-left:20px;'>
 <pre>
 
                        <p class='seperator'>&nbsp;</p> 
                        <div style='width:99%; text-align:right; padding:5px;'>
-                               <input type='submit' name='outside_users_dialog_perform' value='{t}Move{/t}'>
+                               <input type='submit' name='outside_users_dialog_perform' value='{t}Apply{/t}'>
                                &nbsp;
                                <input type='submit' name='outside_users_dialog_cancel' value='{t}Cancel{/t}'>
                        </div>
 
                        <div style='width:99%; text-align:right; padding:5px;'>
                                {if $users_cnt != 0 || $groups_cnt != 0}
-                               <input type='submit' name='create_acls_create' value='{t}Assign{/t}'>
+                               <input type='submit' name='create_acls_create' value='{t}Apply{/t}'>
                                {else}
-                               <input type='submit' name='create_admin_user' value='{t}Create{/t}'>    
+                               <input type='submit' name='create_admin_user' value='{t}Apply{/t}'>     
                                {/if}
                                &nbsp;
                                <input type='submit' name='create_acls_cancel' value='{t}Cancel{/t}'>
@@ -311,7 +317,7 @@ dn: {$deps_to_migrate.$key.dn}
                        <p class='seperator'>&nbsp;</p> 
 
                        <div style='width:99%; text-align:right; padding:5px;'>
-                               <input type='submit' name='deps_visible_migrate_migrate' value='{t}Migrate{/t}'>
+                               <input type='submit' name='deps_visible_migrate_migrate' value='{t}Apply{/t}'>
                                &nbsp;
                                <input type='submit' name='deps_visible_migrate_close' value='{t}Cancel{/t}'>
                        </div>
@@ -365,7 +371,7 @@ dn: {$users_to_migrate.$key.dn}
                        <p class='seperator'>&nbsp;</p> 
 
                        <div style='width:99%; text-align:right; padding-top:5px;'>
-                               <input type='submit' name='users_visible_migrate_migrate' value='{t}Migrate{/t}'>
+                               <input type='submit' name='users_visible_migrate_migrate' value='{t}Apply{/t}'>
                                &nbsp;
                                <input type='submit' name='users_visible_migrate_close' value='{t}Cancel{/t}'>
                        </div>