| @@ -1,4 +1,5 @@ | |||||
| version: '3.7' | version: '3.7' | ||||
| name: probuddy | |||||
| services: | services: | ||||
| database: | database: | ||||
| @@ -240,8 +240,8 @@ app.core.Dict = { | |||||
| "EDIT_GROUP" : "Gruppe bearbeiten", | "EDIT_GROUP" : "Gruppe bearbeiten", | ||||
| "GROUP_NAME" : "Gruppenname", | "GROUP_NAME" : "Gruppenname", | ||||
| "GROUP_DESCRIPTION" : "Beschreibung", | "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": "Nutzungsbedingungen", | ||||
| "GROUP_TERMS_ACCEPT": "akzeptieren", | "GROUP_TERMS_ACCEPT": "akzeptieren", | ||||
| "GROUP_TERMS_ACCEPTED": "Du hast die Nutzungsbedingungen akzeptiert", | "GROUP_TERMS_ACCEPTED": "Du hast die Nutzungsbedingungen akzeptiert", | ||||
| @@ -19,7 +19,7 @@ app.model.Group = function( data, memberData ) | |||||
| termsConditions = data.terms_conditions || null, | termsConditions = data.terms_conditions || null, | ||||
| termsConditionsActive = data.terms_conditions_active == 1, | termsConditionsActive = data.terms_conditions_active == 1, | ||||
| contactInformation = data.contact_information || null, | contactInformation = data.contact_information || null, | ||||
| newUsersActive = data.new_users_active == 1, | |||||
| newUsersInActive = data.new_users_inactive == 1, | |||||
| emblemUrl = data.emblem_url || null, | emblemUrl = data.emblem_url || null, | ||||
| emblem_cloud_id = data.emblem_cloud_id || null, | emblem_cloud_id = data.emblem_cloud_id || null, | ||||
| memberData = memberData || null, | memberData = memberData || null, | ||||
| @@ -119,9 +119,9 @@ app.model.Group = function( data, memberData ) | |||||
| return contactInformation; | return contactInformation; | ||||
| }; | }; | ||||
| this.getNewUsersActive = function() | |||||
| this.getNewUsersInactive = function() | |||||
| { | { | ||||
| return newUsersActive; | |||||
| return newUsersInActive; | |||||
| }; | }; | ||||
| /** | /** | ||||
| @@ -41,7 +41,7 @@ app.state.GroupDetailEdit = function() | |||||
| description: app.util.Helper.trim($form.find('[data-id="textarea-team-description"]').first().val()), | 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()), | 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"), | 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()), | contactInformation: app.util.Helper.trim($form.find('[data-id="textarea-team-contactinformation"]').first().val()), | ||||
| industry: $form.find('[data-id="select-team-industry"]').first().val() | industry: $form.find('[data-id="select-team-industry"]').first().val() | ||||
| }, | }, | ||||
| @@ -86,17 +86,17 @@ | |||||
| placeholder="<%= _lc( 'TEAM_DETAIL_TEAMDESCRIPTION_PLACEHOLDER' ) %>"><%= group.getDescription() ? group.getDescription() : '' %></textarea> | placeholder="<%= _lc( 'TEAM_DETAIL_TEAMDESCRIPTION_PLACEHOLDER' ) %>"><%= group.getDescription() ? group.getDescription() : '' %></textarea> | ||||
| </div> | </div> | ||||
| <div class="form-group"> | <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"> | <div class="custom-control custom-checkbox my-1 mr-sm-2"> | ||||
| <input type="checkbox" | <input type="checkbox" | ||||
| name="checkbox-new-users-active" | name="checkbox-new-users-active" | ||||
| data-id="checkbox-new-users-active" | data-id="checkbox-new-users-active" | ||||
| id="checkbox-new-users-active" | id="checkbox-new-users-active" | ||||
| class="custom-control-input" | class="custom-control-input" | ||||
| <%= group.getNewUsersActive() ? 'checked' : '' %> | |||||
| <%= group.getNewUsersInactive() ? 'checked' : '' %> | |||||
| > | > | ||||
| <label class="custom-control-label" | <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> | </div> | ||||
| <div class="form-group"> | <div class="form-group"> | ||||
| @@ -19,10 +19,7 @@ | |||||
| <p> | <p> | ||||
| <strong><%= _lc( 'GROUP_TERMS_DESCRIPTION' ) %></strong> | <strong><%= _lc( 'GROUP_TERMS_DESCRIPTION' ) %></strong> | ||||
| </p> | </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() ) { %> | <% if ( group.getTermsConditionsActive() ) { %> | ||||
| <div class="form-group"> | <div class="form-group"> | ||||
| <div class="custom-control custom-checkbox my-1 mr-sm-2"> | <div class="custom-control custom-checkbox my-1 mr-sm-2"> | ||||
| @@ -1,5 +1,5 @@ | |||||
| <strong><%= _lc( 'HOME_MODAL_NOT_ACTIVATED_TEXT1' ) %> <%= groupName %>.</strong><br /><br /> | <strong><%= _lc( 'HOME_MODAL_NOT_ACTIVATED_TEXT1' ) %> <%= groupName %>.</strong><br /><br /> | ||||
| <%= _lc( 'HOME_MODAL_NOT_ACTIVATED_TEXT2' ) %> | <%= _lc( 'HOME_MODAL_NOT_ACTIVATED_TEXT2' ) %> | ||||
| <div class="button-like-modal-footer"> | <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> | </div> | ||||
| @@ -9,7 +9,7 @@ | |||||
| <i class="fa fa-info-circle"></i> | <i class="fa fa-info-circle"></i> | ||||
| <%= _lc( 'HOME_GROUPS_NOT_ACTIVE_TEXT1' ) %><strong><%= groupsNotActiveString %></strong><br/> | <%= _lc( 'HOME_GROUPS_NOT_ACTIVE_TEXT1' ) %><strong><%= groupsNotActiveString %></strong><br/> | ||||
| <%= _lc( 'HOME_GROUPS_NOT_ACTIVE_TEXT2' ) %> | <%= _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> | </div> | ||||
| </div> | </div> | ||||
| @@ -690,6 +690,8 @@ class TB_Server_Control_Auth | |||||
| $team->display_name = _xss( $teamName ); | $team->display_name = _xss( $teamName ); | ||||
| $team->category = _xss( $teamCategory ); | $team->category = _xss( $teamCategory ); | ||||
| $team->affiliate_id = is_string( $affiliateId ) ? _xss( $affiliateId ) : NULL; | $team->affiliate_id = is_string( $affiliateId ) ? _xss( $affiliateId ) : NULL; | ||||
| $team->terms_conditions_active = 0; | |||||
| $team->new_users_inactive = 1; | |||||
| $team->save(); | $team->save(); | ||||
| // Set default course categories | // Set default course categories | ||||
| @@ -639,11 +639,20 @@ class TB_Server_Control_Team { | |||||
| $category = $params->get( 'industry', $team->category ); | $category = $params->get( 'industry', $team->category ); | ||||
| $team->display_name = _xss( $displayName ); | $team->display_name = _xss( $displayName ); | ||||
| $team->category = _xss( $category ); | $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->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(); | $team->save(); | ||||
| return $resp; | return $resp; | ||||
| @@ -510,7 +510,7 @@ class TB_Shared_Ent_TeamData_Profile extends Francis_Db_Row { | |||||
| 'role' => TB_Shared_Ent_TeamData_Profile::ROLE_PLAYER, | 'role' => TB_Shared_Ent_TeamData_Profile::ROLE_PLAYER, | ||||
| 'is_anonymous' => 0, | 'is_anonymous' => 0, | ||||
| 'join_dt' => TB_Server_Utils_Helper::getUTCNowDateTime(), | '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 | 'terms_accepted' => 0 | ||||
| ); | ); | ||||
| @@ -14,7 +14,7 @@ | |||||
| * @property string|NULL $contact_information | * @property string|NULL $contact_information | ||||
| * @property string|NULL $terms_conditions | * @property string|NULL $terms_conditions | ||||
| * @property bool $terms_conditions_active | * @property bool $terms_conditions_active | ||||
| * @property bool $new_users_active | |||||
| * @property bool $new_users_inactive | |||||
| * @property string $emblem_url | * @property string $emblem_url | ||||
| * @property string $emblem_cloud_id | * @property string $emblem_cloud_id | ||||
| * @property array|null $course_categories_js | * @property array|null $course_categories_js | ||||
| @@ -16,4 +16,4 @@ function patch_addTermsConditionsToTeam() | |||||
| echo "DONE..."; | echo "DONE..."; | ||||
| } | } | ||||
| patch_addTermsConditionsToTeam(); | |||||
| patch(); | |||||
| @@ -3,16 +3,18 @@ | |||||
| require_once __DIR__ . '/../../src/server/server/config/boot_global.php'; | require_once __DIR__ . '/../../src/server/server/config/boot_global.php'; | ||||
| require_once __DIR__ . '/../../src/server/server/config/boot_local.php'; | require_once __DIR__ . '/../../src/server/server/config/boot_local.php'; | ||||
| function patch_addTermsConditionsToTeam() | |||||
| function patch() | |||||
| { | { | ||||
| $db = TB_Shared_Db_TeamData::get(); | $db = TB_Shared_Db_TeamData::get(); | ||||
| $sql = "ALTER TABLE team | $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 ); | $stmt = $db->query( $sql ); | ||||
| $sql = "UPDATE team SET new_users_inactive = 0 WHERE 1"; | |||||
| $stmt = $db->query( $sql ); | |||||
| echo "DONE..."; | echo "DONE..."; | ||||
| } | } | ||||
| patch_addTermsConditionsToTeam(); | |||||
| patch(); | |||||