1
|
|
|
<?php |
2
|
|
|
$ARCurrent->nolangcheck = true; |
3
|
|
|
if( $this->CheckLogin("read") && $this->CheckConfig() ) { |
4
|
|
|
$arNewFilename = $this->getdata("arNewFilename", "none"); |
5
|
|
|
|
6
|
|
|
$eventData = new baseObject(); |
7
|
|
|
$eventData->arCallArgs = $arCallArgs; |
|
|
|
|
8
|
|
|
$eventData->arCallFunction = $context['arCallFunction']; |
|
|
|
|
9
|
|
|
$eventData->arIsNewObject = true; |
|
|
|
|
10
|
|
|
$eventData->arNewFilename= (string) $arNewFilename; |
|
|
|
|
11
|
|
|
$eventData = ar_events::fire( 'onbeforenewfilename', $eventData ); |
12
|
|
|
|
13
|
|
|
if ( $eventData !== false) { |
14
|
|
|
if ( isset($eventData->arNewFilename) ) { |
15
|
|
|
$arNewFilename = $eventData->arNewFilename; |
16
|
|
|
} |
17
|
|
|
|
18
|
|
|
$autoNumberChecked = ""; |
19
|
|
|
$inputDisabled = ""; |
20
|
|
|
|
21
|
|
|
if ( $arNewFilename == "{5:id}") { |
22
|
|
|
$autoNumberChecked = "checked"; |
23
|
|
|
$inputDisabled = "disabled"; |
24
|
|
|
$arNewFilename = ""; |
25
|
|
|
} |
26
|
|
|
?> |
27
|
|
|
<script type="text/javascript"> |
28
|
|
|
function toggleAutoNumber() { |
29
|
|
|
var checked = document.getElementById("autonumber").checked; |
30
|
|
|
if (checked) { |
31
|
|
|
document.getElementById("arNewFilename").disabled = true; |
32
|
|
|
} else { |
33
|
|
|
document.getElementById("arNewFilename").disabled = false; |
34
|
|
|
} |
35
|
|
|
} |
36
|
|
|
</script> |
37
|
|
|
<fieldset id="data"> |
38
|
|
|
<legend><?php echo $ARnls["filename"]; ?></legend> |
39
|
|
|
<div class="right"> |
40
|
|
|
<label for="autonumber"> </label> |
41
|
|
|
<div class="field checkbox"> |
42
|
|
|
<input onchange="toggleAutoNumber();" onclick="toggleAutoNumber();" <?php echo $autoNumberChecked; ?> type="checkbox" name="arNewFilename" value="{5:id}" id="autonumber" > |
43
|
|
|
<label for="autonumber"><?php echo $ARnls["ariadne:new:autonumber"]; ?></label> |
44
|
|
|
</div> |
45
|
|
|
</div> |
46
|
|
|
<div class="left"> |
47
|
|
|
<div class="field"> |
48
|
|
|
<label for="arNewFilename" class="required"><?php echo $ARnls["filename"]; ?></label> |
49
|
|
|
<input id="arNewFilename" class="inputline wgWizAutoSelect wgWizAutoFocus" <?php echo $inputDisabled; ?> type="text" name="arNewFilename" value="<?php echo $arNewFilename ?>"> |
50
|
|
|
<div class="help"><?php echo $ARnls['ariadne:new:lettersnumbers']; ?></div> |
51
|
|
|
</div> |
52
|
|
|
</div> |
53
|
|
|
</fieldset> |
54
|
|
|
<?php |
55
|
|
|
ar_events::fire( 'onnewfilename', $eventData ); |
56
|
|
|
} |
57
|
|
|
} |
58
|
|
|
?> |
59
|
|
|
|
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.