/[H9]/trunk/tntnet/dynamic/adm_customer_edit.ecpp
ViewVC logotype

Diff of /trunk/tntnet/dynamic/adm_customer_edit.ecpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 179 by torben, Thu Dec 6 18:40:14 2007 UTC revision 195 by torben, Sat Dec 8 16:47:03 2007 UTC
# Line 45  reply.out() << "<a href='adm_customer_li Line 45  reply.out() << "<a href='adm_customer_li
45  reply.sout() << "<< back to customer list";  reply.sout() << "<< back to customer list";
46  reply.out() << "</a><br><br>";  reply.out() << "</a><br><br>";
47    
48  tntdb::Connection conn = tntdb::connect(dburl);  tntdb::Connection conn = tntdb::connectCached(dburl);
49    
50    
51  std::string submit = qparam.param("submit");  std::string submit = qparam.param("submit");
# Line 113  if (showForm) Line 113  if (showForm)
113  {  {
114  }>  }>
115    
116  <form method="post" action="adm_customer_edit">  <script type="text/javascript" language="JavaScript" src="/md5.js"></script>
117    <script type="text/javascript" language="JavaScript" src="/trim.js"></script>
118    <script type="text/javascript">
119    
120    function validateCustomerForm()
121    {
122            var form = document.customerform;
123            form.name.value = trim(form.name.value);
124    
125            if (form.name.value.length < 3)
126            {
127                    alert("Name must at least be 3 characters");
128                    return false;
129            }
130    
131            return true;
132    }
133    
134    </script>
135    
136    <form method="post" action="adm_customer_edit" name="customerform" onsubmit="return validateCustomerForm();">
137  <table border="0">  <table border="0">
138  <tr>  <tr>
139    <td>Name: </td>    <td>Name: </td>
# Line 144  if (showForm) Line 164  if (showForm)
164  if (id != -1)  if (id != -1)
165  {  {
166  }>  }>
167    <br>
168  <br>  <br>
169  <form method="post" action="adm_customer_delete" onsubmit="return confirm('Are you sure?\\nThis will delete all related installations and logdata','Delete customer');">  <form method="post" action="adm_customer_delete" onsubmit="return confirm('Are you sure?\\nThis will delete all related installations and logdata','Delete customer');">
170  <input type="hidden" name="id" value="<$ id $>">  <input type="hidden" name="id" value="<$ id $>">

Legend:
Removed from v.179  
changed lines
  Added in v.195

  ViewVC Help
Powered by ViewVC 1.1.20