Jelajahi Sumber

revert change username during reinstall

andre 4 tahun lalu
induk
melakukan
aabf622cb6

+ 0 - 3
app/UI/Reinstall/Forms/TemplateInstallForm.php

@@ -58,9 +58,6 @@ class TemplateInstallForm extends BaseForm implements ClientArea, AdminArea
 
         //entity id
         $this->addField(new Hidden("id"));
-        //user
-        $field = new Text('username');
-        $this->addField($field);
         //password
         $field = new Text('password');
         $field->notEmpty();

+ 2 - 4
app/UI/Reinstall/Providers/TemplateInstallProvider.php

@@ -113,16 +113,14 @@ class TemplateInstallProvider extends BaseDataProvider implements ClientArea, Ad
             $this->configuration()->isAgentServicePassword() &&
             !$this->configuration()->isAgentTemplateUser() &&
             preg_match('/w/', $vm ->config()['ostype'])){
-            $ciuser =  $this->formData['username'] ? $this->formData['username'] : $vm->config()['ciuser'];
+            $ciuser =  $vm->config()['ciuser'];
             $this->hosting()->update(['username' => $ciuser ?: 'Administrator' ]);
         }
         elseif($this->configuration()->isQemu() && $this->configuration()->getCiuser()){
-            $ciuser =  $this->formData['username'] ? $this->formData['username'] : $vm->config()['ciuser'];
-            $this->hosting()->update(['username' => $ciuser ?: 'root' ]);
+            $this->hosting()->update(['username' =>$this->configuration()->getCiuser() ]);
         }
         $arguments = [
             'hostingId'  => $this->getWhmcsParamByKey('serviceid'),
-            "username"   => $ciuser,
             "osTemplate" => $this->formData['id'],
             "password"   => encrypt(html_entity_decode($this->formData['password'],ENT_QUOTES)),
         ];

+ 0 - 2
langs/english.php

@@ -781,7 +781,6 @@ $_LANG['serverAA']['home']['mainContainer']['reinstallTab']['dataTable']['table'
 $_LANG['serverAA']['home']['mainContainer']['reinstallTab']['dataTable']['isoInstallButton']['button']['isoInstallButton'] = 'Install ISO Image';
 $_LANG['serverAA']['adminServicesTabFields']['templateInstallModal']['modal']['templateInstallModal'] = 'Reinstall Server';
 $_LANG['serverAA']['adminServicesTabFields']['templateInstallModal']['templateInstallForm']['confirmReinstall'] = 'Are you sure that you want to reinstall the server?';
-$_LANG['serverAA']['adminServicesTabFields']['templateInstallModal']['templateInstallForm']['username']['username'] = 'Admin User';
 $_LANG['serverAA']['adminServicesTabFields']['templateInstallModal']['templateInstallForm']['password']['password'] = 'Password';
 $_LANG['serverAA']['adminServicesTabFields']['templateInstallModal']['baseAcceptButton']['title'] = 'Confirm';
 $_LANG['serverAA']['adminServicesTabFields']['templateInstallModal']['baseCancelButton']['title'] = 'Cancel';
@@ -949,7 +948,6 @@ $_LANG['serverCA']['reinstall']['mainContainer']['reinstallTab']['dataTable']['t
 $_LANG['serverCA']['reinstall']['mainContainer']['reinstallTab']['dataTable']['table']['name'] =  'OS Template';
 $_LANG['serverCA']['reinstall']['templateInstallModal']['modal']['templateInstallModal'] = 'Reinstall Server';
 $_LANG['serverCA']['reinstall']['templateInstallModal']['templateInstallForm']['confirmReinstall'] = 'Are you sure that you want to reinstall the server?';
-$_LANG['serverCA']['reinstall']['templateInstallModal']['templateInstallForm']['username']['username'] = 'Admin User';
 $_LANG['serverCA']['reinstall']['templateInstallModal']['templateInstallForm']['password']['password'] = 'Password';
 $_LANG['serverCA']['reinstall']['templateInstallModal']['baseAcceptButton']['title'] = 'Confirm';
 $_LANG['serverCA']['reinstall']['templateInstallModal']['baseCancelButton']['title'] = 'Cancel';

+ 0 - 2
langs/german.php

@@ -762,7 +762,6 @@ $_LANG['serverAA']['home']['mainContainer']['reinstallTab']['dataTable']['table'
 $_LANG['serverAA']['home']['mainContainer']['reinstallTab']['dataTable']['isoInstallButton']['button']['isoInstallButton'] = 'ISO Abbild installieren';
 $_LANG['serverAA']['adminServicesTabFields']['templateInstallModal']['modal']['templateInstallModal'] = 'Server neu installieren';
 $_LANG['serverAA']['adminServicesTabFields']['templateInstallModal']['templateInstallForm']['confirmReinstall'] = 'Möchten Sie den Server wirklich neu installieren?';
-$_LANG['serverAA']['adminServicesTabFields']['templateInstallModal']['templateInstallForm']['username']['username'] = 'Admin User';
 $_LANG['serverAA']['adminServicesTabFields']['templateInstallModal']['templateInstallForm']['password']['password'] = 'Passwort';
 $_LANG['serverAA']['adminServicesTabFields']['templateInstallModal']['baseAcceptButton']['title'] = 'Bestätigen';
 $_LANG['serverAA']['adminServicesTabFields']['templateInstallModal']['baseCancelButton']['title'] = 'Abbrechen';
@@ -927,7 +926,6 @@ $_LANG['serverCA']['reinstall']['mainContainer']['reinstallTab']['dataTable']['t
 $_LANG['serverCA']['reinstall']['mainContainer']['reinstallTab']['dataTable']['table']['name'] =  'OS Template';
 $_LANG['serverCA']['reinstall']['templateInstallModal']['modal']['templateInstallModal'] = 'Server neu installieren';
 $_LANG['serverCA']['reinstall']['templateInstallModal']['templateInstallForm']['confirmReinstall'] = 'Möchten Sie den Server wirklich neu installieren?';
-$_LANG['serverCA']['reinstall']['templateInstallModal']['templateInstallForm']['username']['username'] = 'Admin User';
 $_LANG['serverCA']['reinstall']['templateInstallModal']['templateInstallForm']['password']['password'] = 'Passwort';
 $_LANG['serverCA']['reinstall']['templateInstallModal']['baseAcceptButton']['title'] = 'Bestätigen';
 $_LANG['serverCA']['reinstall']['templateInstallModal']['baseCancelButton']['title'] = 'Abbrechen';