コード例 #1
0
 /**
  * Function to get database details for conf file
  */
 public function writeConfInit()
 {
     echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"res/installer.css\" />";
     echo "<script type=\"text/javascript\" src=\"res/js/jquery.min.js\"></script>";
     echo "<script type=\"text/javascript\" src=\"res/js/installerValidateHelper.js\"></script>";
     echo "<script type=\"text/javascript\" src=\"res/js/jquery.form-validator.min.js\"></script>";
     shn_form_fopen("conf", "install", array('enctype' => 'enctype="multipart/form-data"', 'req_message' => true));
     shn_form_fsopen(_t('Database details'));
     shn_form_text(_t('Database host'), 'db_host', " data-validation=\"required\" data-validation-error-msg=\"" . _t("Please enter the Database host") . "\" ", array('value' => 'localhost', 'help' => _t("Your database server's host."), 'req' => true));
     shn_form_text(_t('Database port'), 'db_port', " data-validation=\"required\" data-validation-error-msg=\"" . _t("Please enter the Database port") . "\" ", array('value' => '3306', 'help' => _t("Your database server's port."), 'req' => true));
     shn_form_radio(array(_t('Create New'), _t('Use Existing')), '', 'db_preference', null, null);
     shn_form_text(_t('Database name'), 'db_name', " data-validation=\"required\" data-validation-error-msg=\"" . _t("Please enter the Database name") . "\" ", array('help' => _t("The name of the database you'll be using for Vesuvius"), 'req' => true));
     shn_form_text(_t('Database username'), 'db_user', " data-validation=\"required\" data-validation-error-msg=\"" . _t("Please enter Database username") . "\" ", array('help' => _t('Database username'), 'req' => true));
     shn_form_password(_t('Database password'), 'db_pass', null, array('help' => _t('The password for the database user you have specified.')));
     shn_form_textarea('', 'license', ' readonly style="font-size:11px;"', array('value' => $this->_getLicenseAgreementText(), 'cols' => '45', 'rows' => '8'));
     shn_form_checkbox(_t('I agree with the terms of the License Agreement'), 'license_agreement', " data-validation=\"required\" data-validation-error-msg=\"" . _t("You should agree to the terms") . "\" ", array('req' => true, 'value' => 1, 'disabled' => false));
     shn_form_submit(_t('Submit Configuration'));
     shn_form_fsclose();
     shn_form_fclose();
     echo "<script> \$.validate(); </script>";
 }
コード例 #2
0
ファイル: act_edit_ad.php プロジェクト: GeraldScott/OpenEvSys
$act_form['update'] = array('type' => 'submit', 'label' => _t('SAVE'));
?>
  
        <br /> 
        <div class="form-container"> 
            <form class="form-horizontal"  id="additional" name="additional" action='<?php 
echo get_url('events', 'edit_ad', null, array('act_id' => $act->act_record_number));
?>
' method='post' enctype='multipart/form-data'>
                <?php 
echo "<h3>" . _t('EDIT_ADDITIONAL_DETAILS') . "</h3>&nbsp;";
if (!isset($ad_type)) {
    ?>
                    <div>
                        <?php 
    shn_form_radio(_t('ADDITIONAL_DETAIL_TYPE'), 'ad_type', array('options' => $ad_types));
    ?>
                        <div class="control-group">
                            <div ><a class="btn" href="<?php 
    echo get_url('events', 'vp_list', null, array('eid' => $event_id, 'act_id' => $_GET['act_id'], 'row' => $_GET['row'], 'type' => 'act'));
    ?>
"><i class="icon-remove-circle"></i> <?php 
    echo _t('CANCEL');
    ?>
</a> 
                                <button type='submit' class='btn btn-primary' ><i class="icon-chevron-right icon-white"></i> <?php 
    echo _t('NEXT');
    ?>
</button>
                            </div></div></div>
コード例 #3
0
ファイル: adv_search.tpl.php プロジェクト: hasshy/sahana-tw
<b>_("Please enter at least one field below:")</b><br /><br />

<div class="form-container">
<form method="get" action="index.php">

<input type="hidden" name="mod" value="vm">
<input type="hidden" name="act" value="volunteer">
<input type="hidden" name="vm_action" value="process_search">
<?php 
shn_form_fsopen(_('Personal Information'));
shn_form_text(_('Any ID Number:'), 'vol_id', 'size="30"');
shn_form_text(_('Name:'), 'vol_name', 'size="30"');
shn_form_fsclose();
shn_form_fsopen(_('Skills'));
shn_form_radio(array('and_skills' => _('Require ALL skills below'), 'or_skills' => _('Require ANY skills below')), _('Skills Matching:'), 'skills_matching');
$skills->display('', 'Node.toggleChildren(0, 0, true);');
$resources->display('', 'Node.toggleChildren(0, 0, true);');
shn_form_fsclose();
shn_form_submit(_('Search'));
?>

</form>
</div>