public function testTextfield() { $this->assertDomEqual(text_field('post', 'title', $this->post), '<input id="post_title" name="post[title]" size="30" type="text" value="PHP for ever" />'); $this->assertDomEqual(password_field('post', 'title', $this->post), '<input id="post_title" name="post[title]" size="30" type="password" value="PHP for ever" />'); $this->assertDomEqual(file_field('post', 'title', $this->post), '<input id="post_title" name="post[title]" type="file" />'); $this->assertDomEqual(text_field('post', 'title', $this->post, array('size' => 35, 'maxlength' => 35)), '<input id="post_title" name="post[title]" size="35" maxlength="35" type="text" value="PHP for ever" />'); $this->assertDomEqual(text_field('post', 'title', $this->post, array('index' => 2)), '<input id="post_2_title" name="post[2][title]" size="30" type="text" value="PHP for ever" />'); }
<?php } else { ?> <?php echo lang('no current logo'); } // if ?> </fieldset> <div> <?php echo label_tag(lang('new logo'), 'avatarFormAvatar', true); ?> <?php echo file_field('new_logo', null, array('id' => 'avatarFormAvatar')); if ($company->hasLogo()) { ?> <p class="desc"><?php echo lang('new logo notice'); ?> </p> <?php } // if ?> </div> <?php echo submit_button(lang('edit company logo')); ?>
<?php } else { ?> <?php echo lang('no current logo'); } // if ?> </fieldset> <div> <?php echo label_tag(lang('new logo'), 'projectFormLogo', true); ?> <?php echo file_field('new_logo', null, array('id' => 'projectFormLogo')); if ($project->hasLogo()) { ?> <p class="desc"><?php echo lang('new logo notice'); ?> </p> <?php } // if ?> </div> <?php echo submit_button(lang('upload')); ?>
<div id="fileRevisionComment"> <?php echo label_tag(lang('revision comment'), 'fileRevisionComment'); ?> <?php echo textarea_field('revision[comment]', array_var($revision_data, 'comment'), array('class' => 'short', 'id' => 'fileRevisionComment')); ?> </div> <div class="hint"> <div class="content"> <div> <?php echo label_tag(lang('new file'), 'fileRevisionFile', true); ?> <?php echo file_field('file_file', null, array('id' => 'fileRevisionFile')); ?> </div> </div> </div> <?php echo submit_button(lang('save')); ?> <a href="<?php echo $file->getDetailsUrl(); ?> "><?php echo lang('cancel'); ?> </a> </form>
</tr></table> </div> </div> <?php if (!isset($titles) && !isset($import_result)) { ?> <div id="<?php echo $genid; ?> selectFileControlDiv"> <?php echo label_tag(lang('file'), $genid . 'filenamefield', true); ?> <?php echo file_field('csv_file', null, array('id' => $genid . 'filenamefield', 'class' => 'title', 'tabindex' => 10, 'size' => '88', "onchange" => 'javascript:og.submitCsv(\'' . $genid . '\')')); ?> </div> <div id="<?php echo $genid; ?> first_record_has_names_div"> <table><tr><td><?php echo label_tag(lang('first record contains field names'), $genid . 'first_record_has_names'); ?> </td> <td style="padding-left:10px;padding-top:5px;"> <?php echo yes_no_widget('first_record_has_names', $genid . 'first_record_has_names', true, lang('yes'), lang('no'), 20); ?> </td></tr></table>
<div> <?php echo label_tag(lang('email address'), 'contactFormEmail', false) ?> <?php echo text_field('contact[email]', array_var($contact_data, 'email'), array('class' => 'long', 'id' => 'contactFormEmail')) ?> </div> <div> <fieldset> <legend><?php echo lang('avatar') ?></legend> <?php if ($contact->hasAvatar()) { ?> <img src="<?php echo $contact->getAvatarUrl() ?>" alt="<?php echo clean($contact->getDisplayName()) ?> avatar" /> <p><?php echo checkbox_field('contact[delete_avatar]', false, array('id'=>'contactDeleteAvatar', 'class' => 'checkbox')) ?> <?php echo label_tag(lang('delete current avatar'), 'contactDeleteAvatar', false, array('class' => 'checkbox'), '') ?></p> <?php } else { ?> <p><?php echo lang('no current avatar') ?></p> <?php } // if ?> <?php echo label_tag(lang('avatar'), 'contactFormAvatar', false) ?> <?php echo file_field('new avatar', null, array('id' => 'contactFormAvatar')) ?> <?php if ($contact->hasAvatar()) { ?> <p class="desc"><?php echo lang('new avatar notice') ?></p> <?php } // if ?> <?php echo label_tag(lang('use gravatar'), 'contactFormUseGravatar', true) ?> <?php echo yes_no_widget('contact[use_gravatar]', 'contactFormUseGravatar', array_var($contact_data, 'use_gravatar'), lang('yes'), lang('no')) ?> </fieldset> </div> <fieldset> <legend><?php echo lang('phone numbers') ?></legend> <div> <?php echo label_tag(lang('office phone number'), 'contactFormOfficeNumber') ?> <?php echo text_field('contact[office_number]', array_var($contact_data, 'office_number'), array('id' => 'contactFormOfficeNumber')) ?> </div>
<?php } else { ?> <?php echo lang('no current picture'); } // if ?> </fieldset> <div> <?php echo label_tag(lang('new picture'), 'pictureFormPicture', true); ?> <?php echo file_field('new picture', null, array('id' => 'pictureFormPicture', 'tabindex' => '1')); if ($contact->hasPicture()) { ?> <p class="desc"><?php echo lang('new picture notice'); ?> </p> <?php } // if ?> </div> <?php echo submit_button(lang('save'), 's', array('tabindex' => '10')); ?>
echo $attach_files_id; ?> " class="attachFiles"> <legend><?php echo lang('attach files'); ?> </legend> <div id="attachFilesControls_<?php echo $attach_files_id; ?> "> <div id="attachFiles_<?php echo $attach_files_id; ?> _1"><?php echo file_field($attach_files_prefix . '1'); ?> </div> </div> </fieldset> <script type="text/javascript"> App.modules.attachFiles.initialize(<?php echo $attach_files_max_controls; ?> , '<?php echo lang('add attach file control'); ?> ', '<?php echo lang('remove attach file control'); ?>
<table style="width:535px"> <tr> <td><?php echo lang('import contacts from vcard');?></td> <?php if (!isset($import_result)) { ?> <td style="text-align: right"> <?php //echo submit_button(lang('import'),'s',array("onclick" => 'og.submitVcard(\'' . $genid .'\');','style'=>'margin-top:0px;margin-left:10px','id' => $genid.'add_file_submit1', 'tabindex' => '210')) ?> </td> <?php } ?> </tr> </table> </div> </div> <?php if (!isset($import_result)) { ?> <div id="<?php echo $genid ?>selectFileControlDiv"> <?php echo label_tag(lang('file'), $genid . 'filenamefield', true) ?> <?php echo file_field('vcard_file', null, array('id' => $genid . 'filenamefield', 'class' => 'title', 'tabindex' => 10, 'size' => '88', "onchange" => 'og.submitVcard(\'' . $genid .'\');')) ?> </div> <?php } //if ?> </div> <div class="coInputMainBlock adminMainBlock"> <?php if (!isset($import_result)) { ?> <p> <b> <?php lang('select a vcard file to load its data'); ?> </b> </p> <?php } if (isset($import_result)) {
<?php if ($link->hasLogo()) { ?> <p class="desc"><?php echo lang('new logo notice'); ?> </p> <?php } // if ?> <?php echo label_tag(lang('file'), 'linkFormLogo', false); ?> <?php echo file_field('new_logo', null, array('id' => 'linkFormLogo')); ?> <?php echo label_tag(lang('snapshot'), 'linkFormSnapshot', false); ?> <span id="linkFormSnapshot" style="float: left;"><img id="snapshot" src="http://wimg.ca/<?php echo $link->asUrl(); ?> " width="256" height="192"></span> <span id="preview" style="margin-left: 20px; float: left; display: block; overflow:hidden; width:50px; height:50px;"><img src="http://wimg.ca/<?php echo $link->asUrl(); ?> "></span> </fieldset> <?php echo submit_button(lang('upload'));
<h1><?php echo lang('new picture'); ?> </h1> <div class="desc"><?php echo lang('new picture notice'); ?> </div> <div style="margin-top:20px;"> <!-- image uploading form --> <form action="<?php echo $action; ?> " method="post" enctype="multipart/form-data" onsubmit="og.beforePictureSubmit();return og.submit(this)" target="_blank"> <?php echo file_field('new picture', null, array('id' => $genid . 'uploadImage')); ?> <div><?php echo submit_button(lang('save'), 's', array('id' => $genid . 'submit_btn')); ?> <?php echo button(lang('back'), 'b', array('id' => $genid . 'back_btn', 'onclick' => "og.beforePictureSubmit();og.goback(this);")); ?> </div> <!-- hidden inputs --> <input type="hidden" id="<?php echo $genid; ?> x" name="x" /> <input type="hidden" id="<?php
function fengoffice_render_upload_control($args, &$ret) { if (upload_hook() == 'fengoffice') { $attributes = $args['attributes']; echo file_field('file_file', null, $attributes); } }
public function file_field($method, $options = array()) { return file_field($this->objectName, $method, $this->object, $options); }
} </script> <form style="height:100%;background-color:white" id="<?php echo $genid ?>calimport" name="<?php echo $genid ?>calimport" class="internalForm" action="<?php echo $submit_url ?>" method="post" enctype="multipart/form-data"> <div class="file"> <div class="coInputHeader"> <div class="coInputHeaderUpperRow"> <div class="coInputTitle"> <table style="width:535px"><tr><td><?php echo lang('import events from file');?></td> <td style="text-align:right"><?php echo submit_button(lang('import'), 's', array('style'=>'margin-top:0px;margin-left:10px', 'tabindex' => '10','id' => $genid.'cal_import_submit1')) ?></td> </tr></table> </div> </div> <div id="<?php echo $genid ?>selectFileControlDiv"> <?php echo label_tag(lang('file'), $genid . 'filenamefield', true) ?> <?php echo file_field('cal_file', null, array('id' => $genid . 'filenamefield', 'tabindex' => '1', 'class' => 'title', 'size' => '88', "onchange" => 'javascript:og.submitFile(\'' . $genid .'\')')) ?> <input type="hidden" name="atimportform" value="1"></input> <input type="hidden" name="subscribers[user_<?php echo logged_user()->getId() ?>]" value="checked"></input> </div> </div> <div class="coInputMainBlock adminMainBlock"> <span><b><?php echo lang('file should be in icalendar format') ?></b></span> </div> </div> </form> <script> Ext.get('<?php echo $genid ?>filenamefield').focus(); </script>
<?php } // if ?> <?php if ($file->isNew()) { ?> <div class="hint"> <div class="content"> <div id="selectFileControl"> <?php echo label_tag(lang('file'), 'fileFormFile', true); ?> <?php echo file_field('file_file', null, array('id' => 'fileFormFile')); ?> </div> <!-- <div id="selectFolderControl"> <?php echo label_tag(lang('folder'), 'fileFormFolder'); ?> <?php echo select_project_folder('file[folder_id]', active_project(), array_var($file_data, 'folder_id'), array('id' => 'fileFormFolder')); ?> </div> --> <p><?php echo lang('upload file desc', format_filesize(get_max_upload_size())); ?> </p> </div>