示例#1
0
<?php

/**
 * Created by JetBrains PhpStorm.
 * User: Raysmond
 * Date: 13-10-16
 * Time: AM8:57
 * To change this template use File | Settings | File Templates.
 */
if (isset($validation_errors)) {
    RHtml::showValidationErrors($validation_errors);
}
$form = array();
if (isset($newForm)) {
    $form = $newForm;
}
echo RForm::openForm('category/new', array('id' => 'new-category-form', 'class' => 'new-category-form'));
echo '<h2>Create new category</h2>';
echo RForm::label("Category name", 'name');
echo RForm::input(array('id' => 'name', 'name' => 'name', 'class' => 'form-control', 'placeholder' => 'Category name'), $form);
echo '<br/>';
echo RForm::label("Category parent", 'parent');
echo RForm::input(array('id' => 'parent', 'name' => 'parent', 'class' => 'form-control', 'placeholder' => 'Category parent'), $form);
echo '<br/>';
echo RForm::input(array('type' => 'hidden', 'name' => 'id'), $form);
echo RForm::input(array('class' => 'btn btn-lg btn-primary btn-block', 'type' => 'submit', 'value' => 'Save'));
echo RForm::endForm();
示例#2
0
        </select>

        <?php 
echo RForm::label("Region", 'region');
echo RForm::input(array('id' => 'region', 'name' => 'region', 'class' => 'form-control', 'value' => $user->region, 'placeholder' => "region"));
echo RForm::label("Mobile", 'mobile');
echo RForm::input(array('id' => 'mobile', 'name' => 'mobile', 'class' => 'form-control', 'value' => $user->mobile, 'placeholder' => "Mobile"));
echo RForm::label("QQ", 'qq');
echo RForm::input(array('id' => 'qq', 'name' => 'qq', 'class' => 'form-control', 'value' => $user->qq, 'placeholder' => "QQ"));
echo RForm::label("Weibo", 'weibo');
echo RForm::input(array('id' => 'weibo', 'name' => 'weibo', 'class' => 'form-control', 'value' => $user->weibo, 'placeholder' => "Weibo"));
echo RForm::label("Homepage", 'homepage');
echo RForm::input(array('id' => 'homepage', 'name' => 'homepage', 'class' => 'form-control', 'value' => $user->homepage, 'placeholder' => "Homepage"));
echo RForm::label("Introduction", 'intro');
echo RForm::input(array('id' => 'intro', 'name' => 'intro', 'class' => 'form-control', 'value' => $user->intro, 'placeholder' => "your introduction"));
echo RForm::label("Picture");
echo '<br/>';
if ($user->picture) {
    $picture = RImage::styleSrc($user->picture, User::getPicOptions());
    echo RHtml::image($picture, $user->name, array("width" => '120px', 'class' => 'img-thumbnail'));
}
echo '<br/><br/>';
echo RForm::input(array('type' => 'file', 'name' => 'user_picture', 'accept' => 'image/gif, image/jpeg,image/png'));
echo "<br/>";
echo RForm::input(array('type' => 'submit', 'value' => 'Complete', 'class' => "btn btn-lg btn-primary"));
echo RForm::endForm();
?>
    </div>
</div>

示例#3
0
echo RForm::input(array('id' => 'ads-title', 'name' => 'ads-title', 'class' => 'form-control', 'placeholder' => 'Ads title'), isset($form['ads-title']) ? $form : (isset($edit) ? $ad->title : $form));
?>

        <br/>

        <?php 
echo RForm::label('Ads content', 'ads-content');
?>
        <?php 
$self->module('ckeditor', array('editorId' => 'ads-content', 'name' => 'ads-content', 'data' => isset($form['ads-content']) ? $form['ads-content'] : (isset($edit) ? $ad->content : '')));
?>

        <br/>

        <?php 
echo RForm::label('Paid price (' . Rays::user()->getWallet()->money . " " . Wallet::COIN_NAME . " in your wallet)", 'paid-price');
?>
        <div class="input-group">
            <?php 
echo RForm::input(array_merge(array('id' => 'paid-price', 'name' => 'paid-price', 'class' => 'form-control'), isset($edit) ? ['readonly' => true] : []), isset($form['paid-price']) ? $form : (isset($edit) ? $ad->paidPrice : $form));
?>
            <span class="input-group-addon"><?php 
echo Wallet::COIN_NAME;
?>
</span>
        </div>

        <br/>

        <?php 
echo RForm::input(array('type' => 'submit', 'class' => 'btn btn-sm btn-primary', 'value' => isset($edit) ? 'Save' : 'Send Ads application'));
示例#4
0
 */
