Beispiel #1
0
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
use DreamFactory\Yii\Utility\Validate;
/**
 * @var WebController    $this
 * @var RegisterUserForm $model
 * @var CActiveForm      $form
 * @var string           $backUrl
 */
$_rules = array('RegisterUserForm[email]' => array('required' => true, 'minlength' => 5), 'RegisterUserForm[first_name]' => array('required' => true), 'RegisterUserForm[last_name]' => array('required' => true), 'RegisterUserForm[display_name]' => array('required' => true));
if (!$model->getViaEmail()) {
    $_rules = array_merge($_rules, array('RegisterUserForm[password]' => array('required' => true, 'minlength' => 5), 'RegisterUserForm[password_repeat]' => array('required' => true, 'minlength' => 5, 'equalTo' => '#RegisterUserForm_password')));
}
Validate::register('form#register-user-form', array('ignoreTitle' => true, 'errorClass' => 'error', 'errorPlacement' => 'function(error,element){error.appendTo(element.closest("div.form-group"));error.css("margin","-10px 0 0");}', 'rules' => $_rules));
?>
<div class="box-wrapper">
    <div id="formbox" class="form-light boxed drop-shadow lifted">
        <h2 class="inset">DSP User Registration</h2>

        <?php 
if ($model->getViaEmail()) {
    echo '<p>Please enter your email address and name. An email will be sent to you to confirm registration.</p>';
} else {
    echo '<p>Please enter your email address, name, and desired password to complete the registration.</p>';
}
?>

        <?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'register-user-form', 'enableClientValidation' => true, 'clientOptions' => array('validateOnSubmit' => true)));
Beispiel #2
0
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
use DreamFactory\Yii\Utility\Validate;
/**
 * @var WebController   $this
 * @var ConfirmUserForm $model
 * @var CActiveForm     $form
 * @var string          $reason
 */
Validate::register('form#confirm-user-form', array('ignoreTitle' => true, 'errorClass' => 'error', 'errorPlacement' => 'function(error,element){error.appendTo(element.closest("div.form-group"));error.css("margin","-10px 0 0");}', 'rules' => array('ConfirmUserForm[email]' => array('required' => true, 'minlength' => 5), 'ConfirmUserForm[code]' => array('required' => true), 'ConfirmUserForm[password]' => array('required' => true, 'minlength' => 5), 'ConfirmUserForm[passwordRepeat]' => array('required' => true, 'minlength' => 5, 'equalTo' => '#ConfirmUserForm_password'))));
switch ($reason) {
    case 'register':
        $_header = 'Registration Confirmation';
        break;
    case 'invite':
        $_header = 'Invitation Confirmation';
        break;
    default:
        $_header = 'Password Reset Confirmation';
        break;
}
?>
<div class="box-wrapper">
    <div id="formbox" class="form-light boxed drop-shadow lifted">
        <h2 class="inset"><?php 
Beispiel #3
0
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
use DreamFactory\Yii\Utility\Pii;
use DreamFactory\Yii\Utility\Validate;
/**
 * @var WebController $this
 * @var ActivateForm  $model
 * @var CActiveForm   $form
 */
Validate::register('form#activate-form', array('ignoreTitle' => true, 'errorClass' => 'error', 'errorPlacement' => 'function(error,element){error.appendTo(element.closest("div.form-group"));}', 'rules' => array('ActivateForm[username]' => 'required email', 'ActivateForm[password]' => array('required' => true, 'minlength' => 3)), 'messages' => array('ActivateForm[username]' => 'Please enter an actual email address', 'ActivateForm[password]' => array('required' => 'You must enter a password to continue', 'minlength' => 'Your password must be at least 3 characters long'))));
CHtml::$errorSummaryCss = 'alert alert-danger';
if (null !== ($_flash = Pii::getFlash('activate-form'))) {
    $_flash = <<<HTML
<div class="alert alert-success">
\t{$_flash}
</div>
HTML;
}
?>
<div class="box-wrapper">
    <div id="formbox" class="form-light boxed drop-shadow lifted">
        <h2 class="inset">Activation Required</h2>

        <h4 style="text-align: left;">To activate this DSP, please enter your email and password from the main <a target="_blank"
                                                                                                                  href="https://www.dreamfactory.com">DreamFactory site</a>.
Beispiel #4
0
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
use DreamFactory\Platform\Yii\Models\Provider;
use DreamFactory\Yii\Utility\Pii;
use DreamFactory\Yii\Utility\Validate;
/**
 * @var WebController $this
 * @var LoginForm     $model
 * @var bool          $redirected
 * @var CActiveForm   $form
 * @var Provider[]    $loginProviders
 */
