Ver a proveniência

Merge branch 'master' into beta

beta
Daniel há 2 anos
ascendente
cometimento
eaf3f34db5
14 ficheiros alterados com 36 adições e 25 eliminações
  1. +1
    -0
      .docker/docker-compose.yml
  2. +2
    -2
      src/client/app/js/app/core/Dict.js
  3. +3
    -3
      src/client/app/js/app/model/Group.js
  4. +1
    -1
      src/client/app/js/app/state/GroupDetailEdit.js
  5. +3
    -3
      src/client/app/tmpl/group-detail-edit.html
  6. +1
    -4
      src/client/app/tmpl/group-terms.html
  7. +1
    -1
      src/client/app/tmpl/home-modal-not-activated.html
  8. +1
    -1
      src/client/app/tmpl/home.html
  9. +2
    -0
      src/server/server/control/TB_Server_Control_Auth.php
  10. +13
    -4
      src/server/server/control/TB_Server_Control_Team.php
  11. +1
    -1
      src/server/shared/ent/teamdata/TB_Shared_Ent_TeamData_Profile.php
  12. +1
    -1
      src/server/shared/ent/teamdata/TB_Shared_Ent_TeamData_Team.php
  13. +1
    -1
      tools/patches/2addDbTermsConditionsToTeam.php
  14. +5
    -3
      tools/patches/4addDbNewUsersInactive.php

+ 1
- 0
.docker/docker-compose.yml Ver ficheiro

@@ -1,4 +1,5 @@
version: '3.7'
name: probuddy

services:
database:


+ 2
- 2
src/client/app/js/app/core/Dict.js Ver ficheiro

