33
33
34
34
class CAP_Form{
35
35
36
- var $ version = '1.4 ' ;
36
+ var $ version = '1.5.5 ' ;
37
37
var $ login_id = 0 ;
38
38
/**
39
39
* initialize Class with Data
@@ -691,7 +691,7 @@ function InputStandard($type, $status_arr = "")
691
691
692
692
693
693
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 ;"> ' ;
695
695
$ 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> ' ;
696
696
$ out .= '<div data-role="header" id="CAP_SOAP_popupDialog_header" data-theme="a"> ' ;
697
697
if (!empty ($ plugin ->name )) $ out .= '<h2> ' .$ langs ->trans ('ProducedCaps ' ).'</h2> ' ;
@@ -1207,8 +1207,8 @@ function InputStandard($type, $status_arr = "")
1207
1207
}
1208
1208
else
1209
1209
{
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";
1212
1212
}
1213
1213
}
1214
1214
@@ -1415,10 +1415,15 @@ function InputStandard($type, $status_arr = "")
1415
1415
case 'webservice_on ' :
1416
1416
if ($ configuration ->conf ["webservice " ]["service_on " ] == 1 ) $ onoroff = 'checked="" ' ;
1417
1417
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> ' ;
1420
1420
$ 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 ;
1422
1427
1423
1428
case 'webservice_password ' :
1424
1429
$ 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 =
1756
1761
*/
1757
1762
function buildSelect ($ name = "" , $ data = array (), $ option = "" , $ placeholder = "" , $ selected ="" , $ empty =0 )
1758
1763
{
1759
- $ out = '<select name=" ' .$ name .'" ' .$ option .'> ' ;
1764
+ $ out = '<select onchange="get_date();" name=" ' .$ name .'" ' .$ option .'> ' ;
1760
1765
1761
1766
if ($ empty == 1 )
1762
1767
{
@@ -2062,27 +2067,77 @@ function Form()
2062
2067
$ out .= '</div> ' ; // UI_BODY_A
2063
2068
2064
2069
// DETAILS
2065
- if (count ($ TypePage ['detail ' ]['value ' ]) >= 1 && $ TypePage ['detail ' ]['value ' ] != -1 )
2066
- {
2070
+ if (count ($ TypePage ['detail ' ]['value ' ]) >= 1 && $ TypePage ['detail ' ]['value ' ] != -1 ) {
2067
2071
$ visibl = "" ;
2068
2072
if ($ configuration ->conf ["webservice " ]["service_on " ] == 0 && $ pagename == "conf " ) $ visibl = 'style="display:none;" ' ;
2069
2073
$ out .= '<div data-role="collapsible" id=" ' .$ pagename .'-detail" data-theme="b" data-content-theme="a" ' .$ visibl .'> ' ;
2070
2074
$ out .= '<h2> ' .$ TypePage ['detail ' ]['name ' ].'</h2> ' ;
2071
- $ out .= '<ul data-role="listview"> ' ;
2075
+ $ out .= '<ul data-role="listview" id="first_interface" > ' ;
2072
2076
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 ' ) {
2079
2080
$ out .= '<li id=" ' .$ type_ex .'DIV" class="ui-field-contain"> ' .$ this ->InputStandard ($ type_ex , $ Type_Status_arr ).'</li> ' ;
2080
2081
}
2081
2082
}
2082
- }
2083
+ }
2083
2084
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
+ }
2084
2139
$ out .= '</ul> ' ;
2085
- $ out .= '</div> ' ; // DETAILS
2140
+ $ out .= '</div> ' ;
2086
2141
}
2087
2142
2088
2143
$ out .= '</div> ' ; // MAIN CONTENT
@@ -2878,12 +2933,10 @@ function PostToConf($post)
2878
2933
{
2879
2934
foreach ($ post as $ obj_name => $ obj_val )
2880
2935
{
2881
-
2882
2936
if (is_array ($ obj_val ))
2883
2937
{
2884
2938
foreach ($ obj_val as $ obj_2_name => $ obj_2_val )
2885
2939
{
2886
-
2887
2940
if (is_array ($ obj_2_val ))
2888
2941
{
2889
2942
foreach ($ obj_2_val as $ obj_3_name => $ obj_3_val )
@@ -2913,7 +2966,7 @@ function PostToConf($post)
2913
2966
}
2914
2967
2915
2968
/**
2916
- * Function to chnge Configuration in the conf.php file
2969
+ * Function to change Configuration in the conf.php file
2917
2970
*
2918
2971
* @return null
2919
2972
*/
@@ -2978,4 +3031,4 @@ function format_timezone_name($name) {
2978
3031
}
2979
3032
}
2980
3033
2981
- ?>
3034
+ ?>
0 commit comments