mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/11201] Split template file into multiple files
PHPBB3-11201
This commit is contained in:
parent
cacd43bfbd
commit
cbad102f88
8 changed files with 36 additions and 33 deletions
|
@ -60,6 +60,14 @@ abstract class type_base implements type_interface
|
|||
return 'profilefields.type.' . $this->get_name_short();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function get_template_filename()
|
||||
{
|
||||
return 'profilefields/' . $this->get_name_short() . '.html';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
@ -153,7 +161,7 @@ abstract class type_base implements type_interface
|
|||
|
||||
// set template filename
|
||||
$this->template->set_filenames(array(
|
||||
'cp_' . $this->get_name_short() . '_body' => 'custom_profile_fields.html',
|
||||
'cp_body' => $this->get_template_filename(),
|
||||
));
|
||||
|
||||
// empty previously filled blockvars
|
||||
|
@ -162,6 +170,6 @@ abstract class type_base implements type_interface
|
|||
// Assign template variables
|
||||
$this->generate_field($profile_row, $preview_options);
|
||||
|
||||
return $this->template->assign_display('cp_' . $this->get_name_short() . '_body');
|
||||
return $this->template->assign_display('cp_body');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
<!-- BEGIN dropdown -->
|
||||
<select name="{dropdown.FIELD_IDENT}" id="{dropdown.FIELD_IDENT}">
|
||||
<!-- BEGIN options --><option value="{dropdown.options.OPTION_ID}"{dropdown.options.SELECTED}>{dropdown.options.VALUE}</option><!-- END options -->
|
||||
</select>
|
||||
<!-- END dropdown -->
|
||||
|
||||
<!-- BEGIN text -->
|
||||
<textarea name="{text.FIELD_IDENT}" id="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}" class="inputbox">{text.FIELD_VALUE}</textarea>
|
||||
<!-- END text -->
|
||||
|
||||
<!-- BEGIN string -->
|
||||
<input type="text" class="inputbox autowidth" name="{string.FIELD_IDENT}" id="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" />
|
||||
<!-- END string -->
|
||||
|
||||
<!-- BEGIN bool -->
|
||||
<!-- IF bool.FIELD_LENGTH eq 1 -->
|
||||
<!-- BEGIN options --><label for="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}"><input type="radio" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /> {bool.options.VALUE}</label> <!-- END options -->
|
||||
<!-- ELSE -->
|
||||
<input type="checkbox" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}"<!-- IF bool.FIELD_VALUE --> checked="checked"<!-- ENDIF --> />
|
||||
<!-- ENDIF -->
|
||||
<!-- END bool -->
|
||||
|
||||
<!-- BEGIN int -->
|
||||
<input type="number" min="{int.FIELD_MINLEN}" max="{int.FIELD_MAXLEN}" class="inputbox autowidth" name="{int.FIELD_IDENT}" id="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" />
|
||||
<!-- END int -->
|
||||
|
||||
<!-- BEGIN date -->
|
||||
<label for="{date.FIELD_IDENT}_day">{L_DAY}{L_COLON} <select name="{date.FIELD_IDENT}_day" id="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select></label>
|
||||
<label for="{date.FIELD_IDENT}_month">{L_MONTH}{L_COLON} <select name="{date.FIELD_IDENT}_month" id="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select></label>
|
||||
<label for="{date.FIELD_IDENT}_year">{L_YEAR}{L_COLON} <select name="{date.FIELD_IDENT}_year" id="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select></label>
|
||||
<!-- END date -->
|
7
phpBB/styles/prosilver/template/profilefields/bool.html
Normal file
7
phpBB/styles/prosilver/template/profilefields/bool.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<!-- BEGIN bool -->
|
||||
<!-- IF bool.FIELD_LENGTH eq 1 -->
|
||||
<!-- BEGIN options --><label for="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}"><input type="radio" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}_{bool.options.OPTION_ID}" value="{bool.options.OPTION_ID}"{bool.options.CHECKED} /> {bool.options.VALUE}</label> <!-- END options -->
|
||||
<!-- ELSE -->
|
||||
<input type="checkbox" class="radio" name="{bool.FIELD_IDENT}" id="{bool.FIELD_IDENT}"<!-- IF bool.FIELD_VALUE --> checked="checked"<!-- ENDIF --> />
|
||||
<!-- ENDIF -->
|
||||
<!-- END bool -->
|
5
phpBB/styles/prosilver/template/profilefields/date.html
Normal file
5
phpBB/styles/prosilver/template/profilefields/date.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<!-- BEGIN date -->
|
||||
<label for="{date.FIELD_IDENT}_day">{L_DAY}{L_COLON} <select name="{date.FIELD_IDENT}_day" id="{date.FIELD_IDENT}_day">{date.S_DAY_OPTIONS}</select></label>
|
||||
<label for="{date.FIELD_IDENT}_month">{L_MONTH}{L_COLON} <select name="{date.FIELD_IDENT}_month" id="{date.FIELD_IDENT}_month">{date.S_MONTH_OPTIONS}</select></label>
|
||||
<label for="{date.FIELD_IDENT}_year">{L_YEAR}{L_COLON} <select name="{date.FIELD_IDENT}_year" id="{date.FIELD_IDENT}_year">{date.S_YEAR_OPTIONS}</select></label>
|
||||
<!-- END date -->
|
|
@ -0,0 +1,5 @@
|
|||
<!-- BEGIN dropdown -->
|
||||
<select name="{dropdown.FIELD_IDENT}" id="{dropdown.FIELD_IDENT}">
|
||||
<!-- BEGIN options --><option value="{dropdown.options.OPTION_ID}"{dropdown.options.SELECTED}>{dropdown.options.VALUE}</option><!-- END options -->
|
||||
</select>
|
||||
<!-- END dropdown -->
|
3
phpBB/styles/prosilver/template/profilefields/int.html
Normal file
3
phpBB/styles/prosilver/template/profilefields/int.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<!-- BEGIN int -->
|
||||
<input type="number" min="{int.FIELD_MINLEN}" max="{int.FIELD_MAXLEN}" class="inputbox autowidth" name="{int.FIELD_IDENT}" id="{int.FIELD_IDENT}" size="{int.FIELD_LENGTH}" value="{int.FIELD_VALUE}" />
|
||||
<!-- END int -->
|
|
@ -0,0 +1,3 @@
|
|||
<!-- BEGIN string -->
|
||||
<input type="text" class="inputbox autowidth" name="{string.FIELD_IDENT}" id="{string.FIELD_IDENT}" size="{string.FIELD_LENGTH}" maxlength="{string.FIELD_MAXLEN}" value="{string.FIELD_VALUE}" />
|
||||
<!-- END string -->
|
3
phpBB/styles/prosilver/template/profilefields/text.html
Normal file
3
phpBB/styles/prosilver/template/profilefields/text.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<!-- BEGIN text -->
|
||||
<textarea name="{text.FIELD_IDENT}" id="{text.FIELD_IDENT}" rows="{text.FIELD_ROWS}" cols="{text.FIELD_COLS}" class="inputbox">{text.FIELD_VALUE}</textarea>
|
||||
<!-- END text -->
|
Loading…
Add table
Reference in a new issue