sugarcrm - add scheduler div to existing content when clicked on "schedule meeting" under activities subpanel of leads module - sugarcrm

In leads detail view under Activities subpanel, when clicked on "schedule meeting" I get some fields to schedule a meeting. I found these fields are coming from
mysugar\modules\Meetings\metadata\quickcreatedefs.php
But in addition to these fields I need scheduler div to be placed right below these fields so that while scheduling a meeting we can see what all times are occupied. I found that the code to this is in
mysugar\modules\Meetings\tpls\footer.tpl
How to add the above tpl to quickcreatedefs.php? It contains all arrays.
I am seeing this scheduler div when clicked on "Full Form" button. But that redirects to other page. I just want to put this same scheduler div(graph that shows what all times are occupied) while scheduling quick meeting itself.
Thanks in Advance.

In the view defs in custom/modules/{modulename}/metadata you can define a footer tpl like this:
$viewdefs ['Meetings'] = array (
'QuickCreate' =>
array (
'templateMeta' => array (
'form' => array (
.
.
.
.
'footerTpl' => 'modules/Meetings/tpls/footer.tpl',
.
.
.
you just have to ensure that the used smarty variables for the footer tpl are set

Related

in access need to doubleclick on record in subform to show detail on main form

I have a main form with a subform. The subform is continuous and shows all of the records. The main form works great for adding and editing records. I need to be able to double click on a record in the subform and that record be displayed on the main form for editing.
By experience I reccomend you to achieve what you are trying by placing two subforms into the master one. In one you have the list and in the other the details.
In the master form you place a hidden link field that is populated when you doubleclik on the list.
This field, let´s call it [link] is the Link Master Field in the detail subform, and the Link Child Field is the id (primary key) to identify your selection.
This will link your double click (or simple) with showing the details.
I found a solution that works to move to display the record from the subform in the master for editing.
In the DblClick event on the subform I put in the following code:
Let Forms!FrmNotes.CboNotesID = TxtNotesID 'TxtNotesID is the ID on the subform
Call Me.Parent.DisplayRecord
On the main for I created
Public Sub DisplayRecord()
CboNotesID.SetFocus
DoCmd.SearchForRecord , "", acFirst, "[NotesID] = " & "'" & Screen.ActiveControl & "'"
End Sub

can we add form on activeadmin index page in rails 4

I'm rendering a partial in my index page
index do
.
.
div id: "overlay-select-period" do
render partial: "select_period", locals: { period: GoalCalender.legend_name_year, record: UsersGoalCalender.new }
end
.
.
end
and in this partial (.html.erb) under app/views/admin/users_goal_calendars, I'm having rails form helper form_for used
but when I run the app, it doesn't show the form tag on the view <form></form>
can anyone tell me whether we can add such form in activeadmin index page?
P.S. I've tried all other ways to add form (formtastic, simple form
and form_tag), and writing the form directly inside index do...end
(without rendering a partial) with no luck
I know this is an old question but I just discovered myself that AA somehow removes your form tag if batch actions are enabled.
This is because enabling batch actions wraps most of the page in a form and nested forms are not fun.
The mention something about it here if you scroll all the down: https://activeadmin.info/9-batch-actions.html
I tried disabling batch actions and the form tag comes back.

How to make three dropdown in same line,Using zend form

I have a page , where i need to show 3 drop down in same line.
Iam generating these drop downs using zend form.
Now the drop down is coming one line after one line.
How can we make it in same line
Zend form comes with decorators. If decorators are set (which is used for template theming purpose) with '' or any other Html tag then there is a possibility that the element will be displayed in new line. Try with removing decorators.
Or you can generate select element dyanamicly on .phtml (view file) by using code
$this->formSelect("ID", "default value", array('style' => 'width:60px', 'class' => 'progDiv'), $options);
Where $options is an array of select box options like `$options = array(''=>'', 1=>'option1', 2=>'option2');`
If this does not solve your query please try to post your code
Thanks

the onclick of a table row is also working on a textfield inside that row?

On the categories page Where all the products are listed in rows and each complete row is a link to that product details page.
In that row I have created a textfield and a submit button but the product details link is also working on the textfield which I does not want.
When I click in the textfield for writing something in it, it redirects me to the product details page and I am unable to write something in the textfield.
So How will I handle it so that I could write some value in textfield?
This is just because of zen cart default code to redirecting user in case of clicking product row.
yo can change default behavior by two ways :
Use JavaScript/JQuery
you can use below code to prevent default action while someone click on textbox
<script>
$(".sortTextBox").click(function(event) {
event.preventDefault();
});
</script>
Manually change code in PHP file
you need to change product listing code in categories.php file located in admin folder of zencart.
Or, since you're changing the way the admin interface works, you could expand your changes to also remove the action that allows clicking on that table-row to be a quick access link to the details of that product (which is where editing of that product's information is normally handled).
For example, the onclick event in these code snippets would need to be removed:
echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_CATEGORIES, zen_get_path($categories->fields['categories_id'])) . '\'">' . "\n";
and
echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link($type_handler , 'page=' . $_GET['page'] . '&product_type=' . $products->fields['products_type'] . '&cPath=' . $cPath . '&pID=' . $products->fields['products_id'] . '&action=new_product' . (isset($_GET['search']) ? '&search=' . $_GET['search'] : '')) . '\'">' . "\n";
And then you'd have to use the (e) edit button to gain access to the actual normal product edit screen, instead of the luxury of clicking anywhere on the row.

How do i preserve form input - after submiting form with dynamic menu list ?? Zend framework

Im trying to preserve the user inputs from dynamic menu dropdown lists - I have an number of drowpdowns and a user input text field , when the user submits the form after selecting the options from the dropdowns.
I would like to be able to preserve the last choices made so the user does not have to reselect the options again when re posting the form with another value in the text field, i would also like this to work on errors as well ?
Im using ZF to validate the form.
i have tried the follwing code in the value attr of the option:
<option value="<?php if ($_POST && errors) {
echo htmlentities($_POST['CategoryID'], ENT_COMPAT, 'UTF-8');
}?>">Main Category</option>
But does not seem to work ?
I have a static options "Main Category" ect. which is what the form defaults to after submiting
can anyone help me on this one ??
Thanks in advance
I would highly recommend using Zend_Form. If that is not possible, I would next use Zend_View Helpers to build your HTML manually. Then you can use the formSelect in your view like this:
echo $this->formSelect('CategoryId', $selected, $attribs, array(
'main' => 'Main Category'
// ... other options
));
Where $selected variable equals to one of the following: posted value(s), default value(s), or is null and $attribs variable is simply attributes for the select element.