[chronojump-server] Minor changes



commit e2d7df9195f153ea11fcd505a1c14b007f3b33c0
Author: Max Ros i Morejon <mros33 gmail com>
Date:   Mon Mar 4 13:29:17 2019 +0100

    Minor changes

 .../organizations/groups/group_players_list.html   | 29 +++++++---------------
 .../organizations/players/players_list.html        | 12 ++++-----
 .../chronojump_networks/templates/pages/index.html | 10 ++++----
 3 files changed, 20 insertions(+), 31 deletions(-)
---
diff --git 
a/chronojumpserver-django/chronojump_networks/templates/organizations/groups/group_players_list.html 
b/chronojumpserver-django/chronojump_networks/templates/organizations/groups/group_players_list.html
index 04dad55..b350905 100644
--- a/chronojumpserver-django/chronojump_networks/templates/organizations/groups/group_players_list.html
+++ b/chronojumpserver-django/chronojump_networks/templates/organizations/groups/group_players_list.html
@@ -498,6 +498,15 @@
       // Load station from assigned gym to group
 
       console.log("initial gym is " + "{{ group.gym.name}}");
+      $('#numSets').val('1');
+      $('#numReps').val('1');
+      $('#taskLoad').val('');
+      $('#taskSpeed').val('');
+      $('#taskLaterality').val("RL");
+      $('#taskCoachComment').val('');
+      $('#lossBySpeed').val('');
+      $('#lossByPower').val('');
+      
       var group_id = {{ group.gym.id }};
       console.log('Look for gym with id ' + {{ group.gym.id }});
       $('#gymSelect').val(group_id);
@@ -675,26 +684,6 @@
       
     }
 
-    function clearModalForm() {
-      
-      $('#gymSelect').val();
-      $('#stationSelect').val();
-      $('#exerciseSelect').val();
-      $('#personId').val();
-      $('#numSets').val();
-      $('#numReps').val();
-      $('#taskLoad').val();
-      $('#taskSpeed').val();
-      $('#taskPercentMaxSpeed').val();
-      $('#taskLaterality').val();
-      $('#taskCoachComment').val();
-      $('#lossBySpeed').val();
-      $('#lossByPower').val();
-      $('#taskId').val("-1"); // To set as new task
-      $('#coachId').val();
-      
-    }
-
     function validateTask(task) {
       return task;
     }
diff --git a/chronojumpserver-django/chronojump_networks/templates/organizations/players/players_list.html 
b/chronojumpserver-django/chronojump_networks/templates/organizations/players/players_list.html
index a247c9f..5827e0a 100644
--- a/chronojumpserver-django/chronojump_networks/templates/organizations/players/players_list.html
+++ b/chronojumpserver-django/chronojump_networks/templates/organizations/players/players_list.html
@@ -121,15 +121,15 @@
       ],
       "dom": "<'row'<'col-sm-6'B><'col-sm-6'f>>rtip",
       buttons: [
-       { /* Add Player button */
-          text: "{% trans 'Add players' %}",
+       { /* Create Player button */
+          text: "{% trans 'Create player' %}",
           className: "btn btn-primary",
                  action: function( e, dt, node, config ) {
                  newPlayerInitialOperations();
                  // Set the title for new player task
-              var title = "{% trans 'Add new player '%}";
+              var title = "{% trans 'Create new player '%}";
               $('#playerModalTitle').text(title);
-              $('#btnAddModifyPlayer').text("{% trans 'Add player' %}");
+              $('#btnAddModifyPlayer').text("{% trans 'Create player' %}");
               $('#addPlayerModalForm').modal('show');
 
           }
@@ -300,7 +300,7 @@
             'method': 'POST',
             'data': player,
             success: function(data) {
-                alert("The player has been added");
+                alert("{% trans 'The player has been created' %}");
                 table_players.ajax.reload(enablePlayersTableFunctionality,false);
                 $('#addPlayerModalForm').modal('hide');
             },
@@ -319,7 +319,7 @@
             'method': 'PUT',
             'data': player,
             success: function(data) {
-                alert("The player has been updated");
+                alert("{% trans 'The player has been updated' %}");
                 table_players.ajax.reload(enablePlayersTableFunctionality, false);
                 $('#addPlayerModalForm').modal('hide');
             },
diff --git a/chronojumpserver-django/chronojump_networks/templates/pages/index.html 
b/chronojumpserver-django/chronojump_networks/templates/pages/index.html
index 0eb82ec..87910fc 100644
--- a/chronojumpserver-django/chronojump_networks/templates/pages/index.html
+++ b/chronojumpserver-django/chronojump_networks/templates/pages/index.html
@@ -87,18 +87,18 @@
     {% if user.id == user.organization.responsible.id %}
     <h2 class="text-center">{% trans 'Organization options' %}</h2>
     <div class="row buttons" >
-      <div class="col-sm-6 col-md-3">
-        <a class="btn btn-outline-primary btn-block font-weight-bold text-uppercase" href="">{% trans 
'Staff' %}</a>
-      </div>
+        <!--<div class="col-sm-6 col-md-3">
+            <a class="btn btn-outline-primary btn-block font-weight-bold text-uppercase" href="">{% trans 
'Staff' %}</a>
+        </div>-->
         <div class="col-sm-6 col-md-3">
           <a class="btn btn-outline-primary btn-block font-weight-bold text-uppercase" href="{% url 
'organizations:players_list' organization_id=user.organization.id %}">{% trans 'Players' %}</a>
         </div>
-        <div class="col-sm-6 col-md-3">
+        <!--<div class="col-sm-6 col-md-3">
           <a class="btn btn-outline-primary btn-block font-weight-bold text-uppercase" href="">{% trans 
'Groups' %}</a>
         </div>
         <div class="col-sm-6 col-md-3">
           <a class="btn btn-outline-primary btn-block font-weight-bold text-uppercase" href="">{% trans 
'Gyms' %}</a>
-        </div>
+        </div>-->
     </div>
     {% endif %}
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]