Parcourir la source

Application create fix

Andrea Pollastri il y a 5 ans
Parent
commit
b67f3a8eaa
3 fichiers modifiés avec 9 ajouts et 8 suppressions
  1. 1 1
      go.sh
  2. 4 4
      resources/views/applications.blade.php
  3. 4 3
      storage/app/scripts/hostadd.sh

+ 1 - 1
go.sh

@@ -11,7 +11,7 @@ echo -e "\n"
 if [ "$(id -u)" = "0" ]; then
     clear
     echo "Running as root :)"
-    sleep 6s
+    sleep 2s
     echo -e "\n"
 else
     clear

+ 4 - 4
resources/views/applications.blade.php

@@ -45,7 +45,7 @@
 <div class="modal fade" id="createModal" tabindex="-1" role="dialog" aria-labelledby="createModalLabel" aria-hidden="true">
     <div class="modal-dialog" role="document">
         <div class="modal-content">
-            <form action="{{ route('applicationcreate') }}" method="POST">
+            <form action="{{ route('applicationcreate') }}" method="POST" id="form-app-create">
                 @csrf
                 <div class="modal-header">
                     <h5 class="modal-title" id="createModalLabel">{{ __('Create a new application') }}</h5>
@@ -89,11 +89,11 @@
                 <div class="modal-footer">
                     <button type="button" class="btn btn-secondary" data-dismiss="modal">{{ __('Close') }}</button>
                     <button type="submit" class="btn btn-primary" id="app-create">{{ __('Create application') }}</button>
-                    <button type="button" class="btn btn-danger" id="app-coming" style="display: none;">{{ __('Application is coming... Hold On!') }}</button>
+                    <button type="button" class="btn btn-danger" id="app-coming" style="display: none;">{{ __('Your application is coming... Hold On!') }}</button>
                 </div>
                 <script>
-                    $("#app-create").click(function() {
-                        $(this).hide();
+                    $("#form-app-create").submit(function() {
+                        $("#app-create").hide();
                         $("#app-coming").show();
                     });
                 </script>

+ 4 - 3
storage/app/scripts/hostadd.sh

@@ -307,11 +307,12 @@ echo "###CIPI###Ok"
 #LARAVEL
 if [ "$AUTO_INSTALL" = "laravel" ]; then
     cd /home/$USER_NAME/web/
-    rm -rf $BASE_PATH
-    composer create-project laravel/laravel laravel
+    rm -rf $/home/$USER_NAME/web/BASE_PATH
+    composer create-project laravel/laravel /home/$USER_NAME/web/$BASE_PATH
+    cd /home/$USER_NAME/web/$BASE_PATH
     find . -type f -exec chmod 644 {} \;
     find . -type d -exec chmod 755 {} \;
-    chmod 777 -R storage
+    chmod 777 -R /home/$USER_NAME/web/$BASE_PATH/storage
 fi
 
 #WORDPRESS