3333
3434 class CAP_Form{
3535
36- var $ version = '1.4 ' ;
36+ var $ version = '1.5.5 ' ;
3737 var $ login_id = 0 ;
3838 /**
3939 * initialize Class with Data
@@ -691,7 +691,7 @@ function InputStandard($type, $status_arr = "")
691691
692692
693693
694- $ out .= '<div data-role="popup" id="CAP_SOAP_popupDialog" data-overlay-theme="a" data-theme="a" data-dismissible="true" style="max-width:400px ;"> ' ;
694+ $ out .= '<div data-role="popup" id="CAP_SOAP_popupDialog" data-overlay-theme="a" data-theme="a" data-dismissible="true" style="max-width:560px ;"> ' ;
695695 $ out .= '<a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-left">Close</a> ' ;
696696 $ out .= '<div data-role="header" id="CAP_SOAP_popupDialog_header" data-theme="a"> ' ;
697697 if (!empty ($ plugin ->name )) $ out .= '<h2> ' .$ langs ->trans ('ProducedCaps ' ).'</h2> ' ;
@@ -1207,8 +1207,8 @@ function InputStandard($type, $status_arr = "")
12071207 }
12081208 else
12091209 {
1210- $ S_Area [$ area_arr ['EMMA_ID ' ]] = $ area_arr ['AreaCaption ' ];
1211- $ G_Area [$ area_arr ['EMMA_ID ' ]] = "EMMA_ID " ;
1210+ // $S_Area[$area_arr['EMMA_ID']] = $area_arr['AreaCaption'];
1211+ // $G_Area[$area_arr['EMMA_ID']] = "EMMA_ID";
12121212 }
12131213 }
12141214
@@ -1415,10 +1415,15 @@ function InputStandard($type, $status_arr = "")
14151415 case 'webservice_on ' :
14161416 if ($ configuration ->conf ["webservice " ]["service_on " ] == 1 ) $ onoroff = 'checked="" ' ;
14171417 else $ onoroff = '' ;
1418- //$out = '<label for="webservice_switch">'.$langs->trans("Webservice").':</label>';
1419- $ out = '<legend> ' .$ langs ->trans ("LabelWebservice " ).': ' .$ this ->tooltip ($ type .'tool ' , $ langs ->trans ("LabelWebserviceDesc " )).'</legend> ' ;
1418+ //$out = '<label for="webservice_switch">'.$langs->trans("Webservice").':</label>';
1419+ $ out = '<legend> ' .$ langs ->trans ("LabelWebservice1 " ).': ' .$ this ->tooltip ($ type .'tool ' , $ langs ->trans ("LabelWebserviceDesc " )).'</legend> ' ;
14201420 $ out .= '<input ' .$ status_theme .' type="checkbox" data-role="flipswitch" name="conf[webservice][on]" id="webservice_switch" ' .$ onoroff .' data-theme="b"> ' ;
1421- break ;
1421+ $ out .= '<br> ' ;
1422+ $ out .= '<legend> ' .$ langs ->trans ("LabelWebservice2 " ).': ' .$ this ->tooltip ($ type .'tool ' , $ langs ->trans ("LabelWebserviceDesc " )).'</legend> ' ;
1423+ $ out .= '<input type="checkbox" data-role="flipswitch" name="conf[webservice][on]" id="webservice_2_switch"> ' ;
1424+ $ out .= '<br> ' ;
1425+ $ out .= '<p style="font-size:16px;"> ' .$ langs ->trans ("UserInfoLoginPassword " ).'</p> ' ;
1426+ break ;
14221427
14231428 case 'webservice_password ' :
14241429 $ out = '<legend> ' .$ langs ->trans ("Labelwebservice_password " ).': ' .$ this ->tooltip ($ type .'tool ' , $ langs ->trans ("Labelwebservice_passwordDesc " )).'</legend> ' ;
@@ -1756,7 +1761,7 @@ function buildSelectValueName($name, $name2, $name3, $S_Area, $G_Area, $select =
17561761 */
17571762 function buildSelect ($ name = "" , $ data = array (), $ option = "" , $ placeholder = "" , $ selected ="" , $ empty =0 )
17581763 {
1759- $ out = '<select name=" ' .$ name .'" ' .$ option .'> ' ;
1764+ $ out = '<select onchange="get_date();" name=" ' .$ name .'" ' .$ option .'> ' ;
17601765
17611766 if ($ empty == 1 )
17621767 {
@@ -2062,27 +2067,77 @@ function Form()
20622067 $ out .= '</div> ' ; // UI_BODY_A
20632068
20642069 // DETAILS
2065- if (count ($ TypePage ['detail ' ]['value ' ]) >= 1 && $ TypePage ['detail ' ]['value ' ] != -1 )
2066- {
2070+ if (count ($ TypePage ['detail ' ]['value ' ]) >= 1 && $ TypePage ['detail ' ]['value ' ] != -1 ) {
20672071 $ visibl = "" ;
20682072 if ($ configuration ->conf ["webservice " ]["service_on " ] == 0 && $ pagename == "conf " ) $ visibl = 'style="display:none;" ' ;
20692073 $ out .= '<div data-role="collapsible" id=" ' .$ pagename .'-detail" data-theme="b" data-content-theme="a" ' .$ visibl .'> ' ;
20702074 $ out .= '<h2> ' .$ TypePage ['detail ' ]['name ' ].'</h2> ' ;
2071- $ out .= '<ul data-role="listview"> ' ;
2075+ $ out .= '<ul data-role="listview" id="first_interface" > ' ;
20722076
2073- if (is_array ($ TypePage ['detail ' ]['value ' ]))
2074- {
2075- foreach ($ TypePage ['detail ' ]['value ' ] as $ key_ex => $ type_ex )
2076- {
2077- if ($ key_ex != 'name ' )
2078- {
2077+ if (is_array ($ TypePage ['detail ' ]['value ' ])) {
2078+ foreach ($ TypePage ['detail ' ]['value ' ] as $ key_ex => $ type_ex ) {
2079+ if ($ key_ex != 'name ' ) {
20792080 $ out .= '<li id=" ' .$ type_ex .'DIV" class="ui-field-contain"> ' .$ this ->InputStandard ($ type_ex , $ Type_Status_arr ).'</li> ' ;
20802081 }
20812082 }
2082- }
2083+ }
20832084
2085+ $ out .= '</ul> ' ;
2086+ $ out .= '</div> ' ;
2087+ $ out .= '<div style="display:none;" data-role="collapsible" id=" ' .$ pagename .'-detail-2" data-theme="b" data-content-theme="a" ' .$ visibl .'> ' ;
2088+ $ out .= '<h2 class="ui-collapsible-heading ui-collapsible-heading-collapsed"> ' ;
2089+ // $out.= '<a href="#" class="ui-collapsible-heading-toggle ui-btn ui-icon-plus ui-btn-icon-left ui-btn-b">';
2090+ $ out .= $ langs ->trans ("WebserviceConfiguration2 " );
2091+ $ out .= '<span class="ui-collapsible-heading-status"> ' ;
2092+ $ out .= 'click to expand contents ' ;
2093+ $ out .= '</span> ' ;
2094+ // $out.= '</a>';
2095+ $ out .= '</h2> ' ;
2096+ $ out .= '<ul data-role="listview" id="second_interface"> ' ;
2097+ $ out .= '<li class="ui-field-contain ui-li-static ui-body-inherit ui-first-child"> ' ;
2098+ $ out .= '<legend> ' .$ langs ->trans ("Labelwebservice_login2 " ).':</legend> ' ;
2099+ $ out .= '<div class="ui-body-inherit ui-corner-all ui-shadow-inset"> ' ;
2100+ $ out .= '<input type="text" name="conf[webservice][login_2]" value=" ' .$ configuration ->conf ['webservice ' ]['login_2 ' ].'"> ' ;
2101+ $ out .= '</div> ' ;
2102+ $ out .= '</li> ' ;
2103+ $ out .= '<li class="ui-field-contain ui-li-static ui-body-inherit ui-first-child"> ' ;
2104+ $ out .= '<legend> ' .$ langs ->trans ("Labelwebservice_password2 " ).':</legend> ' ;
2105+ $ out .= '<div class="ui-body-inherit ui-corner-all ui-shadow-inset"> ' ;
2106+ // $out.= '<input type="password" name="conf[webservice][password_2]" value="'.encrypt_decrypt(1, $configuration->conf['webservice']['password_2']).'">';
2107+ $ out .= '<input type="password" name="conf[webservice][password_2]" value=" ' .$ configuration ->conf ['webservice ' ]['password_2 ' ].'"> ' ;
2108+ $ out .= '</div> ' ;
2109+ $ out .= '</li> ' ;
2110+ // $out.= encrypt_decrypt(2, $configuration->conf['webservice']['password_2']);
2111+ $ out .= '<li class="ui-field-contain ui-li-static ui-body-inherit ui-first-child"> ' ;
2112+ $ out .= '<legend> ' .$ langs ->trans ("Labelwebservice_securitykey " ).':</legend> ' ;
2113+ $ out .= '<div class="ui-body-inherit ui-corner-all ui-shadow-inset"> ' ;
2114+ $ out .= '<input type="text" name="conf[webservice][securitykey_2]" value=" ' .$ configuration ->conf ['webservice ' ]['securitykey_2 ' ].'"> ' ;
2115+ $ out .= '</div> ' ;
2116+ $ out .= '</li> ' ;
2117+ $ out .= '<li class="ui-field-contain ui-li-static ui-body-inherit"> ' ;
2118+ $ out .= '<legend> ' .$ langs ->trans ("webservice_WS_METHOD " ).':</legend> ' ;
2119+ $ out .= '<div class="ui-body-inherit ui-corner-all ui-shadow-inset"> ' ;
2120+ $ out .= '<input type="text" name="conf[webservice][WS_METHOD_2]" value=" ' .$ configuration ->conf ['webservice ' ]['WS_METHOD_2 ' ].'"> ' ;
2121+ $ out .= '</div> ' ;
2122+ $ out .= '</li> ' ;
2123+ $ out .= '<li class="ui-field-contain ui-li-static ui-body-inherit"> ' ;
2124+ $ out .= '<legend> ' .$ langs ->trans ("Labelwebservice_WS_DOL_URL " ).':</legend> ' ;
2125+ $ out .= '<div class="ui-body-inherit ui-corner-all ui-shadow-inset"> ' ;
2126+ $ out .= '<input type="text" name="conf[webservice][WS_DOL_URL_2]" value=" ' .$ configuration ->conf ['webservice ' ]['WS_DOL_URL_2 ' ].'"> ' ;
2127+ $ out .= '<input type="hidden" name="conf[webservice][ns_2]" value=" ' .$ configuration ->conf ['webservice ' ]['WS_DOL_URL_2 ' ].'"> ' ;
2128+ $ out .= '</div> ' ;
2129+ $ out .= '</li> ' ;
2130+ if (is_array ($ TypePage ['detail ' ]['value ' ])) {
2131+ foreach ($ TypePage ['detail ' ]['value ' ] as $ key_ex => $ type_ex ) {
2132+ if ($ key_ex != 'name ' ) {
2133+ if ($ type_ex == 'proxy_conf ' ) {
2134+ $ out .= '<li id=" ' .$ type_ex .'DIV" class="ui-field-contain"> ' .$ this ->InputStandard ($ type_ex , $ Type_Status_arr ).'</li> ' ;
2135+ }
2136+ }
2137+ }
2138+ }
20842139 $ out .= '</ul> ' ;
2085- $ out .= '</div> ' ; // DETAILS
2140+ $ out .= '</div> ' ;
20862141 }
20872142
20882143 $ out .= '</div> ' ; // MAIN CONTENT
@@ -2878,12 +2933,10 @@ function PostToConf($post)
28782933 {
28792934 foreach ($ post as $ obj_name => $ obj_val )
28802935 {
2881-
28822936 if (is_array ($ obj_val ))
28832937 {
28842938 foreach ($ obj_val as $ obj_2_name => $ obj_2_val )
28852939 {
2886-
28872940 if (is_array ($ obj_2_val ))
28882941 {
28892942 foreach ($ obj_2_val as $ obj_3_name => $ obj_3_val )
@@ -2913,7 +2966,7 @@ function PostToConf($post)
29132966 }
29142967
29152968 /**
2916- * Function to chnge Configuration in the conf.php file
2969+ * Function to change Configuration in the conf.php file
29172970 *
29182971 * @return null
29192972 */
@@ -2978,4 +3031,4 @@ function format_timezone_name($name) {
29783031 }
29793032 }
29803033
2981- ?>
3034+ ?>
0 commit comments