// Log::debug( 'login providers: ' . print_r( $loginProviders, true ) ); foreach ($loginProviders as $_provider) { if (!$_provider['is_active'] || !$_provider['is_login_provider']) { continue; } $_icon = $_providerType = strtolower($_provider['provider_name']); // Google icon has a different name if ('google' == $_icon) { $_icon = 'google-plus'; } $_providerHtml .= '<i class="fa fa-' . $_icon . ' fa-3x" data-provider="' . $_providerType . '"></i>'; } $_providerHider = !empty($_providerHtml) ? null : ' hide '; } CHtml::$errorSummaryCss = 'alert alert-danger'; if (null !== ($_flash = Pii::getFlash('login-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">User Login</h2> <h4>Please sign in to continue</h4> <?php echo $_flash; ?>
* 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>. </h4> <h4 style="text-align:left;">You will automatically be made an admin user of this DSP. This user can be modified, and more users can be added, once your DSP is activated.</h4>
* 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>'; } }