mirror of
https://github.com/humhub/humhub.git
synced 2025-01-29 12:28:06 +01:00
Migrated CActiveForm to ActiveForm
This commit is contained in:
parent
e11d033cca
commit
f0bd0035f8
@ -117,7 +117,7 @@
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
float: left;
|
||||
margin-right: 6px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.regular-checkbox:checked + .regular-checkbox-box {
|
||||
@ -160,7 +160,7 @@
|
||||
border-radius: 50px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
margin-right: 6px;
|
||||
margin-right: 5px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
@ -183,3 +183,11 @@
|
||||
border: 2px solid #ccc;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.chk_rdo .form-group {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.chk_rdo .form-group label {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ use yii\helpers\Url;
|
||||
|
||||
<?php $form = ActiveForm::begin(['id' => 'authentication-settings-form']); ?>
|
||||
|
||||
|
||||
|
||||
<?php echo $form->field($model, 'enabled')->checkbox(['readonly' => Setting::IsFixed('enabled', 'authentication_ldap')]); ?>
|
||||
<hr>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use \humhub\compat\CActiveForm;
|
||||
use yii\bootstrap\ActiveForm;
|
||||
use \humhub\compat\CHtml;
|
||||
use yii\helpers\Html;
|
||||
use \humhub\models\Setting;
|
||||
@ -12,77 +12,48 @@ use humhub\modules\space\models\Space;
|
||||
<div
|
||||
class="panel-heading"><?php echo Yii::t('SpaceModule.views_admin_edit', '<strong>General</strong> space settings'); ?></div>
|
||||
<div class="panel-body">
|
||||
<?php $form = CActiveForm::begin(); ?>
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<?php //echo $form->errorSummary($model); ?>
|
||||
<?php echo $form->field($model, 'name')->textInput(['maxlength' => 45]); ?>
|
||||
|
||||
<?php echo $form->field($model, 'description')->textarea(['rows' => 6]); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo $form->labelEx($model, 'name'); ?>
|
||||
<?php echo $form->textField($model, 'name', array('class' => 'form-control', 'maxlength' => 45)); ?>
|
||||
<?php echo $form->error($model, 'name'); ?>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'website')->textInput(['maxlength' => 45]); ?>
|
||||
|
||||
<?php echo $form->field($model, 'tags')->textInput(['maxlength' => 200]); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo $form->labelEx($model, 'description'); ?>
|
||||
<?php echo $form->textArea($model, 'description', array('class' => 'form-control', 'rows' => '6')); ?>
|
||||
<?php echo $form->error($model, 'description'); ?>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'space_type_id')->dropdownList($types); ?>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo $form->labelEx($model, 'website'); ?>
|
||||
<?php echo $form->textField($model, 'website', array('class' => 'form-control', 'maxlength' => 45)); ?>
|
||||
<?php echo $form->error($model, 'website'); ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<?php echo $form->labelEx($model, 'tags'); ?>
|
||||
<?php echo $form->textField($model, 'tags', array('class' => 'form-control', 'maxlength' => 200)); ?>
|
||||
<?php echo $form->error($model, 'tags'); ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<?php echo $form->labelEx($model, 'space_type_id'); ?>
|
||||
<?php echo $form->dropDownList($model, 'space_type_id', $types, array('class' => 'form-control')); ?>
|
||||
<?php echo $form->error($model, 'space_type_id'); ?>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<?php echo $form->labelEx($model, 'join_policy'); ?>
|
||||
<?php $joinPolicies = array(0 => Yii::t('SpaceModule.base', 'Only by invite'), 1 => Yii::t('SpaceModule.base', 'Invite and request'), 2 => Yii::t('SpaceModule.base', 'Everyone can enter')); ?>
|
||||
<?php echo $form->dropDownList($model, 'join_policy', $joinPolicies, array('class' => 'form-control', 'id' => 'join_policy_dropdown', 'hint' => Yii::t('SpaceModule.views_admin_edit', 'Choose the kind of membership you want to provide for this workspace.'))); ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo $form->labelEx($model, 'visibility'); ?>
|
||||
<?php
|
||||
$visibilities = array(
|
||||
0 => Yii::t('SpaceModule.base', 'Private (Invisible)'),
|
||||
1 => Yii::t('SpaceModule.base', 'Public (Registered users only)')
|
||||
);
|
||||
if (Setting::Get('allowGuestAccess', 'authentication_internal') == 1) {
|
||||
$visibilities[2] = Yii::t('SpaceModule.base', 'Visible for all (members and guests)');
|
||||
}
|
||||
?>
|
||||
<?php echo $form->dropDownList($model, 'visibility', $visibilities, array('class' => 'form-control', 'id' => 'join_visibility_dropdown', 'hint' => Yii::t('SpaceModule.views_admin_edit', 'Choose the security level for this workspace to define the visibleness.'))); ?>
|
||||
<?php echo $form->error($model, 'visibility'); ?>
|
||||
</div>
|
||||
<?php $joinPolicies = array(0 => Yii::t('SpaceModule.base', 'Only by invite'), 1 => Yii::t('SpaceModule.base', 'Invite and request'), 2 => Yii::t('SpaceModule.base', 'Everyone can enter')); ?>
|
||||
<?php echo $form->field($model, 'join_policy')->dropdownList($joinPolicies, ['id' => 'join_policy_dropdown']); ?>
|
||||
<p class="help-block"><?php echo Yii::t('SpaceModule.views_admin_edit', 'Choose the kind of membership you want to provide for this workspace.'); ?></p>
|
||||
<br>
|
||||
|
||||
<?php
|
||||
$visibilities = array(
|
||||
0 => Yii::t('SpaceModule.base', 'Private (Invisible)'),
|
||||
1 => Yii::t('SpaceModule.base', 'Public (Registered users only)')
|
||||
);
|
||||
if (Setting::Get('allowGuestAccess', 'authentication_internal') == 1) {
|
||||
$visibilities[2] = Yii::t('SpaceModule.base', 'Visible for all (members and guests)');
|
||||
}
|
||||
?>
|
||||
<?php echo $form->field($model, 'visibility')->dropdownList($visibilities, ['id' => 'join_visibility_dropdown']); ?>
|
||||
<p class="help-block"><?php echo Yii::t('SpaceModule.views_admin_edit', 'Choose the security level for this workspace to define the visibleness.'); ?></p>
|
||||
|
||||
<br>
|
||||
<?php $defaultVisibilityLabel = Yii::t('SpaceModule.base', 'Default') . ' (' . ((\humhub\models\Setting::Get('defaultContentVisibility', 'space') == 1) ? Yii::t('SpaceModule.base', 'Public') : Yii::t('SpaceModule.base', 'Private')) . ')'; ?>
|
||||
<?php $contentVisibilities = array('' => $defaultVisibilityLabel, 0 => Yii::t('SpaceModule.base', 'Private'), 1 => Yii::t('SpaceModule.base', 'Public')); ?>
|
||||
<?php echo $form->field($model, 'default_content_visibility')->dropdownList($contentVisibilities); ?>
|
||||
<p class="help-block"><?php echo Yii::t('SpaceModule.views_admin_edit', 'Choose if new content should be public or private by default'); ?></p>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo $form->labelEx($model, 'default_content_visibility'); ?>
|
||||
<?php $defaultVisibilityLabel = Yii::t('SpaceModule.base', 'Default') . ' (' . ((\humhub\models\Setting::Get('defaultContentVisibility', 'space') == 1) ? Yii::t('SpaceModule.base', 'Public') : Yii::t('SpaceModule.base', 'Private')) . ')'; ?>
|
||||
<?php $contentVisibilities = array('' => $defaultVisibilityLabel, 0 => Yii::t('SpaceModule.base', 'Private'), 1 => Yii::t('SpaceModule.base', 'Public')); ?>
|
||||
<?php echo $form->dropDownList($model, 'default_content_visibility', $contentVisibilities, array('class' => 'form-control')); ?>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<?php if (Yii::$app->user->isAdmin() && Setting::Get('enabled', 'authentication_ldap')): ?>
|
||||
<div class="form-group">
|
||||
<?php echo $form->labelEx($model, 'ldap_dn'); ?>
|
||||
<?php echo $form->textField($model, 'ldap_dn', array('class' => 'form-control', 'maxlength' => 255)); ?>
|
||||
<?php echo $form->error($model, 'ldap_dn'); ?>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'ldap_dn')->textInput(['maxlength' => 255]); ?>
|
||||
<hr>
|
||||
<?php endif; ?>
|
||||
|
||||
@ -100,7 +71,7 @@ use humhub\modules\space\models\Space;
|
||||
|
||||
</div>
|
||||
|
||||
<?php CActiveForm::end(); ?>
|
||||
<?php ActiveForm::end(); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
use humhub\compat\CActiveForm;
|
||||
use yii\widgets\ActiveForm;
|
||||
use yii\helpers\Url;
|
||||
use humhub\modules\space\models\Space;
|
||||
use humhub\models\Setting;
|
||||
use humhub\modules\space\permissions\CreatePublicSpace;
|
||||
use humhub\modules\space\permissions\CreatePrivateSpace;
|
||||
|
||||
?>
|
||||
<div class="modal-dialog modal-dialog-small animated fadeIn">
|
||||
<div class="modal-content">
|
||||
<?php $form = CActiveForm::begin(); ?>
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"
|
||||
@ -17,26 +17,16 @@ use humhub\modules\space\permissions\CreatePrivateSpace;
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<hr/>
|
||||
<br/>
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo $form->field($model, 'name')->textInput(['placeholder' => Yii::t('SpaceModule.views_create_create', 'space name')]); ?>
|
||||
|
||||
<label><?php echo Yii::t('SpaceModule.views_create_create', 'How you want to name your space?'); ?></label>
|
||||
<?php print $form->textField($model, 'name', array('class' => 'form-control', 'placeholder' => Yii::t('SpaceModule.views_create_create', 'space name'))); ?>
|
||||
<?php echo $form->error($model, 'name'); ?>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><?php echo Yii::t('SpaceModule.views_create_create', 'Please write down a small description for other users.'); ?></label>
|
||||
<?php print $form->textArea($model, 'description', array('class' => 'form-control', 'rows' => '3', 'placeholder' => Yii::t('SpaceModule.views_create_create', 'space description'))); ?>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'description')->textarea(['placeholder' => Yii::t('SpaceModule.views_create_create', 'space description'), 'rows' => '3']); ?>
|
||||
|
||||
<?php if (count($types) > 1) : ?>
|
||||
<div class="form-group">
|
||||
<label><?php echo Yii::t('SpaceModule.views_create_create', 'Select the type of this space'); ?></label>
|
||||
<?php print $form->dropDownList($model, 'space_type_id', $types, array('class' => 'form-control', 'rows' => '3', 'placeholder' => Yii::t('SpaceModule.views_create_create', 'space description'))); ?>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'space_type_id')->dropdownList($types); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<a data-toggle="collapse" id="access-settings-link" href="#collapse-access-settings"
|
||||
@ -51,76 +41,39 @@ use humhub\modules\space\permissions\CreatePrivateSpace;
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label for=""><?php echo Yii::t('SpaceModule.views_create_create', 'Join Policy'); ?></label>
|
||||
<label for=""><strong><?php echo Yii::t('SpaceModule.views_create_create', 'Join Policy'); ?></strong></label>
|
||||
|
||||
<div class="radio">
|
||||
<label class="tt" data-toggle="tooltip" data-placement="top"
|
||||
title="<?php echo Yii::t('SpaceModule.views_create_create', 'Users can be only added<br>by invitation'); ?>">
|
||||
<?php echo $form->radioButton($model, 'join_policy', array('value' => 0, 'id' => 'invite_radio')); ?>
|
||||
<?php echo Yii::t('SpaceModule.base', 'Only by invite'); ?>
|
||||
</label>
|
||||
<div class="chk_rdo">
|
||||
<?php echo $form->field($model, 'join_policy')->radio(['value' => 0, 'id' => 'invite_radio', 'label' => Yii::t('SpaceModule.base', 'Only by invite')]); ?>
|
||||
<?php echo $form->field($model, 'join_policy')->radio(['value' => 1, 'id' => 'request_radio', 'label' => Yii::t('SpaceModule.base', 'Invite and request')]); ?>
|
||||
<?php echo $form->field($model, 'join_policy')->radio(['value' => 2, 'id' => 'everyone_radio', 'label' => Yii::t('SpaceModule.base', 'Everyone can enter')]); ?>
|
||||
<br>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label class="tt" data-toggle="tooltip" data-placement="top"
|
||||
title="<?php echo Yii::t('SpaceModule.views_create_create', 'Users can also apply for a<br>membership to this space'); ?>">
|
||||
<?php echo $form->radioButton($model, 'join_policy', array('value' => 1, 'id' => 'request_radio')); ?>
|
||||
<?php echo Yii::t('SpaceModule.base', ' Invite and request'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label class="tt" data-toggle="tooltip" data-placement="top"
|
||||
title="<?php echo Yii::t('SpaceModule.views_create_create', 'Every user can enter your space<br>without your approval'); ?>">
|
||||
<?php echo $form->radioButton($model, 'join_policy', array('value' => 2, 'id' => 'everyone_radio')); ?>
|
||||
<?php echo Yii::t('SpaceModule.base', 'Everyone can enter'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for=""><?php echo Yii::t('SpaceModule.views_create_create', 'Visibility'); ?></label>
|
||||
|
||||
<label for=""><strong><?php echo Yii::t('SpaceModule.views_create_create', 'Visibility'); ?></strong></label>
|
||||
<div class="chk_rdo">
|
||||
<?php if (Yii::$app->user->permissionmanager->can(new CreatePublicSpace) && Yii::$app->user->permissionmanager->can(new CreatePrivateSpace())): ?>
|
||||
<?php if (Setting::Get('allowGuestAccess', 'authentication_internal')) : ?>
|
||||
<div class="radio">
|
||||
<label class="tt" data-toggle="tooltip" data-placement="top">
|
||||
<?php echo $form->radioButton($model, 'visibility', array('value' => 2, 'id' => 'public_radio')); ?>
|
||||
<?php echo Yii::t('SpaceModule.base', 'Public (Members & Guests)'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'visibility')->radio(['value' => 2, 'id' => 'public_radio_guests', 'label' => Yii::t('SpaceModule.base', 'Public (Members & Guests)')]); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="radio">
|
||||
<label class="tt" data-toggle="tooltip" data-placement="top"
|
||||
title="<?php echo Yii::t('SpaceModule.views_create_create', 'Also non-members can see this<br>space, but have no access'); ?>">
|
||||
<?php echo $form->radioButton($model, 'visibility', array('value' => 1, 'id' => 'public_radio')); ?>
|
||||
<?php echo Yii::t('SpaceModule.base', 'Public (Members only)'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label class="tt" data-toggle="tooltip" data-placement="top"
|
||||
title="<?php echo Yii::t('SpaceModule.views_create_create', 'This space will be hidden<br>for all non-members'); ?>">
|
||||
<?php echo $form->radioButton($model, 'visibility', array('value' => 0, 'uncheckValue' => null, 'id' => 'private_radio')); ?>
|
||||
<?php echo Yii::t('SpaceModule.base', 'Private (Invisible)'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'visibility')->radio(['value' => 1, 'id' => 'public_radio', 'label' => Yii::t('SpaceModule.base', 'Public (Members only)')]); ?>
|
||||
|
||||
<?php echo $form->field($model, 'visibility')->radio(['value' => 0, 'id' => 'private_radio', 'label' => Yii::t('SpaceModule.base', 'Private (Invisible)')]); ?>
|
||||
|
||||
<?php elseif (Yii::$app->user->permissionmanager->can(new CreatePublicSpace)): ?>
|
||||
<div>
|
||||
<?php echo $form->hiddenField($model, 'visibility', [], Space::VISIBILITY_ALL); ?>
|
||||
<?php echo Yii::t('SpaceModule.views_create_create', 'Public (Visible)'); ?>
|
||||
</div>
|
||||
<?php elseif (Yii::$app->user->permissionmanager->can(new CreatePrivateSpace())):
|
||||
?>
|
||||
<div>
|
||||
<?php echo $form->hiddenField($model, 'visibility', [], Space::VISIBILITY_NONE); ?>
|
||||
<?php echo Yii::t('SpaceModule.views_create_create', 'Private (Invisible)'); ?>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'visibility')->radio(['value' => 0, 'id' => 'private_radio', 'label' => Yii::t('SpaceModule.base', 'Private (Invisible)')]); ?>
|
||||
<?php elseif (Yii::$app->user->permissionmanager->can(new CreatePrivateSpace())): ?>
|
||||
<?php echo $form->field($model, 'visibility')->radio(['value' => 0, 'id' => 'private_radio', 'label' => Yii::t('SpaceModule.base', 'Private (Invisible)')]); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class=" modal-footer">
|
||||
<hr/>
|
||||
<br/>
|
||||
<?php
|
||||
@ -142,7 +95,7 @@ use humhub\modules\space\permissions\CreatePrivateSpace;
|
||||
<?php echo \humhub\widgets\LoaderWidget::widget(['id' => 'create-loader', 'cssClass' => 'loader-modal hidden']); ?>
|
||||
</div>
|
||||
|
||||
<?php CActiveForm::end(); ?>
|
||||
<?php ActiveForm::end(); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -160,10 +113,10 @@ use humhub\modules\space\permissions\CreatePrivateSpace;
|
||||
$('#Space_name').focus();
|
||||
|
||||
// Shake modal after wrong validation
|
||||
<?php if ($model->hasErrors()) { ?>
|
||||
$('.modal-dialog').removeClass('fadeIn');
|
||||
$('.modal-dialog').addClass('shake');
|
||||
<?php } ?>
|
||||
<?php if ($model->hasErrors()) { ?>
|
||||
$('.modal-dialog').removeClass('fadeIn');
|
||||
$('.modal-dialog').addClass('shake');
|
||||
<?php } ?>
|
||||
|
||||
$('#collapse-access-settings').on('show.bs.collapse', function () {
|
||||
// change link arrow
|
||||
@ -188,7 +141,4 @@ use humhub\modules\space\permissions\CreatePrivateSpace;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</script>
|
@ -81,7 +81,12 @@ class AuthController extends Controller
|
||||
$invite->save();
|
||||
$invite->sendInviteMail();
|
||||
|
||||
return $this->render('register_success', ['model' => $registerModel]);
|
||||
if (Yii::$app->request->getIsAjax()) {
|
||||
return $this->render('register_success_modal', ['model' => $registerModel]);
|
||||
} else {
|
||||
return $this->render('register_success', ['model' => $registerModel]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use \humhub\compat\CActiveForm;
|
||||
use yii\widgets\ActiveForm;
|
||||
use \humhub\compat\CHtml;
|
||||
?>
|
||||
|
||||
@ -8,24 +8,18 @@ use \humhub\compat\CHtml;
|
||||
<?php echo Yii::t('UserModule.views_account_changeEmail', '<strong>Change</strong> E-mail'); ?>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php $form = CActiveForm::begin(); ?>
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo Yii::t('UserModule.views_account_changeEmail', '<strong>Current E-mail address</strong>'); ?>
|
||||
<br /><?php echo CHtml::encode(Yii::$app->user->getIdentity()->email) ?>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="form-group">
|
||||
<?php echo $form->labelEx($model, 'currentPassword'); ?>
|
||||
<?php echo $form->passwordField($model, 'currentPassword', array('class' => 'form-control', 'maxlength' => 45)); ?>
|
||||
<?php echo $form->error($model, 'currentPassword'); ?>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo $form->labelEx($model, 'newEmail'); ?>
|
||||
<?php echo $form->textField($model, 'newEmail', array('class' => 'form-control', 'maxlength' => 45)); ?>
|
||||
<?php echo $form->error($model, 'newEmail'); ?>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'currentPassword')->passwordInput(['maxlength' => 45]); ?>
|
||||
|
||||
|
||||
<?php echo $form->field($model, 'newEmail')->textInput(['maxlength' => 45]); ?>
|
||||
|
||||
<hr>
|
||||
<?php echo CHtml::submitButton(Yii::t('UserModule.views_account_changeEmail', 'Save'), array('class' => 'btn btn-primary')); ?>
|
||||
@ -33,7 +27,7 @@ use \humhub\compat\CHtml;
|
||||
<!-- show flash message after saving -->
|
||||
<?php echo \humhub\widgets\DataSaved::widget(); ?>
|
||||
|
||||
<?php CActiveForm::end(); ?>
|
||||
<?php ActiveForm::end(); ?>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1,31 +1,21 @@
|
||||
<?php
|
||||
|
||||
use humhub\compat\CActiveForm;
|
||||
use yii\widgets\ActiveForm;
|
||||
use humhub\compat\CHtml;
|
||||
?>
|
||||
<div class="panel-heading">
|
||||
<?php echo Yii::t('UserModule.views_account_changePassword', '<strong>Change</strong> password'); ?>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php $form = CActiveForm::begin(); ?>
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo $form->labelEx($model, 'currentPassword'); ?>
|
||||
<?php echo $form->passwordField($model, 'currentPassword', array('class' => 'form-control', 'maxlength' => 255, 'value' => '')); ?>
|
||||
<?php echo $form->error($model, 'currentPassword'); ?>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="form-group">
|
||||
<?php echo $form->labelEx($model, 'newPassword'); ?>
|
||||
<?php echo $form->passwordField($model, 'newPassword', array('class' => 'form-control', 'maxlength' => 255, 'value' => '')); ?>
|
||||
<?php echo $form->error($model, 'newPassword'); ?>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'currentPassword')->passwordInput(['maxlength' => 45]); ?>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo $form->labelEx($model, 'newPasswordConfirm'); ?>
|
||||
<?php echo $form->passwordField($model, 'newPasswordConfirm', array('class' => 'form-control', 'maxlength' => 255, 'value' => '')); ?>
|
||||
<?php echo $form->error($model, 'newPasswordConfirm'); ?>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'newPassword')->textInput(['maxlength' => 45]); ?>
|
||||
|
||||
<?php echo $form->field($model, 'newPasswordConfirm')->textInput(['maxlength' => 45]); ?>
|
||||
|
||||
<hr>
|
||||
<?php echo CHtml::submitButton(Yii::t('UserModule.views_account_changePassword', 'Save'), array('class' => 'btn btn-primary')); ?>
|
||||
@ -34,6 +24,6 @@ use humhub\compat\CHtml;
|
||||
<!-- show flash message after saving -->
|
||||
<?php echo \humhub\widgets\DataSaved::widget(); ?>
|
||||
|
||||
<?php CActiveForm::end(); ?>
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use \humhub\compat\CActiveForm;
|
||||
use yii\widgets\ActiveForm;
|
||||
use \humhub\compat\CHtml;
|
||||
use \humhub\models\Setting;
|
||||
?>
|
||||
@ -9,49 +9,25 @@ use \humhub\models\Setting;
|
||||
<?php echo Yii::t('UserModule.views_account_editSettings', '<strong>User</strong> settings'); ?>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php $form = CActiveForm::begin(['id' => 'basic-settings-form']); ?>
|
||||
<?php $form = ActiveForm::begin(['id' => 'basic-settings-form']); ?>
|
||||
|
||||
<?php //echo $form->errorSummary($model); ?>
|
||||
<?php echo $form->field($model, 'tags'); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo $form->labelEx($model, 'tags'); ?>
|
||||
<?php echo $form->textField($model, 'tags', array('class' => 'form-control')); ?>
|
||||
<?php echo $form->error($model, 'tags'); ?>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'language')->dropdownList($languages); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo $form->labelEx($model, 'language'); ?>
|
||||
<?php echo $form->dropDownList($model, 'language', $languages, array('class' => 'form-control')); ?>
|
||||
<?php echo $form->error($model, 'language'); ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo $form->labelEx($model, 'timeZone'); ?>
|
||||
<?php echo $form->dropDownList($model, 'timeZone', \humhub\libs\TimezoneHelper::generateList(), array('class' => 'form-control')); ?>
|
||||
<?php echo $form->error($model, 'timeZone'); ?>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'timeZone')->dropdownList(\humhub\libs\TimezoneHelper::generateList()); ?>
|
||||
|
||||
<?php if (Setting::Get('allowGuestAccess', 'authentication_internal')): ?>
|
||||
<div class="form-group">
|
||||
<?php echo $form->labelEx($model, 'visibility'); ?>
|
||||
<?php
|
||||
echo $form->dropDownList($model, 'visibility', array(
|
||||
1 => Yii::t('UserModule.views_account_editSettings', 'Registered users only'),
|
||||
2 => Yii::t('UserModule.views_account_editSettings', 'Visible for all (also unregistered users)'),
|
||||
), array('class' => 'form-control'));
|
||||
?>
|
||||
<?php echo $form->error($model, 'visibility'); ?>
|
||||
</div>
|
||||
|
||||
<?php echo $form->field($model, 'language')->dropdownList([
|
||||
1 => Yii::t('UserModule.views_account_editSettings', 'Registered users only'),
|
||||
2 => Yii::t('UserModule.views_account_editSettings', 'Visible for all (also unregistered users)'),
|
||||
]); ?>
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<strong><?php echo Yii::t('UserModule.views_account_editSettings', 'Getting Started'); ?></strong>
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<?php echo $form->checkBox($model, 'show_introduction_tour'); ?> <?php echo $model->getAttributeLabel('show_introduction_tour'); ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'show_introduction_tour')->checkbox(); ?>
|
||||
<hr>
|
||||
|
||||
<?php echo CHtml::submitButton(Yii::t('UserModule.views_account_editSettings', 'Save'), array('class' => 'btn btn-primary')); ?>
|
||||
@ -59,5 +35,5 @@ use \humhub\models\Setting;
|
||||
<!-- show flash message after saving -->
|
||||
<?php echo \humhub\widgets\DataSaved::widget(); ?>
|
||||
|
||||
<?php CActiveForm::end(); ?>
|
||||
<?php ActiveForm::end(); ?>
|
||||
</div>
|
||||
|
@ -1,61 +1,48 @@
|
||||
<?php
|
||||
|
||||
use humhub\compat\CActiveForm;
|
||||
use yii\widgets\ActiveForm;
|
||||
use humhub\compat\CHtml;
|
||||
use humhub\modules\user\models\User;
|
||||
|
||||
?>
|
||||
<div class="panel-heading">
|
||||
<?php echo Yii::t('UserModule.views_account_emailing', '<strong>Desktop</strong> Notifications'); ?>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php $form = CActiveForm::begin(); ?>
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<?php echo $form->errorSummary($model); ?>
|
||||
<strong><?php echo Yii::t('UserModule.views_account_emailing', 'Notifications'); ?></strong><br/>
|
||||
|
||||
<strong><?php echo Yii::t('UserModule.views_account_emailing', 'Notifications'); ?></strong><br />
|
||||
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<?php echo $form->checkBox($model, 'enable_html5_desktop_notifications'); ?> <?php echo $model->getAttributeLabel('enable_html5_desktop_notifications'); ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'enable_html5_desktop_notifications')->checkbox(); ?>
|
||||
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="panel-heading">
|
||||
<?php echo Yii::t('UserModule.views_account_emailing', '<strong>Email</strong> Notifications'); ?>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
|
||||
<strong><?php echo Yii::t('UserModule.views_account_emailing', 'Notifications'); ?></strong><br />
|
||||
<strong><?php echo Yii::t('UserModule.views_account_emailing', 'Notifications'); ?></strong><br>
|
||||
|
||||
<?php echo Yii::t('UserModule.views_account_emailing', 'Get an email, when other users comment or like your posts.'); ?>
|
||||
<?php
|
||||
echo $form->dropDownList($model, 'receive_email_notifications', array(
|
||||
User::RECEIVE_EMAIL_NEVER => Yii::t('UserModule.views_account_emailing', 'Never'),
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<?php echo $form->field($model, 'receive_email_notifications')->dropdownList([User::RECEIVE_EMAIL_NEVER => Yii::t('UserModule.views_account_emailing', 'Never'),
|
||||
User::RECEIVE_EMAIL_WHEN_OFFLINE => Yii::t('UserModule.views_account_emailing', 'When I´m offline'),
|
||||
User::RECEIVE_EMAIL_ALWAYS => Yii::t('UserModule.views_account_emailing', 'Always'),
|
||||
), array('id' => 'reg_group', 'class' => 'form-control'));
|
||||
?>
|
||||
User::RECEIVE_EMAIL_ALWAYS => Yii::t('UserModule.views_account_emailing', 'Always')]); ?>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
<strong><?php echo Yii::t('UserModule.views_account_emailing', 'Activities'); ?></strong><br />
|
||||
<strong><?php echo Yii::t('UserModule.views_account_emailing', 'Activities'); ?></strong><br/>
|
||||
<?php echo Yii::t('UserModule.views_account_emailing', 'Get an email, by every activity from other users you follow or work<br>together in workspaces.'); ?>
|
||||
<?php
|
||||
echo $form->dropDownList($model, 'receive_email_activities', array(
|
||||
|
||||
<?php echo $form->field($model, 'receive_email_activities')->dropdownList([
|
||||
User::RECEIVE_EMAIL_NEVER => Yii::t('UserModule.views_account_emailing', 'Never'),
|
||||
User::RECEIVE_EMAIL_DAILY_SUMMARY => Yii::t('UserModule.views_account_emailing', 'Daily summary'),
|
||||
User::RECEIVE_EMAIL_WHEN_OFFLINE => Yii::t('UserModule.views_account_emailing', 'When I´m offline'),
|
||||
User::RECEIVE_EMAIL_ALWAYS => Yii::t('UserModule.views_account_emailing', 'Always'),
|
||||
), array('id' => 'reg_group', 'class' => 'form-control'));
|
||||
?>
|
||||
User::RECEIVE_EMAIL_ALWAYS => Yii::t('UserModule.views_account_emailing', 'Always')]); ?>
|
||||
|
||||
<hr>
|
||||
|
||||
@ -64,7 +51,7 @@ use humhub\modules\user\models\User;
|
||||
<!-- show flash message after saving -->
|
||||
<?php echo \humhub\widgets\DataSaved::widget(); ?>
|
||||
|
||||
<?php CActiveForm::end(); ?>
|
||||
<?php ActiveForm::end(); ?>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
use \yii\helpers\Url;
|
||||
use \humhub\compat\CActiveForm;
|
||||
use yii\widgets\ActiveForm;
|
||||
use \humhub\compat\CHtml;
|
||||
|
||||
$this->pageTitle = Yii::t('UserModule.views_auth_login', 'Login');
|
||||
@ -18,25 +18,16 @@ $this->pageTitle = Yii::t('UserModule.views_auth_login', 'Login');
|
||||
|
||||
<div class="panel-body">
|
||||
|
||||
<?php $form = CActiveForm::begin(['id' => 'account-login-form']); ?>
|
||||
<?php $form = ActiveForm::begin(['id' => 'account-login-form']); ?>
|
||||
|
||||
<p><?php echo Yii::t('UserModule.views_auth_login', "If you're already a member, please login with your username/email and password."); ?></p>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo $form->textField($model, 'username', array('class' => 'form-control', 'id' => 'login_username', 'placeholder' => Yii::t('UserModule.views_auth_login', 'username or email'))); ?>
|
||||
<?php echo $form->error($model, 'username'); ?>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'username')->textInput(['id' => 'login_username', 'placeholder' => Yii::t('UserModule.views_auth_login', 'username or email')]); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo $form->passwordField($model, 'password', array('class' => 'form-control', 'id' => 'login_password', 'placeholder' => Yii::t('UserModule.views_auth_login', 'password'))); ?>
|
||||
<?php echo $form->error($model, 'password'); ?>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'password')->passwordInput(['id' => 'login_password', 'placeholder' => Yii::t('UserModule.views_auth_login', 'password')]); ?>
|
||||
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<?php echo $form->checkBox($model, 'rememberMe'); ?> <?php echo $model->getAttributeLabel('rememberMe'); ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<?php echo $form->field($model, 'rememberMe')->checkbox(); ?>
|
||||
|
||||
<hr>
|
||||
<div class="row">
|
||||
@ -52,7 +43,7 @@ $this->pageTitle = Yii::t('UserModule.views_auth_login', 'Login');
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php CActiveForm::end(); ?>
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
@ -71,16 +62,13 @@ $this->pageTitle = Yii::t('UserModule.views_auth_login', 'Login');
|
||||
|
||||
<p><?php echo Yii::t('UserModule.views_auth_login', "Don't have an account? Join the network by entering your e-mail address."); ?></p>
|
||||
|
||||
<?php $form = CActiveForm::begin(['id' => 'account-register-form']); ?>
|
||||
<?php $form = ActiveForm::begin(['id' => 'account-register-form']); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo $form->textField($registerModel, 'email', array('class' => 'form-control', 'id' => 'register-email', 'placeholder' => Yii::t('UserModule.views_auth_login', 'email'))); ?>
|
||||
<?php echo $form->error($registerModel, 'email'); ?>
|
||||
</div>
|
||||
<?php echo $form->field($registerModel, 'email')->textInput(['id' => 'register-email', 'placeholder' => Yii::t('UserModule.views_auth_login', 'email')]); ?>
|
||||
<hr>
|
||||
<?php echo CHtml::submitButton(Yii::t('UserModule.views_auth_login', 'Register'), array('class' => 'btn btn-primary')); ?>
|
||||
|
||||
<?php CActiveForm::end(); ?>
|
||||
<?php ActiveForm::end(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use humhub\compat\CActiveForm;
|
||||
use yii\widgets\ActiveForm;
|
||||
use yii\helpers\Html;
|
||||
use yii\helpers\Url;
|
||||
?>
|
||||
@ -33,28 +33,17 @@ use yii\helpers\Url;
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane <?php echo (!isset($_POST['AccountRegister'])) ? "active" : ""; ?>" id="login">
|
||||
|
||||
<?php $form = CActiveForm::begin(); ?>
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
|
||||
<p><?php echo Yii::t('UserModule.views_auth_login', "If you're already a member, please login with your username/email and password."); ?></p>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo $form->textField($model, 'username', array('class' => 'form-control', 'id' => 'login_username', 'placeholder' => Yii::t('UserModule.views_auth_login', 'username or email'))); ?>
|
||||
<?php echo $form->error($model, 'username'); ?>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'username')->textInput(['id' => 'login_username', 'placeholder' => Yii::t('UserModule.views_auth_login', 'username or email')]); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo $form->passwordField($model, 'password', array('class' => 'form-control', 'id' => 'login_password', 'placeholder' => Yii::t('UserModule.views_auth_login', 'password'))); ?>
|
||||
<?php echo $form->error($model, 'password'); ?>
|
||||
</div>
|
||||
<?php echo $form->field($model, 'password')->passwordInput(['id' => 'login_password', 'placeholder' => Yii::t('UserModule.views_auth_login', 'password')]); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<?php echo $form->checkBox($model, 'rememberMe'); ?> <?php echo Yii::t('UserModule.views_auth_login', 'Remember me next time'); ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo $form->field($model, 'rememberMe')->checkbox(); ?>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
@ -97,7 +86,7 @@ use yii\helpers\Url;
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php CActiveForm::end(); ?>
|
||||
<?php ActiveForm::end(); ?>
|
||||
</div>
|
||||
|
||||
<?php if ($canRegister) : ?>
|
||||
@ -105,12 +94,9 @@ use yii\helpers\Url;
|
||||
id="register">
|
||||
|
||||
<p><?php echo Yii::t('UserModule.views_auth_login', "Don't have an account? Join the network by entering your e-mail address."); ?></p>
|
||||
<?php $form = CActiveForm::begin(); ?>
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?php echo $form->textField($registerModel, 'email', array('class' => 'form-control', 'id' => 'register-email', 'placeholder' => Yii::t('UserModule.views_auth_login', 'email'))); ?>
|
||||
<?php echo $form->error($registerModel, 'email'); ?>
|
||||
</div>
|
||||
<?php echo $form->field($registerModel, 'email')->textInput(['id' => 'register-email', 'placeholder' => Yii::t('UserModule.views_auth_login', 'email')]); ?>
|
||||
<hr>
|
||||
|
||||
<?php
|
||||
@ -128,7 +114,7 @@ use yii\helpers\Url;
|
||||
]);
|
||||
?>
|
||||
|
||||
<?php CActiveForm::end(); ?>
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
$this->pageTitle = Yii::t('UserModule.views_auth_register_success', 'Registration successful');
|
||||
?>
|
||||
<div class="modal-dialog modal-dialog-small animated fadeIn">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel"><?php echo Yii::t('UserModule.views_auth_register_success', '<strong>Registration</strong> successful!'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body text-center">
|
||||
<p><?php echo Yii::t('UserModule.views_auth_register_success', 'Please check your email and follow the instructions!'); ?></p>
|
||||
<br>
|
||||
<a href="<?php echo \yii\helpers\Url::to(["/"]) ?>" class="btn btn-primary"><?php echo Yii::t('UserModule.views_auth_register_success', 'back to home') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user