Code de-duplication: Move folder editing form template to libkolab plugin

This commit is contained in:
Aleksander Machniak 2018-03-28 12:06:48 +00:00
parent 653a36730a
commit 42a1177109
12 changed files with 14 additions and 77 deletions

View file

@ -621,8 +621,9 @@ class calendar_ui
// load miniColors js/css files
jqueryui::miniColors();
$this->rc->output->add_handler('calendarform', array($this, 'calendarform'));
$this->rc->output->send('calendar.folderform');
$this->rc->output->set_env('pagetitle', $this->cal->gettext('calendarprops'));
$this->rc->output->add_handler('folderform', array($this, 'calendarform'));
$this->rc->output->send('libkolab.folderform');
}
/**

View file

@ -297,6 +297,7 @@ $labels['arialabelsearchform'] = 'Event search form';
$labels['arialabelquicksearchbox'] = 'Event search input';
$labels['arialabelcalsearchform'] = 'Calendars search form';
$labels['calendaractions'] = 'Calendar actions';
$labels['calendarprops'] = 'Calendar properties';
$labels['arialabeleventattendees'] = 'Event participants list';
$labels['arialabeleventresources'] = 'Event resources list';
$labels['arialabelresourcesearchform'] = 'Resources search form';

View file

@ -1,9 +0,0 @@
<roundcube:include file="includes/layout.html" />
<h1 class="voice"><roundcube:label name="calendar.calendars" /> : <roundcube:label name="calendar.arialabelcalendarform" /></h1>
<div class="formcontent">
<roundcube:object name="calendarform" class="tabbed propform" />
</div>
<roundcube:include file="includes/footer.html" />

View file

@ -1501,20 +1501,6 @@ a.dropdown-link:after {
padding-right: 0.5em;
}
#calendar-kolabform {
position: relative;
margin: 0 -8px;
min-width: 660px;
min-height: 400px;
}
#calendar-kolabform table td.title {
font-weight: bold;
white-space: nowrap;
color: #666;
padding-right: 10px;
}
#resource-selection {
position: absolute;
top: 0;

View file

@ -1,9 +0,0 @@
<div id="calendar-kolabform" class="propform tabbed">
<roundcube:object name="calendarform" />
</div>
<style type="text/css">
#calendarpropform { min-width:680px; margin-top:-12px; }
</style>
<script type="text/javascript">
UI.init_tabs('#calendar-kolabform');
</script>

View file

@ -284,8 +284,9 @@ class kolab_notes_ui
$this->list = $list;
$this->folder = is_object($folder) ? $folder->name : ''; // UTF7;
$this->rc->output->add_handler('notebookform', array($this, 'notebookform'));
$this->rc->output->send('kolab_notes.listform');
$this->rc->output->set_env('pagetitle', $this->plugin->gettext('arialabelnotebookform'));
$this->rc->output->add_handler('folderform', array($this, 'notebookform'));
$this->rc->output->send('libkolab.folderform');
}
/**

View file

@ -1,9 +0,0 @@
<roundcube:include file="includes/layout.html" />
<h1 class="voice"><roundcube:label name="kolab_notes.notes" /> : <roundcube:label name="kolab_notes.arialabelnotebookform" /></h1>
<div class="formcontent">
<roundcube:object name="notebookform" class="tabbed propform" />
</div>
<roundcube:include file="includes/footer.html" />

View file

@ -1,18 +0,0 @@
<roundcube:object name="doctype" value="html5" />
<html>
<head>
<title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" />
</head>
<body class="iframe fullheight">
<h1 class="voice"><roundcube:label name="kolab_notes.notes" /> : <roundcube:label name="kolab_notes.arialabelnotebookform" /></h1>
<div class="boxcontent">
<roundcube:object name="notebookform" class="tabbed propform" />
</div>
<roundcube:include file="/includes/footer.html" />
</body>
</html>

View file

@ -6,10 +6,10 @@
</head>
<body class="iframe fullheight">
<h1 class="voice"><roundcube:label name="tasklist.navtitle" /> : <roundcube:label name="kolab_notes.arialabeltasklistform" /></h1>
<h1 class="voice"><roundcube:var name="env:pagetitle" /></h1>
<div class="boxcontent">
<roundcube:object name="tasklistform" class="tabbed propform" />
<roundcube:object name="folderform" class="tabbed propform" />
</div>
<roundcube:include file="/includes/footer.html" />

View file

@ -136,7 +136,7 @@ $labels['arialabellistsearchform'] = 'Tasklists search form';
$labels['arialabeltaskselector'] = 'List mode';
$labels['arialabeltasklisting'] = 'Tasks listing';
$labels['arialabelsortmenu'] = 'Tasks sorting options';
$labels['arialabeltasklistform'] = 'Tasks list form';
$labels['arialabeltasklistform'] = 'Tasks list properties';
// attendees
$labels['attendee'] = 'Assignee';

View file

@ -1,9 +0,0 @@
<roundcube:include file="includes/layout.html" />
<h1 class="voice"><roundcube:label name="tasklist.navtitle" /> : <roundcube:label name="kolab_notes.arialabeltasklistform" /></h1>
<div class="formcontent">
<roundcube:object name="tasklistform" class="tabbed propform" />
</div>
<roundcube:include file="includes/footer.html" />

View file

@ -338,8 +338,10 @@ class tasklist_ui
{
$this->action = $action;
$this->list = $list;
$this->rc->output->add_handler('tasklistform', array($this, 'tasklistform'));
$this->rc->output->send('tasklist.listform');
$this->rc->output->set_env('pagetitle', $this->plugin->gettext('arialabeltasklistform'));
$this->rc->output->add_handler('folderform', array($this, 'tasklistform'));
$this->rc->output->send('libkolab.folderform');
}
function tasklistform($attrib)