@@ -240,8 +240,8 @@ app.core.Dict = {
"EDIT_GROUP" : "Gruppe bearbeiten",
"GROUP_NAME" : "Gruppenname",
"GROUP_DESCRIPTION" : "Beschreibung",
"GROUP_NEW_USERS_ACTIVE": "Erweiterte Sicherheit",
"GROUP_NEW_USERS_ACTIVE_CHECKBOX": "Hiermit deaktiviere ich die erweiterte Sicherheit im Anmeldeprozess und setze alle neuen Teilnehmer automatisch auf aktiv.",
"GROUP_NEW_USERS_INACTIVE": "Erweiterte Sicherheit aktiv",
"GROUP_NEW_USERS_INACTIVE_CHECKBOX": "Bei erweiterter Sicherheit sind neu registrierte Teilnehmer vorab vom Gruppeninhaber oder Admin in der Mitgliederverwaltung auf \"aktiv\" zu setzen. \"Inaktive\" Teilnehmer können nicht Zusagen und keine Termindetails einsehen. Ist die erweiterte Sicherheit ausgeschaltet, werden neue Teilnehmer automatisch auf aktiv gesetzt.",
"GROUP_TERMS": "Nutzungsbedingungen",
"GROUP_TERMS_ACCEPT": "akzeptieren",
"GROUP_TERMS_ACCEPTED": "Du hast die Nutzungsbedingungen akzeptiert",


+ 3
- 3
src/client/app/js/app/model/Group.js Ver ficheiro

@@ -19,7 +19,7 @@ app.model.Group = function( data, memberData )
termsConditions = data.terms_conditions || null,
termsConditionsActive = data.terms_conditions_active == 1,
contactInformation = data.contact_information || null,
newUsersActive = data.new_users_active == 1,
newUsersInActive = data.new_users_inactive == 1,
emblemUrl = data.emblem_url || null,
emblem_cloud_id = data.emblem_cloud_id || null,
memberData = memberData || null,
@@ -119,9 +119,9 @@ app.model.Group = function( data, memberData )
return contactInformation;
};
this.getNewUsersActive = function()
this.getNewUsersInactive = function()
{
return newUsersActive;
return newUsersInActive;
};
/**


+ 1
- 1
src/client/app/js/app/state/GroupDetailEdit.js Ver ficheiro

@@ -41,7 +41,7 @@ app.state.GroupDetailEdit = function()
description: app.util.Helper.trim($form.find('[data-id="textarea-team-description"]').first().val()),
termsConditions: app.util.Helper.trim($form.find('[data-id="textarea-team-terms-conditions"]').first().val()),
termsConditionsActive: $form.find('[data-id="checkbox-team-terms-conditions-active"]').first().is(":checked"),
newUsersActive: $form.find('[data-id="checkbox-new-users-active"]').first().is(":checked"),
newUsersInactive: $form.find('[data-id="checkbox-new-users-active"]').first().is(":checked"),
contactInformation: app.util.Helper.trim($form.find('[data-id="textarea-team-contactinformation"]').first().val()),
industry: $form.find('[data-id="select-team-industry"]').first().val()
},


+ 3
- 3
src/client/app/tmpl/group-detail-edit.html Ver ficheiro

@@ -86,17 +86,17 @@
placeholder="<%= _lc( 'TEAM_DETAIL_TEAMDESCRIPTION_PLACEHOLDER' ) %>"><%= group.getDescription() ? group.getDescription() : '' %></textarea>
</div>
<div class="form-group">
<label><%= _lc( 'GROUP_NEW_USERS_ACTIVE' ) %></label>
<label><%= _lc( 'GROUP_NEW_USERS_INACTIVE' ) %></label>
<div class="custom-control custom-checkbox my-1 mr-sm-2">
<input type="checkbox"
name="checkbox-new-users-active"
data-id="checkbox-new-users-active"
id="checkbox-new-users-active"
class="custom-control-input"
<%= group.getNewUsersActive() ? 'checked' : '' %>
<%= group.getNewUsersInactive() ? 'checked' : '' %>
>
<label class="custom-control-label"
for="checkbox-new-users-active"><%= _lc( 'GROUP_NEW_USERS_ACTIVE_CHECKBOX' ) %></label>
for="checkbox-new-users-active"><%= _lc( 'GROUP_NEW_USERS_INACTIVE_CHECKBOX' ) %></label>
</div>
</div>
<div class="form-group">


+ 1
- 4
src/client/app/tmpl/group-terms.html Ver ficheiro

@@ -19,10 +19,7 @@
<p>
<strong><%= _lc( 'GROUP_TERMS_DESCRIPTION' ) %></strong>
</p>
<textarea maxlength="4096"
rows="5"
class="form-control"
disabled><%= group.getTermsConditions() ? group.getTermsConditions() : '' %></textarea>
<p><%=raw group.getTermsConditions() ? app.util.Helper.nl2br( group.getTermsConditions() ) : '' %></p>
<% if ( group.getTermsConditionsActive() ) { %>
<div class="form-group">
<div class="custom-control custom-checkbox my-1 mr-sm-2">


+ 1
- 1
src/client/app/tmpl/home-modal-not-activated.html Ver ficheiro

@@ -1,5 +1,5 @@
<strong><%= _lc( 'HOME_MODAL_NOT_ACTIVATED_TEXT1' ) %> <%= groupName %>.</strong><br /><br />
<%= _lc( 'HOME_MODAL_NOT_ACTIVATED_TEXT2' ) %>
<div class="button-like-modal-footer">
<a href="#/configuration/account" class="btn btn-sm btn-secondary" data-id="not-activated"><%= _lc( 'HOME_MODAL_NOT_ACTIVATED_BUTTON' ) %></a>
<a href="#/configuration/account/edit-address" class="btn btn-sm btn-secondary" data-id="not-activated"><%= _lc( 'HOME_MODAL_NOT_ACTIVATED_BUTTON' ) %></a>
</div>

+ 1
- 1
src/client/app/tmpl/home.html Ver ficheiro

@@ -9,7 +9,7 @@
<i class="fa fa-info-circle"></i>
<%= _lc( 'HOME_GROUPS_NOT_ACTIVE_TEXT1' ) %><strong><%= groupsNotActiveString %></strong><br/>
<%= _lc( 'HOME_GROUPS_NOT_ACTIVE_TEXT2' ) %>
<a class="" href="#/groups">-> <%= _lc( 'HOME_GROUPS_NOT_ACTIVE_BTN' ) %></a>
<strong><a class="" href="#/groups">-> <%= _lc( 'HOME_GROUPS_NOT_ACTIVE_BTN' ) %></a></strong>
</div>
</div>
</div>


+ 2
- 0
src/server/server/control/TB_Server_Control_Auth.php Ver ficheiro

@@ -690,6 +690,8 @@ class TB_Server_Control_Auth
$team->display_name = _xss( $teamName );
$team->category = _xss( $teamCategory );
$team->affiliate_id = is_string( $affiliateId ) ? _xss( $affiliateId ) : NULL;
$team->terms_conditions_active = 0;
$team->new_users_inactive = 1;
$team->save();
// Set default course categories


+ 13
- 4
src/server/server/control/TB_Server_Control_Team.php Ver ficheiro

@@ -639,11 +639,20 @@ class TB_Server_Control_Team {
$category = $params->get( 'industry', $team->category );
$team->display_name = _xss( $displayName );
$team->category = _xss( $category );
$team->description = _xss( $params->get( 'description' ) );
$team->terms_conditions = _xss( $params->get( 'termsConditions' ) );
$description = _xss($params->get('description'));
$toc = _xss( $params->get('termsConditions'));
$contactInformation = _xss($params->get( 'contactInformation'));
$description = ($description === '') ? null : TB_Server_Utils_Helper::makeUrltoLink($description);
$toc = ($toc === '') ? null : TB_Server_Utils_Helper::makeUrltoLink($toc);
$contactInformation = ($contactInformation === '') ? null : TB_Server_Utils_Helper::makeUrltoLink($contactInformation);
$team->description = $description;
$team->terms_conditions = $toc;
$team->terms_conditions_active = $params->get( 'termsConditionsActive' ) === true ? 1 : 0;
$team->new_users_active = $params->get( 'newUsersActive' ) === true ? 1 : 0;
$team->contact_information = _xss( $params->get( 'contactInformation' ) );
$team->new_users_inactive = $params->get( 'newUsersInactive' ) === true ? 1 : 0;
$team->contact_information = $contactInformation;
$team->save();
return $resp;


+ 1
- 1
src/server/shared/ent/teamdata/TB_Shared_Ent_TeamData_Profile.php Ver ficheiro

@@ -510,7 +510,7 @@ class TB_Shared_Ent_TeamData_Profile extends Francis_Db_Row {
'role' => TB_Shared_Ent_TeamData_Profile::ROLE_PLAYER,
'is_anonymous' => 0,
'join_dt' => TB_Server_Utils_Helper::getUTCNowDateTime(),
'status' => $team->new_users_active ? self::STATUS_ACTIVE : self::STATUS_NOT_APPROVED,
'status' => $team->new_users_inactive ? self::STATUS_NOT_APPROVED : self::STATUS_ACTIVE,
'terms_accepted' => 0
);


+ 1
- 1
src/server/shared/ent/teamdata/TB_Shared_Ent_TeamData_Team.php Ver ficheiro

@@ -14,7 +14,7 @@
* @property string|NULL $contact_information
* @property string|NULL $terms_conditions
* @property bool $terms_conditions_active
* @property bool $new_users_active
* @property bool $new_users_inactive
* @property string $emblem_url
* @property string $emblem_cloud_id
* @property array|null $course_categories_js


+ 1
- 1
tools/patches/2addDbTermsConditionsToTeam.php Ver ficheiro

@@ -16,4 +16,4 @@ function patch_addTermsConditionsToTeam()
echo "DONE...";
}

patch_addTermsConditionsToTeam();
patch();

tools/patches/4addDbNewUsersActive.php → tools/patches/4addDbNewUsersInactive.php Ver ficheiro

@@ -3,16 +3,18 @@
require_once __DIR__ . '/../../src/server/server/config/boot_global.php';
require_once __DIR__ . '/../../src/server/server/config/boot_local.php';

function patch_addTermsConditionsToTeam()
function patch()
{

$db = TB_Shared_Db_TeamData::get();

$sql = "ALTER TABLE team
ADD COLUMN new_users_active TINYINT(1) NOT NULL DEFAULT 0 AFTER terms_conditions_active;";
ADD COLUMN new_users_inactive TINYINT(1) NOT NULL DEFAULT 1 AFTER terms_conditions_active;";
$stmt = $db->query( $sql );

$sql = "UPDATE team SET new_users_inactive = 0 WHERE 1";
$stmt = $db->query( $sql );
echo "DONE...";
}

patch_addTermsConditionsToTeam();
patch();

Carregando…
Cancelar
Guardar