if (isset($validation_errors)) {
    RHtml::showValidationErrors($validation_errors);
}
$form = array();
if (isset($sendForm)) {
    $form = $sendForm;
}
echo RForm::openForm('message/send/' . $type . '/', array('id' => 'messageForm', 'class' => 'form-signin'));
echo RForm::label('To user: '******'receiver', array());
echo '&nbsp;&nbsp;';
$disabled = isset($toUser) ? "disabled" : "enabled";
echo RForm::input(array('id' => 'receiver', 'name' => 'receiver', 'class' => 'form-control', 'placeholder' => 'Receiver'), isset($toUser) ? $toUser->name : $form);
echo '<br/>';
echo RForm::label('Title', 'title', array());
echo RForm::input(array('id' => 'title', 'name' => 'title', 'class' => 'form-control', 'placeholder' => 'Title'), $form);
echo "<br/>";
echo RForm::label('Content', 'content', array());
echo "<br/>";
if (Rays::user()->roleId == Role::ADMINISTRATOR_ID) {
    $self->module('ckeditor', array('editorId' => 'msg-content', 'name' => 'msg-content', 'data' => isset($form['content']) ? $form['content'] : ''));
} else {
    echo RForm::textarea(array('id' => 'msg-content', 'name' => 'msg-content', 'class' => 'form-control', 'cols' => 100, 'rows' => 6, 'placeholder' => 'Content'), $form);
}
echo "<br/>";
echo RForm::input(array('type' => 'hidden', 'value' => $type, 'name' => 'type'), $type);
echo RForm::input(array('type' => 'submit', 'value' => 'Send', 'class' => 'btn btn-lg btn-primary'));
echo RForm::endForm();
?>
    </div>
</div>
示例#5
0
}
?>
        <?php 
echo RForm::openForm('category/admin', array());
?>
        <?php 
echo RForm::label('Category parent');
?>
        <?php 
echo RForm::input(array('type' => 'hidden', 'name' => 'parent-id', 'id' => 'parent-id'));
?>
        <?php 
echo RForm::input(array('id' => 'parent-name', 'name' => 'parent-name', 'readonly' => 'true', 'class' => 'form-control'));
?>
        <?php 
echo RForm::label('Name', 'cat-name');
?>
        <?php 
echo RForm::input(array('name' => 'cat-name', 'class' => 'form-control'), $form);
?>
        <br/>
        <?php 
echo RForm::input(array('type' => 'submit', 'value' => '+ Add', 'class' => 'btn btn-sm btn-success'));
?>
        <?php 
echo RForm::endForm();
?>
    </div>
</div>

<script>
示例#6
0
<?php

/**
 * Created by PhpStorm.
 * User: songrenchu
 */
?>
<div id="profile" class="panel panel-default">
    <div class="panel-heading"><h1 class="panel-title">VIP application</h1></div>
    <div class="panel-body">
        <?php 
if (isset($validation_errors)) {
    RHtml::showValidationErrors($validation_errors);
}
$form = array();
if (isset($editForm)) {
    $form = $editForm;
}
echo RForm::openForm('user/applyVIP/', array('id' => 'vipApplyForm'));
echo RForm::label('Statement of Purpose: ', 'content', array());
echo "<br/>";
echo RForm::textarea(array('id' => 'content', 'name' => 'content', 'cols' => 100, 'rows' => 6, 'class' => 'form-control', 'placeholder' => 'Explain your purpose and qualification of applying for VIP'), $form);
echo "<br/>";
echo RForm::input(array('type' => 'submit', 'value' => 'Send', 'class' => 'btn btn-lg btn-primary'));
echo RForm::endForm();
?>
    </div>
</div>
示例#7
0
foreach ($categories as $item) {
    if ($item->pid == 0) {
        echo '<option value="' . $item->id . '" ' . ($count++ == 0 ? 'selected="selected"' : "") . '>' . $item->name . '</option>';
        foreach ($categories as $item1) {
            if ($item1->pid == $item->id) {
                echo '<option value="' . $item1->id . '">------' . $item1->name . '</option>';
            }
        }
    }
}
?>
        </select>
    </div>
</div>
<?php 
//echo RForm::select('category',$cats,array($cats[0]['value']),array('class'=>'form-control'));
//echo "<br/>";
echo RForm::label('Group Introduction', 'intro', array());
echo '<br/>';
//echo RForm::textarea(array('id'=>'group_intro','class'=>'ckeditor','name'=>'intro','cols'=>'100','rows'=>'15'),(isset($form['intro']))?RHtml::decode($form['intro']):"");
$formIntro = isset($form['intro']) ? $form['intro'] : '';
$self->module('ckeditor', array('editorId' => 'intro', 'name' => 'intro', 'data' => isset($oldGroup) ? $oldGroup->intro : $formIntro));
echo '<br/>';
echo RForm::label('Group picture', 'group_picture');
echo RForm::input(array('type' => 'file', 'name' => 'group_picture', 'accept' => 'image/gif, image/jpeg,image/png'));
echo '<br/>';
echo RForm::input(array('class' => 'btn btn-lg btn-primary', 'type' => 'submit', 'value' => 'Build now'));
echo RForm::endForm();
?>
    </div>
</div>