minor bug fix
[openemr.git] / templates / pharmacies / general_edit.html
blob5cbd520db29b20c719296d7d0edb3320584a11ad
1 <form name="pharmacy" method="post" action="{$FORM_ACTION}">
2 <!-- it is important that the hidden form_id field be listed first, when it is called is populates any old information attached with the id, this allows for partial edits
3 if it were called last, the settings from the form would be overwritten with the old information-->
4 <input type="hidden" name="form_id" value="{$pharmacy->id}" />
5 <table style="font-size:9pt;" width="500px" CELLSPACING="0" CELLPADDING="3">
6 <tr>
7 <td width="150px" VALIGN="MIDDLE" >{xl t='Name'}</td>
8 <td VALIGN="MIDDLE" >
9 <input type="text" size="40" name="name" value="{$pharmacy->name}"/>({xl t='Required'})
10 </td>
11 </tr>
12 <tr>
13 <td VALIGN="MIDDLE" >{xl t='Address'}</td>
14 <td VALIGN="MIDDLE" >
15 <input type="text" size="40" name="address_line1" value="{$pharmacy->address->line1}"/>
16 </td>
17 </tr>
18 <tr>
19 <td VALIGN="MIDDLE" >{xl t='Address'}</td>
20 <td VALIGN="MIDDLE" >
21 <input type="text" size="40" name="address_line2" value="{$pharmacy->address->line2}"/>
22 </td>
23 </tr>
24 <tr>
25 <td VALIGN="MIDDLE" >{xl t='City, State Zip'}</td>
26 <td VALIGN="MIDDLE" >
27 <input type="text" size="25" name="city" value="{$pharmacy->address->city}"/> , <input type="text" size="2" maxlength="2" name="state" value="{$pharmacy->address->state}"/> <input type="text" size="5" name="zip" value="{$pharmacy->address->zip}"/>
28 </td>
29 </tr>
30 <tr>
31 <td VALIGN="MIDDLE" >{xl t='Email'}</td>
32 <td VALIGN="MIDDLE" >
33 <input TYPE="TEXT" NAME="email" SIZE="35" VALUE="{$pharmacy->email}"/>
34 </td>
35 </tr>
36 <tr>
37 <td VALIGN="MIDDLE" >{xl t='Phone'}</td>
38 <td VALIGN="MIDDLE" >
39 <input TYPE="TEXT" NAME="phone" SIZE="12" VALUE="{$pharmacy->get_phone()}"/>
40 </td>
41 </tr>
42 <tr>
43 <td VALIGN="MIDDLE" >{xl t='Fax'}</td>
44 <td VALIGN="MIDDLE" >
45 <input TYPE="TEXT" NAME="fax" SIZE="12" VALUE="{$pharmacy->get_fax()}"/>
46 </td>
47 </tr>
49 <tr>
50 <td VALIGN="MIDDLE" >{xl t='Default Method'}</td>
51 <td VALIGN="MIDDLE" >
52 <select name="transmit_method">{html_options options=$pharmacy->transmit_method_array selected=$pharmacy->transmit_method}</select>
53 </td>
54 </tr>
55 <tr><td colspan="2">&nbsp;</td></tr>
56 <tr>
57 <td colspan="2"><a href="javascript:submit_pharmacy();" class="css_button"><span>{xl t='Save'}</span></a><a href="controller.php?practice_settings&pharmacy&action=list" {php} if (!$GLOBALS['concurrent_layout']) echo "target='Main'"; {/php} class="css_button" onclick="top.restoreSession()">
58 <span>{xl t='Cancel'}</span></a>
59 </td>
60 </tr>
61 </table>
62 <input type="hidden" name="id" value="{$pharmacy->id}" />
63 <input type="hidden" name="process" value="{$PROCESS}" />
64 </form>
66 {literal}
67 <script language="javascript">
68 function submit_pharmacy()
70 if(document.pharmacy.name.value.length>0)
72 top.restoreSession();
73 document.pharmacy.submit();
74 Waittoredirect(500);
75 this.location.href="{/literal}{$WEB_ROOT}{literal}/controller.php?practice_settings&pharmacy&action=list";
77 else
79 document.pharmacy.name.style.backgroundColor="red";
80 document.pharmacy.name.focus();
84 function Waittoredirect(delaymsec) {
85 var st = new Date();
86 var et = null;
87 do {
88 et = new Date();
89 } while ((et - st) < delaymsec);
91 </script>
92 {/literal}