Esempio n. 1
0
 * @var WebController           $this
 * @var array                   $schema
 * @var BasePlatformSystemModel $model
 * @var array                   $_formOptions Provided by includer
 * @var array                   $errors       Errors if any
 * @var string                  $resourceName The name of this resource (i.e. App, AppGroup, etc.) Essentially the model name
 * @var string                  $displayName
 * @var string                  $statusMessage
 */
use DreamFactory\Common\Enums\PageLocation;
use DreamFactory\Platform\Yii\Models\BasePlatformSystemModel;
use DreamFactory\Yii\Utility\BootstrapForm;
use DreamFactory\Yii\Utility\Pii;
use Kisma\Core\Utility\Bootstrap;
use Kisma\Core\Utility\Option;
Pii::cssFile('//cdnjs.cloudflare.com/ajax/libs/x-editable/1.4.5/bootstrap-editable/css/bootstrap-editable.css');
Pii::scriptFile('//cdnjs.cloudflare.com/ajax/libs/x-editable/1.4.5/bootstrap-editable/js/bootstrap-editable.min.js', PageLocation::End);
$_css .= '<link href="" rel="stylesheet" />';
echo '<script src=""></script>';
//@TODO error handling from resource request
$_errors = isset($errors) ? Option::clean($errors) : array();
$_update = !$model->isNewRecord;
$_prefix = @end(@explode('\\', $this->getModelClass()));
$_resourcePath = $resourceName;
if ($_update) {
    $_resourcePath .= '/' . $model->id;
}
if (!empty($_errors)) {
    $_headline = isset($alertMessage) ? $alertMessage : 'Sorry pal...';
    $_messages = null;
    foreach ($_errors as $_error) {
Esempio n. 2
0
<?php

/**
 * @var $this   \Cerberus\Yii\Controllers\WebController
 * @var $models Instance[]
 */
use DreamFactory\Common\Enums\PageLocation;
use DreamFactory\Fabric\Yii\Models\Auth\User;
use DreamFactory\Fabric\Yii\Models\Deploy\Instance;
use DreamFactory\Yii\Utility\Pii;
if (!isset($models) || empty($models)) {
    $models = array();
}
$_html = null;
$_pdo = Pii::pdo('db.fabric_auth');
Pii::cssFile('/css/df.datatables.css');
Pii::scriptFile(array('/static/datatables/js/jquery.dataTables.js', '/js/df.datatables.js'), PageLocation::End);
foreach ($models as $_model) {
    if (isset($_model['email_addr_text'])) {
        $_email = '<a title="Click to view this user in Drupal" target="_blank" href="https://www.dreamfactory.com/user/' . $_model['drupal_id'] . '">' . $_model['email_addr_text'] . '</a>';
        $_lastLogin = $_model['last_login_date'];
    } else {
        $_email = 'Unknown';
        $_lastLogin = '******';
    }
    $_html .= '<tr id="' . $this->hashId($_model['id']) . '">';
    $_html .= '<td>' . $_model['instance_name_text'] . '<a title="Click to edit this row" class="pull-right" href="#"><i class="icon-pencil hide edit-row"></i></a></td>';
    $_html .= '<td><a title="Click to browse this URL" target="_blank" href="http://' . $_model['public_host_text'] . '">' . $_model['public_host_text'] . '</a></td>';
    $_html .= '<td>' . $_email . '</td>';
    $_html .= '<td>' . $_model['create_date'] . '</td>';
    $_html .= '<td>' . $_lastLogin . '</td>';
Esempio n. 3
0
$_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';
        }
        $_providerHtml .= '<i class="icon-' . $_icon . ' icon-3x" data-provider="' . $_provider->api_name . '"></i>';
    }
    if (!empty($_providerHtml)) {
    }
    Pii::cssFile('css/remote-login.css');
}
CHtml::$errorSummaryCss = 'alert alert-danger';
if (null !== ($_flash = Pii::getFlash('login-form'))) {
    $_flash = <<<HTML
<div class="alert alert-success">
\t{$_flash}
</div>
HTML;
}
?>
<div id="formbox">
    <h2>User Login</h2>

    <h4 style="text-align:center;">Please sign in for access to the requested resource</h4>