$_html = null;
Validate::register('form#login-form', array('ignoreTitle' => true, 'errorClass' => 'error', 'errorPlacement' => 'function(error,element){error.appendTo(element.closest("div.form-group"));error.css("margin","-10px 0 0");}', 'rules' => array('LoginFormForm[username]' => array('required' => true, 'minlength' => 5))));
Pii::cssFile('/css/login.css', 'all');
//*************************************************************************
//	Build the remote login provider icon list..
//*************************************************************************
$_providerHtml = null;
if (!empty($loginProviders)) {
    foreach ($loginProviders as $_provider) {
        if (!$_provider->is_active || !$_provider->is_login_provider) {
            continue;
        }
        $_icon = strtolower($_provider->api_name);
        //	Google icon has a different name
        if ('google' == $_icon) {
            $_icon = 'google-plus';
        }
Beispiel #5
0
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
use DreamFactory\Yii\Utility\Pii;
use DreamFactory\Yii\Utility\Validate;
use Kisma\Core\Utility\Option;
/**
 * @var WebController $this
 * @var ProfileForm   $model
 * @var CActiveForm   $form
 * @var string        $backUrl
 * @var array         $session
 */
Validate::register('form#profile-form', array('ignoreTitle' => true, 'errorClass' => 'error', 'errorPlacement' => 'function(error,element){error.appendTo(element.closest("div.form-group"));}', 'rules' => array('ProfileForm[email]' => array('required' => true, 'email' => true), 'ProfileForm[first_name]' => array('required' => true, 'minlength' => 3), 'ProfileForm[last_name]' => array('required' => true, 'minlength' => 3), 'ProfileForm[display_name]' => array('required' => true, 'minlength' => 6))));
CHtml::$errorSummaryCss = 'alert alert-danger';
if (null !== ($_flash = Pii::getFlash('profile-form'))) {
    $_flash = <<<HTML
<div class="alert alert-success">
\t{$_flash}
</div>
HTML;
}
$_appOptions = '<option name="ProfileForm[default_app_id]" value="0">None</option>';
if (isset($session)) {
    $_defaultAppId = Option::get($session, 'default_app_id', 0);
    /** @var array $_app */
    foreach ($session['allowed_apps'] as $_app) {
        $_selected = $_app['id'] == $_defaultAppId;
        $_appOptions .= '<option name="ProfileForm[default_app_id]" value="' . $_app['id'] . '"' . ($_selected ? ' selected="selected" ' : null) . '>' . $_app['api_name'] . '</option>';
Beispiel #6
0
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
use DreamFactory\Yii\Utility\Validate;
/**
 * @var WebController $this
 * @var PasswordForm  $model
 * @var CActiveForm   $form
 * @var string        $backUrl
 */
Validate::register('form#password-form', array('ignoreTitle' => true, 'errorClass' => 'error', 'errorPlacement' => 'function(error,element){error.appendTo(element.closest("div.form-group"));error.css("margin","-10px 0 0");}', 'rules' => array('PasswordForm[old_password]' => array('required' => true, 'minlength' => 5), 'PasswordForm[new_password]' => array('required' => true, 'minlength' => 5), 'PasswordForm[repeat_password]' => array('required' => true, 'minlength' => 5, 'equalTo' => '#PasswordForm_newPassword'))));
?>
<div class="box-wrapper">
    <div id="formbox" class="form-light boxed drop-shadow lifted">
        <h2 class="inset">Change Password</h2>

        <p>All fields are required.</p>

        <?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'password-form', 'enableClientValidation' => true, 'clientOptions' => array('validateOnSubmit' => true)));
?>

        <?php 
if (Yii::app()->user->hasFlash('password-form')) {
    ?>
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
use DreamFactory\Yii\Utility\Validate;
/**
 * @var WebController $this
 * @var SecurityForm  $model
 * @var CActiveForm   $form
 */
Validate::register('form#security-form', array('ignoreTitle' => true, 'errorClass' => 'error', 'errorPlacement' => 'function(error,element){error.appendTo(element.closest("div.form-group"));error.css("margin","-10px 0 0");}', 'rules' => array('SecurityForm[answer]' => array('required' => true), 'SecurityForm[password]' => array('required' => true, 'minlength' => 5), 'SecurityForm[passwordRepeat]' => array('required' => true, 'minlength' => 5, 'equalTo' => '#SecurityForm_password'))));
CHtml::$errorSummaryCss = 'alert alert-danger';
?>
<div class="box-wrapper">
    <div id="formbox" class="form-light boxed drop-shadow lifted">
        <h2 class="inset">Password Reset Security Question</h2>

        <p>Please enter your answer to the following security question.</p>

        <p>Also, enter and confirm your desired new password.</p>

        <?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'security-form', 'enableClientValidation' => true, 'clientOptions' => array('validateOnSubmit' => true)));
?>

        <?php 
Beispiel #8
0
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
use DreamFactory\Yii\Utility\Validate;
/**
 * @var WebController $this
 * @var InitAdminForm $model
 * @var CActiveForm   $form
 */
Validate::register('form#init-form', array('ignoreTitle' => true, 'errorClass' => 'error', 'errorPlacement' => 'function(error,element){error.appendTo(element.closest("div.form-group"));error.css("margin","-10px 0 0");}', 'rules' => array('InitAdminForm[email]' => array('required' => true, 'minlength' => 5), 'InitAdminForm[first_name]' => array('required' => true), 'InitAdminForm[last_name]' => array('required' => true), 'InitAdminForm[display_name]' => array('required' => true), 'InitAdminForm[password]' => array('required' => true, 'minlength' => 5), 'InitAdminForm[passwordRepeat]' => array('required' => true, 'minlength' => 5, 'equalTo' => '#InitAdminForm_password'))));
?>
<div class="box-wrapper">
    <div id="formbox" class="form-light boxed drop-shadow lifted">
        <h2 class="inset">Create a System Admin User</h2>

        <p>Your DSP requires at least one system administrator. Complete this form to create your first admin user. More users can be easily added using the DSP's built-in 'Admin' application.
        </p>

        <?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'init-form', 'enableClientValidation' => true, 'clientOptions' => array('validateOnSubmit' => true)));
?>

        <div class="form-group">
            <label for="InitAdminForm_email" class="sr-only">Email Address</label>