Changeset 20 for trunk/bin/module_maker/form_template.cli.php
- Timestamp:
- Nov 17, 2005 3:00:00 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/module_maker/form_template.cli.php
r19 r20 65 65 <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td> 66 66 <td valign="top"> 67 <select name="$field" class=" formselect">67 <select name="$field" class="small"> 68 68 <\x3fphp printSelectForm('<##>_tbl', "CONCAT(<##>_id, '—', <##>)", '$field', \$frm['$field'], true, 'ORDER BY $field DESC'); \x3f> 69 69 </select> … … 75 75 76 76 // File upload. 77 if (preg_match('/file /i', $field)) {78 $output[$field] = <<<E_O_F 79 <tr> 80 <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td> 81 <td valign="top"> 82 <input type="file" name="$field" value="<\x3fphp echo \$_FILES['$field']['name']; \x3f>"/>83 <\x3fphp if ( getFormData('op') == 'edit' || getFormData('op') == 'update') { \x3f>84 <div class="help"><\x3fphp printf(_("The current file < strong>%s</strong> will be overwritten if a new file is selected for upload."), \$frm['$field']) \x3f></div>77 if (preg_match('/file|image/i', $field)) { 78 $output[$field] = <<<E_O_F 79 <tr> 80 <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td> 81 <td valign="top"> 82 <input type="file" name="$field" /> 83 <\x3fphp if ('' != \$upload->getFilenameGlob(getFormData('$primary_key_field') . '_*') && getFormData('op') == 'edit' || getFormData('op') == 'update') { \x3f> 84 <div class="help"><\x3fphp printf(_("The current file <a href=\"%s/%2\$s\"><strong>%2\$s</strong></a> will be deleted if a new file is selected for upload."), '/_db_files/<##>', \$upload->getFilenameGlob(getFormData('$primary_key_field') . '_*')) \x3f></div> 85 85 <\x3fphp } \x3f> 86 <div class="help"><\x3fphp printf(_("File to upload must have one of the following file-name extensions: %s."), join(', ', \$upload-> valid_file_extensions)) \x3f></div>86 <div class="help"><\x3fphp printf(_("File to upload must have one of the following file-name extensions: %s."), join(', ', \$upload->getParam('valid_file_extensions'))) \x3f></div> 87 87 </td> 88 88 </tr> … … 97 97 <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td> 98 98 <td valign="top"> 99 <input type="password" class=" forminputtext" size="50" name="$field" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>">99 <input type="password" class="medium" size="50" name="$field" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>" /> 100 100 </td> 101 101 </tr> … … 138 138 <td> </td> 139 139 <td> 140 <input type="checkbox" name="$field" <\x3fphp frmChecked(!empty(\$frm['$field'])) \x3f> ><label><\x3fphp echo _("$title"); \x3f></label>140 <input type="checkbox" name="$field" <\x3fphp frmChecked(!empty(\$frm['$field'])) \x3f> /><label><\x3fphp echo _("$title"); \x3f></label> 141 141 </td> 142 142 </tr> … … 157 157 <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td> 158 158 <td valign="top"> 159 <textarea class=" text" cols="75" rows="4" name="$field"><\x3fphp echo oTxt(\$frm['$field']); \x3f></textarea>159 <textarea class="large" cols="75" rows="4" name="$field"><\x3fphp echo oTxt(\$frm['$field']); \x3f></textarea> 160 160 </td> 161 161 </tr> … … 196 196 <td class="right"><label for="$field"<\x3fphp \$fv->err('$field', ' class="error"') \x3f>><\x3fphp echo _("$title"); \x3f></label></td> 197 197 <td valign="top"> 198 <input type="text" class=" text" size="50" name="$field" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>">198 <input type="text" class="medium" size="50" name="$field" value="<\x3fphp echo oTxt(\$frm['$field']); \x3f>" /> 199 199 </td> 200 200 </tr>
Note: See TracChangeset
for help on using the changeset viewer.