Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Mon, Jan 6, 1:45 AM

in-portal

Index: branches/5.2.x/admin/system_presets/simple/phrases_phrases.php
===================================================================
--- branches/5.2.x/admin/system_presets/simple/phrases_phrases.php (revision 15253)
+++ branches/5.2.x/admin/system_presets/simple/phrases_phrases.php (revision 15254)
@@ -1,59 +1,59 @@
<?php
defined('FULL_PATH') or die('restricted access!');
// section removal
$remove_sections = Array (
// 'in-portal:phrases',
);
// sections shown with debug on
$debug_only_sections = Array (
'in-portal:phrases',
);
// toolbar buttons
$remove_buttons = Array (
// edit phrase via regional
// 'phrase_edit' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
// single phrase list
'phrases_list_st' => Array (/*'new_item', 'edit', 'delete', 'view',*/ 'export', /*'dbl-click'*/),
// edit phrase
// 'phrase_edit_single' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
);
// fields to hide
$hidden_fields = Array (
/*'PhraseId', 'Phrase', 'PhraseKey', 'Translation', 'HintTranslation', 'ColumnTranslation',
'PhraseType', 'LastChanged', 'LastChangeIP', 'Module',*/
);
// virtual fields to hide
$virtual_hidden_fields = Array (
/*'PrimaryTranslation', 'CurrentTranslation', 'CurrentHintTranslation', 'CurrentColumnTranslation',
'LangFile', 'ImportOverwrite', 'DoNotEncode', 'ExportPhrases', 'ExportEmailEvents'*/
);
$debug_only_fields = Array (
-// 'HintTranslation', 'ColumnTranslation'
+ 'HintTranslation', 'ColumnTranslation'
);
// fields to make required
$required_fields = Array (
'Phrase', 'Translation', 'PhraseType', 'Module'
);
// virtual fields to make required
$virtual_required_fields = Array (
);
// hide columns in grids
$hide_columns = Array (
// default grid
// 'Default' => Array ('PhraseId', 'Phrase', 'CurrentTranslation', 'PrimaryTranslation', 'PhraseType', 'LastChanged', 'Module', 'CurrentHintTranslation', 'CurrentColumnTranslation'),
// single list of phrases
// 'Phrases' => Array ('PhraseId', 'Phrase', 'CurrentTranslation', 'PhraseType', 'LastChanged', 'Module', 'CurrentHintTranslation', 'CurrentColumnTranslation'),
);
\ No newline at end of file
Index: branches/5.2.x/core/admin_templates/regional/phrases_edit.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/regional/phrases_edit.tpl (revision 15253)
+++ branches/5.2.x/core/admin_templates/regional/phrases_edit.tpl (revision 15254)
@@ -1,104 +1,105 @@
<inp2:adm_SetPopupSize width="888" height="510"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="lang" section="in-portal:configure_lang" title_preset="phrase_edit"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('phrases','<inp2:phrases_SaveEvent/>');
}
) );
a_toolbar.AddButton(
new ToolBarButton(
'cancel',
'<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>',
function() {
<inp2:m_if check="phrases_UseQuickFormCancel">
window_close();
<inp2:m_else/>
cancel_edit('phrases', 'OnCancelEdit', '<inp2:phrases_SaveEvent/>', '<inp2:m_Phrase label="la_FormCancelConfirmation" js_escape="1"/>');
</inp2:m_if>
}
)
);
a_toolbar.AddButton( new ToolBarButton('reset_edit', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
reset_form('phrases', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
}
) );
<inp2:m_if check="phrases_IsTopmostPrefix">
<inp2:m_if check="phrases_IsSingle" inverse="inverse">
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
</inp2:m_if>
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('phrases', '<inp2:phrases_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('phrases', '<inp2:phrases_NextId/>');
}
) );
</inp2:m_if>
a_toolbar.Render();
<inp2:m_RenderElement name="edit_navigation" prefix="phrases"/>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:phrases_SaveWarning name="grid_save_warning"/>
<inp2:phrases_ErrorWarning name="form_error_warning"/>
<input type="hidden" name="simple_mode" value="<inp2:m_Get name='simple_mode'/>"/>
<input type="hidden" id="phrases_label" name="phrases_label" value="<inp2:m_Get name='phrases_label'/>"/>
<input type="hidden" name="regional" value="<inp2:m_Get name='regional'/>"/>
<inp2:m_if check="m_Get" name="simple_mode">
<inp2:m_RenderElement name="inp_edit_hidden" prefix="phrases" field="Phrase"/>
</inp2:m_if>
<inp2:m_DefineElement name="phrase_element">
<inp2:lang_Field name="LanguageId" result_to_var="language_id"/>
<inp2:m_if check="m_Get" name="simple_mode">
<inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="phrases" field="l{$language_id}_Translation" title="la_fld_Translation" rows="7" cols="50" allow_html="0"/>
<inp2:m_else/>
<tr class="subsectiontitle">
<td colspan="3"><inp2:phrases_Field name="Phrase"/></td>
</tr>
<inp2:m_RenderElement name="inp_label" prefix="phrases" field="PrimaryTranslation"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="phrases" field="Phrase" size="60"/>
+
<inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="phrases" field="l{$language_id}_Translation" title="la_fld_Translation" style="width: 100%; height: 100px;" control_options="{max_height: 100}" allow_html="0"/>
<inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="phrases" field="l{$language_id}_HintTranslation" title="la_fld_HintTranslation" style="width: 100%; height: 50px;" control_options="{max_height: 50}" allow_html="0"/>
<inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="phrases" field="l{$language_id}_ColumnTranslation" title="la_fld_ColumnTranslation" style="width: 100%; height: 50px;" control_options="{max_height: 50}" allow_html="0"/>
<inp2:m_RenderElement name="inp_label" prefix="phrases" field="PhraseType"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="phrases" field="Module" has_empty="1"/>
</inp2:m_if>
</inp2:m_DefineElement>
<div id="scroll_container">
<table class="edit-form">
<!--##<inp2:m_if check="m_GetEquals" name="phrases_label" value="ALEX, FIX IT!">
<inp2:phrases_MultipleEditing render_as="phrase_element"/>
<inp2:m_else/>##-->
<inp2:m_RenderElement name="phrase_element"/>
<!--##</inp2:m_if>##-->
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/core/admin_templates/languages/phrase_edit.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/languages/phrase_edit.tpl (revision 15253)
+++ branches/5.2.x/core/admin_templates/languages/phrase_edit.tpl (revision 15254)
@@ -1,111 +1,110 @@
<inp2:adm_SetPopupSize width="888" height="510"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" section="in-portal:phrases" prefix="phrases" title_preset="phrase_edit_single"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('phrases','<inp2:phrases_SaveEvent/>');
}
) );
a_toolbar.AddButton(
new ToolBarButton(
'cancel',
'<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>',
function() {
<inp2:m_if check="phrases_UseQuickFormCancel">
window_close();
<inp2:m_else/>
cancel_edit('phrases', 'OnCancelEdit', '<inp2:phrases_SaveEvent/>', '<inp2:m_Phrase label="la_FormCancelConfirmation" js_escape="1"/>');
</inp2:m_if>
}
)
);
a_toolbar.AddButton( new ToolBarButton('reset_edit', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
reset_form('phrases', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
}
) );
<inp2:m_if check="phrases_IsTopmostPrefix">
<inp2:m_if check="phrases_IsSingle" inverse="inverse">
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
</inp2:m_if>
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('phrases', '<inp2:phrases_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('phrases', '<inp2:phrases_NextId/>');
}
) );
</inp2:m_if>
a_toolbar.Render();
<inp2:m_RenderElement name="edit_navigation" prefix="phrases"/>
</script>
</td>
<inp2:m_ifnot check="m_Get" name="simple_mode">
<inp2:m_RenderElement name="ml_selector" prefix="phrases"/>
</inp2:m_ifnot>
</tr>
</tbody>
</table>
<inp2:phrases_SaveWarning name="grid_save_warning"/>
<inp2:phrases_ErrorWarning name="form_error_warning"/>
<input type="hidden" name="simple_mode" value="<inp2:m_Get name='simple_mode'/>"/>
<input type="hidden" id="phrases_label" name="phrases_label" value="<inp2:m_Get name='phrases_label'/>"/>
<inp2:m_if check="m_Get" name="simple_mode">
<inp2:m_RenderElement name="inp_edit_hidden" prefix="phrases" field="Phrase"/>
</inp2:m_if>
+<inp2:m_DefineElement name="translations_element">
+ <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="phrases" field="Translation" style="width: 100%; height: 100px;" control_options="{max_height: 100}" allow_html="0"/>
+ <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="phrases" field="HintTranslation" style="width: 100%; height: 50px;" control_options="{max_height: 50}" allow_html="0"/>
+ <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="phrases" field="ColumnTranslation" style="width: 100%; height: 50px;" control_options="{max_height: 50}" allow_html="0"/>
+</inp2:m_DefineElement>
+
<inp2:m_DefineElement name="phrase_element">
<inp2:m_if check="m_Get" name="simple_mode">
- <inp2:m_if check="m_IsDebugMode">
- <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="phrases" field="Translation" style="width: 100%; height: 100px;" control_options="{max_height: 100}" allow_html="0"/>
- <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="phrases" field="HintTranslation" style="width: 100%; height: 50px;" control_options="{max_height: 50}" allow_html="0"/>
- <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="phrases" field="ColumnTranslation" style="width: 100%; height: 50px;" control_options="{max_height: 50}" allow_html="0"/>
- <inp2:m_else/>
- <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="phrases" field="Translation" title="la_fld_Translation" rows="7" cols="50" allow_html="0"/>
- </inp2:m_if>
+ <inp2:m_RenderElement name="translations_element"/>
<inp2:m_else/>
<tr class="subsectiontitle">
<td colspan="3"><inp2:phrases_Field name="Phrase"/></td>
</tr>
<inp2:m_RenderElement name="inp_label" prefix="phrases" field="PrimaryTranslation"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="phrases" field="Phrase" size="60"/>
- <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="phrases" field="Translation" style="width: 100%; height: 100px;" control_options="{max_height: 100}" allow_html="0"/>
- <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="phrases" field="HintTranslation" style="width: 100%; height: 50px;" control_options="{max_height: 50}" allow_html="0"/>
- <inp2:m_RenderElement name="inp_edit_textarea_ml" prefix="phrases" field="ColumnTranslation" style="width: 100%; height: 50px;" control_options="{max_height: 50}" allow_html="0"/>
+
+ <inp2:m_RenderElement name="translations_element"/>
<inp2:m_RenderElement name="inp_label" prefix="phrases" field="PhraseType"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="phrases" field="Module" has_empty="1"/>
</inp2:m_if>
</inp2:m_DefineElement>
<div id="scroll_container">
<table class="edit-form">
<!--##<inp2:m_if check="m_GetEquals" name="phrases_label" value="ALEX, FIX IT!">
<inp2:phrases_MultipleEditing render_as="phrase_element"/>
<inp2:m_else/>##-->
<inp2:m_RenderElement name="phrase_element"/>
<!--##</inp2:m_if>##-->
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file

Event Timeline